Mercurial > hg-stable
diff hgext/uncommit.py @ 46526:0e2becd1fe0c
errors: use InputError in uncommit extension
Differential Revision: https://phab.mercurial-scm.org/D9911
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Fri, 29 Jan 2021 15:51:00 -0800 |
parents | 59fa3890d40a |
children | d55b71393907 |
line wrap: on
line diff
--- a/hgext/uncommit.py Mon Feb 01 11:41:10 2021 +0100 +++ b/hgext/uncommit.py Fri Jan 29 15:51:00 2021 -0800 @@ -175,7 +175,7 @@ old = repo[b'.'] rewriteutil.precheck(repo, [old.rev()], b'uncommit') if len(old.parents()) > 1: - raise error.Abort(_(b"cannot uncommit merge changeset")) + raise error.InputError(_(b"cannot uncommit merge changeset")) match = scmutil.match(old, pats, opts) @@ -202,7 +202,7 @@ else: hint = _(b"file does not exist") - raise error.Abort( + raise error.InputError( _(b'cannot uncommit "%s"') % scmutil.getuipathfn(repo)(f), hint=hint, ) @@ -280,7 +280,7 @@ markers = list(predecessormarkers(curctx)) if len(markers) != 1: e = _(b"changeset must have one predecessor, found %i predecessors") - raise error.Abort(e % len(markers)) + raise error.InputError(e % len(markers)) prednode = markers[0].prednode() predctx = unfi[prednode]