Mercurial 2.9 compatibility (#16177)
git-svn-id: http://svn.redmine.org/redmine/trunk@12930 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
e266ddb309
commit
7b295f379b
|
@ -79,8 +79,13 @@ def _tags(ui, repo):
|
|||
def _branches(ui, repo):
|
||||
# see mercurial/commands.py:branches
|
||||
def iterbranches():
|
||||
for t, n in repo.branchtags().iteritems():
|
||||
yield t, n, repo.changelog.rev(n)
|
||||
if hasattr(repo, 'branchtags'):
|
||||
# Mercurial < 2.9
|
||||
for t, n in repo.branchtags().iteritems():
|
||||
yield t, n, repo.changelog.rev(n)
|
||||
else:
|
||||
for tag, heads, tip, isclosed in repo.branchmap().iterbranches():
|
||||
yield tag, tip, repo.changelog.rev(tip)
|
||||
def branchheads(branch):
|
||||
try:
|
||||
return repo.branchheads(branch, closed=False)
|
||||
|
|
Loading…
Reference in New Issue