[PATCH 4 of 5 v2] histedit: suggest the correct tool to continue (not histedit)
timeless
timeless at mozdev.org
Sun Feb 7 07:57:39 UTC 2016
# HG changeset patch
# User timeless <timeless at mozdev.org>
# Date 1454557620 0
# Thu Feb 04 03:47:00 2016 +0000
# Node ID 80d58999b7343efe3cc9b0ab90d402f400ec35fc
# Parent edf2e3fb9181ae830977428515e8e36246a42b5e
histedit: suggest the correct tool to continue (not histedit)
Suggest committing (or whatever the current activity is), via
wrongtooltocontinue which uses howtocontinue.
diff --git a/hgext/histedit.py b/hgext/histedit.py
--- a/hgext/histedit.py
+++ b/hgext/histedit.py
@@ -279,7 +279,8 @@
except IOError as err:
if err.errno != errno.ENOENT:
raise
- raise error.Abort(_('no histedit in progress'))
+ cmdutil.wrongtooltocontinue(self.repo,
+ _('no histedit in progress'))
if state.startswith('v1\n'):
data = self._load()
diff --git a/tests/test-histedit-arguments.t b/tests/test-histedit-arguments.t
--- a/tests/test-histedit-arguments.t
+++ b/tests/test-histedit-arguments.t
@@ -44,9 +44,12 @@
histedit --continue/--abort with no existing state
--------------------------------------------------
+ $ hg rm -q alpha
$ hg histedit --continue
abort: no histedit in progress
+ (continue: hg commit)
[255]
+ $ hg revert -r . -q alpha
$ hg histedit --abort
abort: no histedit in progress
[255]
@@ -133,6 +136,11 @@
(hg histedit --continue to resume)
[1]
+ $ hg graft --continue
+ abort: no graft state found, can't continue
+ (continue: hg histedit --continue)
+ [255]
+
$ mv .hg/histedit-state .hg/histedit-state.back
$ hg update --quiet --clean 2
$ echo alpha >> alpha
More information about the Mercurial-devel
mailing list