mirror of
https://github.com/redmine/redmine.git
synced 2026-02-06 14:50:11 +01:00
Merged r12935 from trunk to 2.5-stable (#16177)
use Python getattr instead of hasattr. git-svn-id: http://svn.redmine.org/redmine/branches/2.5-stable@12936 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -79,7 +79,7 @@ def _tags(ui, repo):
|
||||
def _branches(ui, repo):
|
||||
# see mercurial/commands.py:branches
|
||||
def iterbranches():
|
||||
if hasattr(repo, 'branchtags'):
|
||||
if getattr(repo, 'branchtags', None) is not None:
|
||||
# Mercurial < 2.9
|
||||
for t, n in repo.branchtags().iteritems():
|
||||
yield t, n, repo.changelog.rev(n)
|
||||
|
||||
Reference in New Issue
Block a user