diff options
author | Go MAEDA <maeda@farend.jp> | 2018-08-25 09:48:14 +0000 |
---|---|---|
committer | Go MAEDA <maeda@farend.jp> | 2018-08-25 09:48:14 +0000 |
commit | 565c4ed12807c00ef81967bf540b0caf09d8a057 (patch) | |
tree | 6c2c24d9624a8fc3bc3d4e604427e51e2f66db51 | |
parent | 069b0803c575b1268b08749e5e97119ca28357c2 (diff) | |
download | redmine-565c4ed12807c00ef81967bf540b0caf09d8a057.tar.gz redmine-565c4ed12807c00ef81967bf540b0caf09d8a057.zip |
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
-rw-r--r-- | lib/redmine/scm/adapters/mercurial/redminehelper.py | 6 |
1 files changed, 4 insertions, 2 deletions
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:: </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: |