Mercurial > public > mercurial-scm > hg
comparison mercurial/subrepo.py @ 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 | d0694223861a |
children | 4be845e3932c |
comparison
equal
deleted
inserted
replaced
15233:81c97964d123 | 15234:5d700b7edd85 |
---|---|
831 # assumes no more than one local tracking branch for each remote | 831 # assumes no more than one local tracking branch for each remote |
832 tracking = {} | 832 tracking = {} |
833 for b in branches: | 833 for b in branches: |
834 if b.startswith('refs/remotes/'): | 834 if b.startswith('refs/remotes/'): |
835 continue | 835 continue |
836 remote = self._gitcommand(['config', 'branch.%s.remote' % b]) | 836 bname = b.split('/', 2)[2] |
837 remote = self._gitcommand(['config', 'branch.%s.remote' % bname]) | |
837 if remote: | 838 if remote: |
838 ref = self._gitcommand(['config', 'branch.%s.merge' % b]) | 839 ref = self._gitcommand(['config', 'branch.%s.merge' % bname]) |
839 tracking['refs/remotes/%s/%s' % | 840 tracking['refs/remotes/%s/%s' % |
840 (remote, ref.split('/', 2)[2])] = b | 841 (remote, ref.split('/', 2)[2])] = b |
841 return tracking | 842 return tracking |
842 | 843 |
843 def _abssource(self, source): | 844 def _abssource(self, source): |