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

login
register
mail settings
Submitter timeless@mozdev.org
Date Feb. 12, 2016, 8:54 p.m.
Message ID <8ae24817cc20930ffc3d.1455310452@waste.org>
Download mbox | patch
Permalink /patch/13152/
State Accepted
Delegated to: Pierre-Yves David
Headers show

Comments

timeless@mozdev.org - Feb. 12, 2016, 8:54 p.m.
# HG changeset patch
# User timeless <timeless@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.

Patch

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