diff mercurial/hbisect.py @ 45875:e641bb2a6159

errors: raise StateError in `hg bisect` Differential Revision: https://phab.mercurial-scm.org/D9337
author Martin von Zweigbergk <martinvonz@google.com>
date Tue, 17 Nov 2020 15:42:42 -0800
parents 9d2b2df2c2ba
children d4ba4d51f85f
line wrap: on
line diff
--- a/mercurial/hbisect.py	Tue Nov 17 15:37:18 2020 -0800
+++ b/mercurial/hbisect.py	Tue Nov 17 15:42:42 2020 -0800
@@ -172,13 +172,13 @@
 def checkstate(state):
     """check we have both 'good' and 'bad' to define a range
 
-    Raise Abort exception otherwise."""
+    Raise StateError exception otherwise."""
     if state[b'good'] and state[b'bad']:
         return True
     if not state[b'good']:
-        raise error.Abort(_(b'cannot bisect (no known good revisions)'))
+        raise error.StateError(_(b'cannot bisect (no known good revisions)'))
     else:
-        raise error.Abort(_(b'cannot bisect (no known bad revisions)'))
+        raise error.StateError(_(b'cannot bisect (no known bad revisions)'))
 
 
 @contextlib.contextmanager