From 0d5dd6fc1902310085603ff45451c0d2ef2a15dc Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Wed, 26 Feb 2014 16:53:51 +0000 Subject: [PATCH] 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 --- lib/redmine/scm/adapters/mercurial/redminehelper.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/redmine/scm/adapters/mercurial/redminehelper.py b/lib/redmine/scm/adapters/mercurial/redminehelper.py index 6056dd803..b7d98a18f 100644 --- a/lib/redmine/scm/adapters/mercurial/redminehelper.py +++ b/lib/redmine/scm/adapters/mercurial/redminehelper.py @@ -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)