diff --git a/hgext/uncommit.py b/hgext/uncommit.py --- a/hgext/uncommit.py +++ b/hgext/uncommit.py @@ -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] diff --git a/tests/test-unamend.t b/tests/test-unamend.t --- a/tests/test-unamend.t +++ b/tests/test-unamend.t @@ -39,7 +39,7 @@ $ hg unamend abort: changeset must have one predecessor, found 0 predecessors - [255] + [10] Unamend on clean wdir and tip diff --git a/tests/test-uncommit.t b/tests/test-uncommit.t --- a/tests/test-uncommit.t +++ b/tests/test-uncommit.t @@ -114,12 +114,12 @@ $ hg uncommit nothinghere abort: cannot uncommit "nothinghere" (file does not exist) - [255] + [10] $ hg status $ hg uncommit file-abc abort: cannot uncommit "file-abc" (file was not changed in working directory parent) - [255] + [10] $ hg status Try partial uncommit, also moves bookmark @@ -419,7 +419,7 @@ $ hg uncommit abort: cannot uncommit merge changeset - [255] + [10] $ hg status $ hg log -G -T '{rev}:{node} {desc}' --hidden @@ -585,12 +585,12 @@ $ hg uncommit emptydir abort: cannot uncommit "emptydir" (file was untracked in working directory parent) - [255] + [10] $ cd emptydir $ hg uncommit . abort: cannot uncommit "emptydir" (file was untracked in working directory parent) - [255] + [10] $ hg status $ cd ..