git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 2/8] remote-bzr: make bzr branches configurable per-repo

From
Felipe Contreras <felipe.contreras@gmail.com>
Date
Aug 28, 2013, 19:23 UTC
Message-ID
<1377717793-27170-3-git-send-email-felipe.contreras@gmail.com>
In-Reply-To
<1377717793-27170-1-git-send-email-felipe.contreras@gmail.com>

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>
---
 contrib/remote-helpers/git-remote-bzr | 13 ++++++++++---
 1 file 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:
-- 
1.8.4-fc
Previous: Felipe ContrerasNext: Felipe Contreras
Message 21 of 32 in “remote-{hg,bzr}: updates”
  1. 0/8 remote-{hg,bzr}: updatesFelipe Contreras, Aug 28, 2013
  2. 1/8 remote-bzr: fix export of utf-8 authorsFelipe Contreras, Aug 28, 2013
  3. Matthieu MoyAug 28, 2013
  4. Felipe ContrerasAug 28, 2013
  5. Antoine PelisseAug 28, 2013
  6. Felipe ContrerasAug 28, 2013
  7. Felipe ContrerasAug 28, 2013
  8. Matthieu MoyAug 28, 2013
  9. Felipe ContrerasAug 28, 2013
  10. Junio C HamanoAug 28, 2013
  11. Felipe ContrerasAug 28, 2013
  12. Re* [PATCH 1/8] remote-bzr: fix export of utf-8 authorsJunio C Hamano, Aug 29, 2013
  13. Junio C HamanoAug 29, 2013
  14. Michael HaggertySep 1, 2013
  15. Antoine PelisseAug 29, 2013
  16. Junio C HamanoAug 29, 2013
  17. Junio C HamanoAug 29, 2013
  18. Michael HaggertySep 1, 2013
  19. Eric SunshineAug 28, 2013
  20. remote-bzr: fix export of utf-8 authorsFelipe Contreras, Aug 28, 2013
  21. 2/8 remote-bzr: make bzr branches configurable per-repoFelipe Contreras, Aug 28, 2013
  22. 3/8 remote-hg: fix testFelipe Contreras, Aug 28, 2013
  23. 4/8 remote-hg: add missing &&s in the testFelipe Contreras, Aug 28, 2013
  24. 5/8 remote-hg: improve basic testFelipe Contreras, Aug 28, 2013
  25. 6/8 remote-helpers: trivial style fixesFelipe Contreras, Aug 28, 2013
  26. 7/8 remote-helpers: cleanup more global variablesFelipe Contreras, Aug 28, 2013
  27. 8/8 remote-hg: support for notesFelipe Contreras, Aug 28, 2013
  28. Junio C HamanoAug 29, 2013
  29. remote-hg: support for notesFelipe Contreras, Aug 29, 2013
  30. Junio C HamanoAug 29, 2013
  31. remote-hg: support for notesFelipe Contreras, Aug 29, 2013
  32. Junio C HamanoAug 29, 2013

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.