summaryrefslogtreecommitdiff
path: root/contrib/remote-helpers
diff options
context:
space:
mode:
authorFelipe Contreras <felipe.contreras@gmail.com>2013-08-28 19:23:07 (GMT)
committerJunio C Hamano <gitster@pobox.com>2013-08-29 18:40:51 (GMT)
commita11b0ac9e17459c83d89844761ca0c132b4d324c (patch)
tree1073bf68a918443921109bf0b0736367ebed6feb /contrib/remote-helpers
parenta8c0b74718d9986aec758e4a834a2d7363b16f24 (diff)
downloadgit-a11b0ac9e17459c83d89844761ca0c132b4d324c.zip
git-a11b0ac9e17459c83d89844761ca0c132b4d324c.tar.gz
git-a11b0ac9e17459c83d89844761ca0c132b4d324c.tar.bz2
remote-bzr: make bzr branches configurable per-repo
Different repositories have different branches, some are are even branches themselves. Reported-by: Peter Niederlag <netservice@niekom.de> Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'contrib/remote-helpers')
-rwxr-xr-xcontrib/remote-helpers/git-remote-bzr13
1 files changed, 10 insertions, 3 deletions
diff --git a/contrib/remote-helpers/git-remote-bzr b/contrib/remote-helpers/git-remote-bzr
index 08b0b61..a7d2ac9 100755
--- a/contrib/remote-helpers/git-remote-bzr
+++ b/contrib/remote-helpers/git-remote-bzr
@@ -13,8 +13,11 @@
# or
# % git clone bzr::lp:myrepo
#
-# If you want to specify which branches you want track (per repo):
-# git config remote-bzr.branches 'trunk, devel, test'
+# If you want to specify which branches you want to track (per repo):
+# % git config remote.origin.bzr-branches 'trunk, devel, test'
+#
+# Where 'origin' is the name of the repository you want to specify the
+# branches.
#
import sys
@@ -852,9 +855,13 @@ def get_repo(url, alias):
except bzrlib.errors.NoRepositoryPresent:
pass
- wanted = get_config('remote-bzr.branches').rstrip().split(', ')
+ wanted = get_config('remote.%s.bzr-branches' % alias).rstrip().split(', ')
# stupid python
wanted = [e for e in wanted if e]
+ if not wanted:
+ wanted = get_config('remote-bzr.branches').rstrip().split(', ')
+ # stupid python
+ wanted = [e for e in wanted if e]
if not wanted:
try: