Mercurial > hgsubversion
comparison hgsubversion/__init__.py @ 1506:332e803044e5
commands: fix registrar check
'util' in hgsubversion is a different type from hgutil, which is the one from
core hg. This was hidden by the fallback logic, but I'm not sure why it didn't
cause errors in the tests. Maybe I ran the original tests against an older hg.
This time I've ensured the tests pass against the latest version of hg.
author | Durham Goode <durham@fb.com> |
---|---|
date | Tue, 23 May 2017 11:08:42 -0700 |
parents | 6f2c7b5940f6 |
children | 6d0fe7ce9898 |
comparison
equal
deleted
inserted
replaced
1505:6f2c7b5940f6 | 1506:332e803044e5 |
---|---|
223 try: | 223 try: |
224 from mercurial import registrar | 224 from mercurial import registrar |
225 templatekeyword = registrar.templatekeyword() | 225 templatekeyword = registrar.templatekeyword() |
226 loadkeyword = lambda registrarobj: None # no-op | 226 loadkeyword = lambda registrarobj: None # no-op |
227 | 227 |
228 if util.safehasattr(registrar, 'command'): | 228 if hgutil.safehasattr(registrar, 'command'): |
229 cmdtable = {} | 229 cmdtable = {} |
230 command = registrar.command(cmdtable) | 230 command = registrar.command(cmdtable) |
231 @command('svn', svnopts, svnusage) | 231 @command('svn', svnopts, svnusage) |
232 def svncommand(*args, **kwargs): | 232 def svncommand(*args, **kwargs): |
233 return svncommands.svn(*args, **kwargs) | 233 return svncommands.svn(*args, **kwargs) |