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

login
register
mail settings
Submitter timeless@mozdev.org
Date Feb. 12, 2016, 8:54 p.m.
Message ID <0ab91c6198633524c453.1455310453@waste.org>
Download mbox | patch
Permalink /patch/13153/
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 1454557658 0
#      Thu Feb 04 03:47:38 2016 +0000
# Node ID 0ab91c6198633524c453faf5efcb040bc8d3fabe
# Parent  8ae24817cc20930ffc3d9c524c4fdcedfe4e0fd8
shelve: suggest the correct tool to continue (not unshelve)

Suggest committing (or whatever the current activity is), via
wrongtooltocontinue which uses howtocontinue.

Patch

diff --git a/hgext/shelve.py b/hgext/shelve.py
--- a/hgext/shelve.py
+++ b/hgext/shelve.py
@@ -628,7 +628,7 @@ 
         except IOError as err:
             if err.errno != errno.ENOENT:
                 raise
-            raise error.Abort(_('no unshelve operation underway'))
+            cmdutil.wrongtooltocontinue(repo, _('unshelve'))
 
         if abortf:
             return unshelveabort(ui, repo, state, opts)
diff --git a/tests/test-shelve.t b/tests/test-shelve.t
--- a/tests/test-shelve.t
+++ b/tests/test-shelve.t
@@ -373,7 +373,7 @@ 
 try to continue with no unshelve underway
 
   $ hg unshelve -c
-  abort: no unshelve operation underway
+  abort: no unshelve in progress
   [255]
   $ hg status
   A foo/foo
@@ -403,6 +403,10 @@ 
   (use 'hg unshelve --continue' or 'hg unshelve --abort')
   [255]
 
+  $ hg graft --continue
+  abort: no graft in progress
+  (continue: hg unshelve --continue)
+  [255]
   $ hg unshelve -c
   rebasing 5:32c69314e062 "changes to: [mq]: second.patch" (tip)
   unshelve of 'default' complete