Mercurial > public > mercurial-scm > hg-stable
diff mercurial/subrepo.py @ 19012:811e253226c3
subrepo: clone of git sub-repository creates incorrect git branch (issue3870)
Mercurial handles git subrepos by incorrect way.
If the mercurial repo has a git sub-repo and somebody started
a new branch in the subrepo and push it into git, the next one
who will clone the whole repo will get incorrect branch name in the git
subrepo.
author | pozheg <pozheg@gmail.com> |
---|---|
date | Tue, 16 Apr 2013 22:00:05 -0500 |
parents | 88d1b59f6906 |
children | ed1a212193dc |
line wrap: on
line diff
--- a/mercurial/subrepo.py Tue Apr 16 14:39:37 2013 -0700 +++ b/mercurial/subrepo.py Tue Apr 16 22:00:05 2013 -0500 @@ -1266,7 +1266,7 @@ if remote not in tracking: # create a new local tracking branch - local = remote.split('/', 2)[2] + local = remote.split('/', 3)[3] checkout(['-b', local, remote]) elif self._gitisancestor(branch2rev[tracking[remote]], remote): # When updating to a tracked remote branch,