[PATCH] subrepo: fix git branch tracking logic (issue2920)
Eric Roshan Eisner
ede at alum.mit.edu
Wed Oct 12 13:31:18 CDT 2011
# HG changeset patch
# User Eric Roshan Eisner <ede at alum.mit.edu>
# Date 1318394095 25200
# Node ID 5d700b7edd856718ef7d3f96c1155f7f0ed90085
# Parent 81c97964d123cf1bb3f55ed1dd6ad1356fb47538
subrepo: fix git branch tracking logic (issue2920)
diff --git a/mercurial/subrepo.py b/mercurial/subrepo.py
--- a/mercurial/subrepo.py
+++ b/mercurial/subrepo.py
@@ -833,9 +833,10 @@ class gitsubrepo(abstractsubrepo):
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
More information about the Mercurial-devel
mailing list