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

timeless timeless at mozdev.org
Fri Feb 12 15:54:12 EST 2016


# HG changeset patch
# User timeless <timeless at mozdev.org>
# Date 1454557620 0
#      Thu Feb 04 03:47:00 2016 +0000
# Node ID 8ae24817cc20930ffc3d9c524c4fdcedfe4e0fd8
# Parent  9c8776f1fc9459a867bcf59b0180a29ffec81e06
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,7 @@
         except IOError as err:
             if err.errno != errno.ENOENT:
                 raise
-            raise error.Abort(_('no histedit in progress'))
+            cmdutil.wrongtooltocontinue(self.repo, _('histedit'))
 
         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
@@ -133,6 +133,11 @@
   (hg histedit --continue to resume)
   [1]
 
+  $ hg graft --continue
+  abort: no graft in progress
+  (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