Commit a8b7ff71 authored by maeda's avatar maeda

Mercurial 4.7 compatibility (#29413).

Patch by Frédéric Fondement.


git-svn-id: https://svn.redmine.org/redmine/trunk@17474 e93f8b46-1217-0410-a6f0-8f06a7374b81
parent 63e1b267
......@@ -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:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment