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

login
register
mail settings
Submitter timeless@mozdev.org
Date Feb. 4, 2016, 3:56 a.m.
Message ID <073ff57cc9f9d67eb97e.1454558184@waste.org>
Download mbox | patch
Permalink /patch/12974/
State Superseded
Commit 98336538246505aa4437960541ac3ceaa917b76d
Headers show

Comments

timeless@mozdev.org - Feb. 4, 2016, 3:56 a.m.
# HG changeset patch
# User timeless <timeless@mozdev.org>
# Date 1454557658 0
#      Thu Feb 04 03:47:38 2016 +0000
# Node ID 073ff57cc9f9d67eb97eb2a13644eafa658b8040
# Parent  1586929e0a93cd4e3f75ad1fb5182cf3684feeeb
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,8 @@ 
         except IOError as err:
             if err.errno != errno.ENOENT:
                 raise
-            raise error.Abort(_('no unshelve operation underway'))
+            cmdutil.wrongtooltocontinue(repo,
+                _('no unshelve operation underway'))
 
         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
@@ -374,6 +374,7 @@ 
 
   $ hg unshelve -c
   abort: no unshelve operation underway
+  (continue: hg commit)
   [255]
   $ hg status
   A foo/foo