From: Go MAEDA Date: Sat, 25 Aug 2018 09:48:14 +0000 (+0000) Subject: Merged r17474 from trunk to 3.3-stable (#29413). X-Git-Tag: 3.3.9~13 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=565c4ed12807c00ef81967bf540b0caf09d8a057;p=redmine.git Merged r17474 from trunk to 3.3-stable (#29413). git-svn-id: http://svn.redmine.org/redmine/branches/3.3-stable@17476 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: