mirror of
https://github.com/meineerde/redmine.git
synced 2025-12-30 12:19:38 +00:00
Mercurial 4.7 compatibility (#29413).
Patch by Frédéric Fondement. git-svn-id: http://svn.redmine.org/redmine/trunk@17474 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
c0df5d1ae2
commit
9709f8f364
@ -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:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user