Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.mixmin.net!de-l.enfer-du-nord.net!feeder2.enfer-du-nord.net!newsfeed.eweka.nl!eweka.nl!feeder3.eweka.nl!newsfeed.xs4all.nl!newsfeed2.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.016 X-Spam-Evidence: '*H*': 0.97; '*S*': 0.00; 'modify': 0.07; 'revision': 0.07; 'falls': 0.09; 'git': 0.09; 'hooks': 0.09; 'url:github': 0.09; 'wrapper': 0.09; 'fallback': 0.16; 'magic': 0.16; 'subject:branches': 0.16; '\xa0would': 0.16; 'file,': 0.19; 'not,': 0.20; 'settings': 0.22; 'handles': 0.22; 'install': 0.23; 'merge': 0.24; 'url:dev': 0.24; 'non': 0.24; "doesn't": 0.30; 'skip:g 30': 0.30; 'message-id:@mail.gmail.com': 0.30; "i'm": 0.30; 'branches': 0.31; 'file': 0.32; 'this.': 0.32; 'checking': 0.33; 'to:name:python-list': 0.33; 'problem': 0.35; 'something': 0.35; 'requirement': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'options:': 0.36; "didn't": 0.36; 'thanks': 0.36; 'subject:?': 0.36; 'requirements': 0.37; 'skip:& 10': 0.38; 'branch': 0.38; 'to:addr:python-list': 0.38; 'sure': 0.39; 'to:addr:python.org': 0.39; 'up,': 0.60; 'back': 0.62; 'such': 0.63; 'become': 0.64; 'different': 0.65; 'situation': 0.65; 'skip:a 40': 0.72; 'as:': 0.81; 'messed': 0.84 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=yaIxvuo6nPUzPQjTpB6KdYnGQmvzn1z9DqjXDWAWy84=; b=CiOkJOC79dEEyt8hN3xo+fvOsI42ng3N3OPZJeblF33yG0FvMv7cOQLouY//xISs+s sspiMCpki2SKeWsyyPo3V9YftNowoIHiOiMo4bA2IkAydLC7j7F4WfoM4Y0kobE/2Wrc GzePmJ7IqA1o77+k03TjbYxJKb81IUHr0zjXV090Hal5jyqmowa5txCeQEtTUNdCenvi UzIZKmGLyvkFPNn53TyYFGneYGMB6DWEizw0c31kytvU5u6PQIJCsz5os6PxyegUv1tR DHXWXe7i4b2pJ0lQ/uGTfnCFnuafbDo1p9/ePPJi4hcaRkXeN/TEN1r9cb/nBFgNjEyW OUbg== MIME-Version: 1.0 X-Received: by 10.180.21.242 with SMTP id y18mr16090134wie.7.1369072830720; Mon, 20 May 2013 11:00:30 -0700 (PDT) Date: Mon, 20 May 2013 20:00:30 +0200 Subject: pip and different branches? From: andrea crotti To: python-list Content-Type: multipart/alternative; boundary=047d7bb70b2cbf335f04dd2a1b5c X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 70 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1369072834 news.xs4all.nl 15981 [2001:888:2000:d::a6]:38018 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:45628 --047d7bb70b2cbf335f04dd2a1b5c Content-Type: text/plain; charset=ISO-8859-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://git@github.com/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 --047d7bb70b2cbf335f04dd2a1b5c Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
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:
<= div>git+ssh://git@github.com= /repo.git@dev

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

I was looking for a solutio= n 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
=A0 =A0would become templates.
=A0 =A0In this way I would ha= ve to know however if a branch exist or not,
=A0 =A0and I didn= 9;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
=A0 =A0that if it's not found it falls back on master automaticall= y.

3. use some git magic hooks but I'm not sur= e what exactly

4. stop using virtualenv + pip and = use something smarter that handles
=A0 =A0this.

Any suggestions?
Thank= s

--047d7bb70b2cbf335f04dd2a1b5c--