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

login
register
mail settings
Submitter timeless@mozdev.org
Date Feb. 12, 2016, 7:03 p.m.
Message ID <90beb3cba03525a362e0.1455303821@waste.org>
Download mbox | patch
Permalink /patch/13148/
State Superseded
Headers show

Comments

timeless@mozdev.org - Feb. 12, 2016, 7:03 p.m.
# HG changeset patch
# User timeless <timeless@mozdev.org>
# Date 1454557658 0
#      Thu Feb 04 03:47:38 2016 +0000
# Node ID 90beb3cba03525a362e061e7bc5e78ac2fea590b
# Parent  80d58999b7343efe3cc9b0ab90d402f400ec35fc
shelve: suggest the correct tool to continue (not unshelve)

Suggest committing (or whatever the current activity is), via
wrongtooltocontinue which uses howtocontinue.
timeless - Feb. 12, 2016, 7:14 p.m.
Ignore this resend, it's equivalent to v2, I was replying to v1
thinking that perhaps I hadn't sent v2.

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