From: Go MAEDA Date: Sat, 25 Aug 2018 09:33:01 +0000 (+0000) Subject: Merged r17474 from trunk to 3.4-stable (#29413). X-Git-Tag: 3.4.7^2~25 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=aa82fdd95ef7adaddc2d37c71857868d6e1d3e21;p=redmine.git Merged r17474 from trunk to 3.4-stable (#29413). git-svn-id: http://svn.redmine.org/redmine/branches/3.4-stable@17475 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- diff --git a/lib/redmine/scm/adapters/mercurial/redminehelper.py b/lib/redmine/scm/adapters/mercurial/redminehelper.py index d98ae5184..8097d905a 100644 --- a/lib/redmine/scm/adapters/mercurial/redminehelper.py +++ b/lib/redmine/scm/adapters/mercurial/redminehelper.py @@ -46,15 +46,17 @@ Output example of rhmanifest:: """ import re, time, cgi, urllib -from mercurial import cmdutil, commands, node, error, hg +from mercurial import cmdutil, commands, node, error, hg, registrar cmdtable = {} -command = cmdutil.command(cmdtable) +command = registrar.command(cmdtable) if hasattr(registrar, 'command') else cmdutil.command(cmdtable) _x = cgi.escape _u = lambda s: cgi.escape(urllib.quote(s)) def _changectx(repo, rev): + if isinstance(rev, str): + rev = repo.lookup(rev) if hasattr(repo, 'changectx'): return repo.changectx(rev) else: