# HG changeset patch # User Sascha Nemecek # Date 1513691580 -3600 # Node ID dc481ce24b602720746967f40a93b65c45cdd0f8 # Parent 4dddc56c4c4b420c91d4a9b20e8f9589953b3fde fix error with hg versions <4.3 (regression from commit:4dddc56) diff -r 4dddc56c4c4b -r dc481ce24b60 prompt.py --- a/prompt.py Fri Oct 20 10:51:53 2017 -0500 +++ b/prompt.py Tue Dec 19 14:53:00 2017 +0100 @@ -20,12 +20,12 @@ from mercurial.i18n import _ from mercurial.node import hex, short -# command registration moved into `registrar` module in v3.7. +# command registration moved into `registrar` module in v4.3. cmdtable = {} try: from mercurial import registrar command = registrar.command(cmdtable) -except ImportError: +except (ImportError, AttributeError) as e: command = cmdutil.command(cmdtable) # `revrange' has been moved into module `scmutil' since v1.9.