# HG changeset patch # User Anton Shestakov # Date 1647982934 -10800 # Node ID b4e1d34ad1e99a0dd4f1adb39b7b3004b27fff48 # Parent a2491c578d2b3eb2e26a38d094a3d0ccfa90163a pick: use compat.StateError for missing state file diff -r a2491c578d2b -r b4e1d34ad1e9 hgext3rd/evolve/cmdrewrite.py --- a/hgext3rd/evolve/cmdrewrite.py Tue May 24 10:24:36 2022 +0400 +++ b/hgext3rd/evolve/cmdrewrite.py Wed Mar 23 00:02:14 2022 +0300 @@ -1367,7 +1367,7 @@ raise error.Abort(_(b"cannot specify both --continue and " b"revision")) if not pickstate: - raise error.Abort(_(b"no interrupted pick state exists")) + raise compat.StateError(_(b"no interrupted pick state exists")) pickstate.load() orignode = pickstate[b'orignode'] @@ -1442,7 +1442,7 @@ def abortpick(ui, repo, pickstate, abortcmd=False): """logic to abort pick""" if not pickstate and not abortcmd: - raise error.Abort(_(b"no interrupted pick state exists")) + raise compat.StateError(_(b"no interrupted pick state exists")) pickstate.load() pctxnode = pickstate[b'oldpctx'] compat.clean_update(repo[pctxnode]) diff -r a2491c578d2b -r b4e1d34ad1e9 tests/test-pick.t --- a/tests/test-pick.t Tue May 24 10:24:36 2022 +0400 +++ b/tests/test-pick.t Wed Mar 23 00:02:14 2022 +0300 @@ -83,7 +83,7 @@ $ hg pick --continue abort: no interrupted pick state exists - [255] + [20] #if abortcontinuecommand $ hg continue abort: no operation in progress @@ -94,7 +94,7 @@ $ hg pick --abort abort: no interrupted pick state exists - [255] + [20] #if abortcontinuecommand $ hg abort abort: no operation in progress