changeset 15234:5d700b7edd85

subrepo: fix git branch tracking logic (issue2920)
author Eric Roshan Eisner <ede@alum.mit.edu>
date Tue, 11 Oct 2011 21:34:55 -0700
parents 81c97964d123
children f7044da7a793
files mercurial/subrepo.py
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/subrepo.py	Tue Oct 11 17:20:03 2011 -0500
+++ b/mercurial/subrepo.py	Tue Oct 11 21:34:55 2011 -0700
@@ -833,9 +833,10 @@
         for b in branches:
             if b.startswith('refs/remotes/'):
                 continue
-            remote = self._gitcommand(['config', 'branch.%s.remote' % b])
+            bname = b.split('/', 2)[2]
+            remote = self._gitcommand(['config', 'branch.%s.remote' % bname])
             if remote:
-                ref = self._gitcommand(['config', 'branch.%s.merge' % b])
+                ref = self._gitcommand(['config', 'branch.%s.merge' % bname])
                 tracking['refs/remotes/%s/%s' %
                          (remote, ref.split('/', 2)[2])] = b
         return tracking