Skip to content
Snippets Groups Projects
Commit bec3bd68 authored by Manuel Jacob's avatar Manuel Jacob
Browse files

compat: reduce code in try clause

In the previous code, if lazy-importing compat failed, the except clause was
executed, raising a bogus error.
parent 39a539c9
No related branches found
No related tags found
1 merge request!33Partially fix compat with Mercurial default
Pipeline #6823 passed with warnings
......@@ -77,10 +77,9 @@
from mercurial import registrar
command = registrar.command(cmdtable)
configitem = registrar.configitem(configtable)
compat.registerconfigs(configitem)
templatekeyword = registrar.templatekeyword()
except (ImportError, AttributeError):
command = cmdutil.command(cmdtable)
templatekeyword = compat.templatekeyword()
......@@ -81,9 +80,12 @@
templatekeyword = registrar.templatekeyword()
except (ImportError, AttributeError):
command = cmdutil.command(cmdtable)
templatekeyword = compat.templatekeyword()
else:
compat.registerconfigs(configitem)
# support for `hg clone git://github.com/defunkt/facebox.git`
# also hg clone git+ssh://git@github.com/schacon/simplegit.git
for _scheme in util.gitschemes:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment