changeset 6207:aa9b0d8f268e

precheck: raise InputError, like the current upstream version
author Anton Shestakov <av6@dwimlabs.net>
date Sun, 27 Mar 2022 15:02:03 +0300
parents 2ec9c87e8574
children c834cfede900
files hgext3rd/evolve/rewriteutil.py
diffstat 1 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/hgext3rd/evolve/rewriteutil.py	Sat Mar 19 19:13:00 2022 +0300
+++ b/hgext3rd/evolve/rewriteutil.py	Sun Mar 27 15:02:03 2022 +0300
@@ -68,7 +68,7 @@
     if node.nullrev in revs:
         msg = _(b"cannot %s the null revision") % (action)
         hint = _(b"no changeset checked out")
-        raise error.Abort(msg, hint=hint)
+        raise compat.InputError(msg, hint=hint)
     if any(util.safehasattr(r, 'rev') for r in revs):
         msg = b"rewriteutil.precheck called with ctx not revs"
         repo.ui.develwarn(msg)
@@ -78,13 +78,13 @@
         summary = _formatrevs(repo, publicrevs)
         msg = _(b"cannot %s public changesets: %s") % (action, summary)
         hint = _(b"see 'hg help phases' for details")
-        raise error.Abort(msg, hint=hint)
+        raise compat.InputError(msg, hint=hint)
     newunstable = disallowednewunstable(repo, revs)
     if newunstable:
         msg = _(b"%s will orphan %i descendants")
         msg %= (action, len(newunstable))
         hint = _(b"see 'hg help evolution.instability'")
-        raise error.Abort(msg, hint=hint)
+        raise compat.InputError(msg, hint=hint)
     allowdivergence = compat.isenabled(repo, compat.allowdivergenceopt)
     if allowdivergence:
         return
@@ -111,7 +111,7 @@
                      b'overwrite this check') % (base, otherdiv, localdiv)
             hint = _(b"see 'hg help evolution.instability' for details "
                      b"on content-divergence")
-        raise error.Abort(msg, hint=hint)
+        raise compat.InputError(msg, hint=hint)
 
 def bookmarksupdater(repo, oldid, tr):
     """Return a callable update(newid) updating the current bookmark