# HG changeset patch # User Anton Shestakov # Date 1647984338 -10800 # Node ID 917cd662ef6cc2bdc7987c1a11ad8793ace4d4e2 # Parent 889d21445ee997b1ebf83823af8787152c954255 evolve: use compat.StateError for missing state file diff -r 889d21445ee9 -r 917cd662ef6c hgext3rd/evolve/evolvecmd.py --- 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': diff -r 889d21445ee9 -r 917cd662ef6c tests/test-evolve-abort-orphan.t --- 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 diff -r 889d21445ee9 -r 917cd662ef6c tests/test-evolve-stop-orphan.t --- 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 ======================================== diff -r 889d21445ee9 -r 917cd662ef6c tests/test-next-abort.t --- 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