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

login
register
mail settings
Submitter timeless@mozdev.org
Date Feb. 4, 2016, 3:56 a.m.
Message ID <d577b5731cdd4b8af7be.1454558182@waste.org>
Download mbox | patch
Permalink /patch/12972/
State Superseded
Commit 6025ddb4e649e24aa7d37704b2ad6850fb8ad0dd
Headers show

Comments

timeless@mozdev.org - Feb. 4, 2016, 3:56 a.m.
# HG changeset patch
# User timeless <timeless@mozdev.org>
# Date 1454557598 0
#      Thu Feb 04 03:46:38 2016 +0000
# Node ID d577b5731cdd4b8af7be8ff32905dff807e5b9a8
# Parent  1e8f92f555cdd026da9cdc8f65f144ab5f16f1c8
rebase: suggest the correct tool to continue (not rebase)

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

Patch

diff --git a/hgext/rebase.py b/hgext/rebase.py
--- a/hgext/rebase.py
+++ b/hgext/rebase.py
@@ -910,7 +910,7 @@ 
     except IOError as err:
         if err.errno != errno.ENOENT:
             raise
-        raise error.Abort(_('no rebase in progress'))
+        cmdutil.wrongtooltocontinue(repo, _('no rebase in progress'))
 
     if keepbranches is None:
         raise error.Abort(_('.hg/rebasestate is incomplete'))
diff --git a/tests/test-rebase-conflicts.t b/tests/test-rebase-conflicts.t
--- a/tests/test-rebase-conflicts.t
+++ b/tests/test-rebase-conflicts.t
@@ -56,9 +56,12 @@ 
   
 Try to call --continue:
 
+  $ hg rm -q extra
   $ hg rebase --continue
   abort: no rebase in progress
+  (continue: hg commit)
   [255]
+  $ hg revert -r . -q extra
 
 Conflicting rebase: