changeset 6264:917cd662ef6c

evolve: use compat.StateError for missing state file
author Anton Shestakov <av6@dwimlabs.net>
date Wed, 23 Mar 2022 00:25:38 +0300
parents 889d21445ee9
children 8b3cb6cae4a2
files hgext3rd/evolve/evolvecmd.py tests/test-evolve-abort-orphan.t tests/test-evolve-stop-orphan.t tests/test-next-abort.t
diffstat 4 files changed, 6 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/hgext3rd/evolve/evolvecmd.py	Wed Mar 23 00:21:41 2022 +0300
+++ b/hgext3rd/evolve/evolvecmd.py	Wed Mar 23 00:25:38 2022 +0300
@@ -1677,7 +1677,7 @@
     # Continuation handling
     if contopt:
         if not evolvestate:
-            raise error.Abort(_(b'no interrupted evolve to continue'))
+            raise compat.StateError(_(b'no interrupted evolve to continue'))
         evolvestate.load()
         headnode = continueevolve(ui, repo, evolvestate)
         if evolvestate[b'command'] != b'evolve':
@@ -1689,7 +1689,7 @@
         evolvestate.delete()
     elif stopopt:
         if not evolvestate:
-            raise error.Abort(_(b'no interrupted evolve to stop'))
+            raise compat.StateError(_(b'no interrupted evolve to stop'))
         evolvestate.load()
         stopevolve(ui, repo, evolvestate)
         if evolvestate[b'command'] != b'evolve':
@@ -1699,7 +1699,7 @@
         evolvestate.delete()
     elif abortopt:
         if not evolvestate:
-            raise error.Abort(_(b'no interrupted evolve to abort'))
+            raise compat.StateError(_(b'no interrupted evolve to abort'))
         evolvestate.load()
         # `hg next --evolve` in play
         if evolvestate[b'command'] != b'evolve':
--- a/tests/test-evolve-abort-orphan.t	Wed Mar 23 00:21:41 2022 +0300
+++ b/tests/test-evolve-abort-orphan.t	Wed Mar 23 00:25:38 2022 +0300
@@ -60,7 +60,7 @@
 #if abortflag
   $ hg evolve --abort
   abort: no interrupted evolve to abort
-  [255]
+  [20]
 #else
   $ hg abort
   abort: no operation in progress
--- a/tests/test-evolve-stop-orphan.t	Wed Mar 23 00:21:41 2022 +0300
+++ b/tests/test-evolve-stop-orphan.t	Wed Mar 23 00:25:38 2022 +0300
@@ -48,7 +48,7 @@
 
   $ hg evolve --stop
   abort: no interrupted evolve to stop
-  [255]
+  [20]
 
 Testing with wrong combinations of flags
 ========================================
--- a/tests/test-next-abort.t	Wed Mar 23 00:21:41 2022 +0300
+++ b/tests/test-next-abort.t	Wed Mar 23 00:25:38 2022 +0300
@@ -39,7 +39,7 @@
   [20]
   $ hg evolve --abort
   abort: no interrupted evolve to abort
-  [255]
+  [20]
 
   $ hg next --abort --move-bookmark
   abort: cannot specify both --abort and --move-bookmark