pip and different branches?

Discussion in 'Python' started by andrea crotti, May 20, 2013.

  1. We use github and we work on many different branches at the same time.

    The problem is that we have >5 repos now, and for each repo we might
    have the same branches on all of them.

    Now we use pip and install requirements such as:
    git+ssh:///repo.git@dev

    Now the problem is that the requirements file are also under revision
    control, and constantly we end up in the situation that when we merge
    branches the branch settings get messed up, because we forget to change
    them.

    I was looking for a solution for this that would allow me to:
    - use the branch of the "main" repo for all the dependencies
    - fallback on master if that branch doesn't exist

    I thought about a few options:
    1. create a wrapper for PIP that manipulates the requirement file, that now
    would become templates.
    In this way I would have to know however if a branch exist or not,
    and I didn't find a way to do that without cloning the repo.

    2. modify PIP to not fail when checking out a non existing branch, so
    that if it's not found it falls back on master automatically.

    3. use some git magic hooks but I'm not sure what exactly

    4. stop using virtualenv + pip and use something smarter that handles
    this.

    Any suggestions?
    Thanks
    andrea crotti, May 20, 2013
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. John Malek

    Help in optimizing branches

    John Malek, Sep 30, 2003, in forum: C++
    Replies:
    4
    Views:
    445
    Ron Natalie
    Oct 1, 2003
  2. Piet
    Replies:
    1
    Views:
    807
    Josiah Carlson
    Apr 4, 2004
  3. Jeff Newman
    Replies:
    5
    Views:
    442
    James Kanze
    Oct 30, 2008
  4. rembremading
    Replies:
    5
    Views:
    319
    Tim Prince
    Feb 19, 2009
  5. s
    Replies:
    6
    Views:
    360
    Jerry Coffin
    Jan 7, 2010
Loading...

Share This Page