[PATCH 1 of 7] error: make InterventionRequired take a hint
timeless
timeless at mozdev.org
Wed Dec 23 09:06:40 UTC 2015
# HG changeset patch
# User timeless <timeless at mozdev.org>
# Date 1450860772 0
# Wed Dec 23 08:52:52 2015 +0000
# Node ID e3eaa48dc27d4377d3146c602eec688c62678993
# Parent fe376159a58d9b3d748b669ac011b0eed0346fea
error: make InterventionRequired take a hint
diff --git a/mercurial/dispatch.py b/mercurial/dispatch.py
--- a/mercurial/dispatch.py
+++ b/mercurial/dispatch.py
@@ -265,6 +265,8 @@
commands.help_(ui, 'shortlist')
except error.InterventionRequired as inst:
ui.warn("%s\n" % inst)
+ if inst.hint:
+ ui.warn(_("(%s)\n") % inst.hint)
return 1
except error.Abort as inst:
ui.warn(_("abort: %s\n") % inst)
diff --git a/mercurial/error.py b/mercurial/error.py
--- a/mercurial/error.py
+++ b/mercurial/error.py
@@ -50,7 +50,7 @@
class CommandError(Exception):
"""Exception raised on errors in parsing the command line."""
-class InterventionRequired(Exception):
+class InterventionRequired(HintException):
"""Exception raised when a command requires human intervention."""
class Abort(HintException):
More information about the Mercurial-devel
mailing list