Mercurial > hg
changeset 13096:6e74b912fa5c
subrepo: work around old git's remote naming scheme
Older git versions use 'origin/master'
Current git uses 'remotes/origin/master'
author | Eric Eisner <ede@mit.edu> |
---|---|
date | Mon, 06 Dec 2010 21:17:27 -0500 |
parents | 49c7e875482d |
children | c922aacf6f1f |
files | mercurial/subrepo.py |
diffstat | 1 files changed, 4 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/subrepo.py Mon Dec 06 21:17:27 2010 -0500 +++ b/mercurial/subrepo.py Mon Dec 06 21:17:27 2010 -0500 @@ -682,8 +682,11 @@ if line[2:].startswith('(no branch)'): continue branch, revision = line[2:].split()[:2] - if revision == '->': + if revision == '->' or branch.endswith('/HEAD'): continue # ignore remote/HEAD redirects + if '/' in branch and not branch.startswith('remotes/'): + # old git compatability + branch = 'remotes/' + branch if line[0] == '*': current = branch branch2rev[branch] = revision