Mercurial > public > mercurial-scm > hg
comparison mercurial/hg.py @ 10380:ee72d89c0d9f
addbranchrevs: fallback for older servers
author | Sune Foldager <cryo@cyanite.org> |
---|---|
date | Sun, 07 Feb 2010 15:57:16 +0100 |
parents | a78bfaf988e1 |
children | 5f091fc1bab7 4a70178f9bde |
comparison
equal
deleted
inserted
replaced
10379:a78bfaf988e1 | 10380:ee72d89c0d9f |
---|---|
19 bundlerepo or localrepo) | 19 bundlerepo or localrepo) |
20 | 20 |
21 def addbranchrevs(lrepo, repo, branches, revs): | 21 def addbranchrevs(lrepo, repo, branches, revs): |
22 if not branches: | 22 if not branches: |
23 return revs or None, revs and revs[0] or None | 23 return revs or None, revs and revs[0] or None |
24 revs = revs and list(revs) or [] | |
25 if not repo.capable('branchmap'): | |
26 revs.extend(branches) | |
27 return revs, revs[0] | |
24 branchmap = repo.branchmap() | 28 branchmap = repo.branchmap() |
25 revs = revs and list(revs) or [] | |
26 for branch in branches: | 29 for branch in branches: |
27 if branch == '.': | 30 if branch == '.': |
28 if not lrepo or not lrepo.local(): | 31 if not lrepo or not lrepo.local(): |
29 raise util.Abort(_("dirstate branch not accessible")) | 32 raise util.Abort(_("dirstate branch not accessible")) |
30 revs.append(lrepo.dirstate.branch()) | 33 revs.append(lrepo.dirstate.branch()) |