comparison lib/redmine/scm/adapters/mercurial/redminehelper.py @ 1494:e248c7af89ec redmine-2.4

Update to Redmine SVN revision 12979 on 2.4-stable branch
author Chris Cannam
date Mon, 17 Mar 2014 08:54:02 +0000
parents 433d4f72a19b
children dffacf8a6908
comparison
equal deleted inserted replaced
1464:261b3d9a4903 1494:e248c7af89ec
77 % (r, _x(node.short(n)), _x(t))) 77 % (r, _x(node.short(n)), _x(t)))
78 78
79 def _branches(ui, repo): 79 def _branches(ui, repo):
80 # see mercurial/commands.py:branches 80 # see mercurial/commands.py:branches
81 def iterbranches(): 81 def iterbranches():
82 for t, n in repo.branchtags().iteritems(): 82 if getattr(repo, 'branchtags', None) is not None:
83 yield t, n, repo.changelog.rev(n) 83 # Mercurial < 2.9
84 for t, n in repo.branchtags().iteritems():
85 yield t, n, repo.changelog.rev(n)
86 else:
87 for tag, heads, tip, isclosed in repo.branchmap().iterbranches():
88 yield tag, tip, repo.changelog.rev(tip)
84 def branchheads(branch): 89 def branchheads(branch):
85 try: 90 try:
86 return repo.branchheads(branch, closed=False) 91 return repo.branchheads(branch, closed=False)
87 except TypeError: # Mercurial < 1.2 92 except TypeError: # Mercurial < 1.2
88 return repo.branchheads(branch) 93 return repo.branchheads(branch)