##// END OF EJS Templates
use Python getattr instead of hasattr (#16177)...
Toshi MARUYAMA -
r12660:0cf7a27b503d
parent child
Show More
@@ -79,7 +79,7 def _tags(ui, repo):
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 if hasattr(repo, 'branchtags'):
82 if getattr(repo, 'branchtags', None) is not None:
83 # Mercurial < 2.9
83 # Mercurial < 2.9
84 for t, n in repo.branchtags().iteritems():
84 for t, n in repo.branchtags().iteritems():
85 yield t, n, repo.changelog.rev(n)
85 yield t, n, repo.changelog.rev(n)
General Comments 0
You need to be logged in to leave comments. Login now