[PATCH 4 of 5] histedit: suggest the correct tool to continue (not histedit)

timeless timeless at mozdev.org
Wed Feb 3 22:56:23 EST 2016


# HG changeset patch
# User timeless <timeless at mozdev.org>
# Date 1454557620 0
#      Thu Feb 04 03:47:00 2016 +0000
# Node ID 1586929e0a93cd4e3f75ad1fb5182cf3684feeeb
# Parent  d577b5731cdd4b8af7be8ff32905dff807e5b9a8
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]


More information about the Mercurial-devel mailing list