# HG changeset patch # User Sascha Nemecek # Date 1513691580 -3600 # Tue Dec 19 14:53:00 2017 +0100 # Node ID dc481ce24b602720746967f40a93b65c45cdd0f8 # Parent 4dddc56c4c4b420c91d4a9b20e8f9589953b3fde fix error with hg versions <4.3 (regression from commit:4dddc56) diff --git a/prompt.py b/prompt.py --- a/prompt.py +++ b/prompt.py @@ -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.