Merged r12930 from trunk to 2.5-stable (#16177)
Mercurial 2.9 compatibility. git-svn-id: http://svn.redmine.org/redmine/branches/2.5-stable@12932 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
41667cd5de
commit
fcc1f198e7
@ -79,8 +79,13 @@ def _tags(ui, repo):
|
|||||||
def _branches(ui, repo):
|
def _branches(ui, repo):
|
||||||
# see mercurial/commands.py:branches
|
# see mercurial/commands.py:branches
|
||||||
def iterbranches():
|
def iterbranches():
|
||||||
|
if hasattr(repo, 'branchtags'):
|
||||||
|
# Mercurial < 2.9
|
||||||
for t, n in repo.branchtags().iteritems():
|
for t, n in repo.branchtags().iteritems():
|
||||||
yield t, n, repo.changelog.rev(n)
|
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):
|
def branchheads(branch):
|
||||||
try:
|
try:
|
||||||
return repo.branchheads(branch, closed=False)
|
return repo.branchheads(branch, closed=False)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user