Mercurial > hg > soundsoftware-site
diff 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 |
line wrap: on
line diff
--- a/lib/redmine/scm/adapters/mercurial/redminehelper.py Tue Jan 14 14:37:42 2014 +0000 +++ b/lib/redmine/scm/adapters/mercurial/redminehelper.py Mon Mar 17 08:54:02 2014 +0000 @@ -79,8 +79,13 @@ def _branches(ui, repo): # see mercurial/commands.py:branches def iterbranches(): - for t, n in repo.branchtags().iteritems(): - yield t, n, repo.changelog.rev(n) + 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) + else: + for tag, heads, tip, isclosed in repo.branchmap().iterbranches(): + yield tag, tip, repo.changelog.rev(tip) def branchheads(branch): try: return repo.branchheads(branch, closed=False)