diff --git a/mercurial/commands.py b/mercurial/commands.py --- a/mercurial/commands.py +++ b/mercurial/commands.py @@ -1081,7 +1081,7 @@ raise error.StateError(_(b'current bisect revision is a merge')) if rev: if not nodes: - raise error.Abort(_(b'empty revision set')) + raise error.InputError(_(b'empty revision set')) node = repo[nodes[-1]].node() with hbisect.restore_state(repo, state, node): while changesets: diff --git a/mercurial/scmutil.py b/mercurial/scmutil.py --- a/mercurial/scmutil.py +++ b/mercurial/scmutil.py @@ -689,7 +689,7 @@ l = revrange(repo, [revspec], localalias=localalias) if not l: - raise error.Abort(_(b'empty revision set')) + raise error.InputError(_(b'empty revision set')) return repo[l.last()] @@ -710,7 +710,7 @@ l = revrange(repo, revs) if not l: - raise error.Abort(_(b'empty revision range')) + raise error.InputError(_(b'empty revision range')) first = l.first() second = l.last() @@ -720,7 +720,7 @@ and len(revs) >= 2 and not all(revrange(repo, [r]) for r in revs) ): - raise error.Abort(_(b'empty revision on one side of range')) + raise error.InputError(_(b'empty revision on one side of range')) # if top-level is range expression, the result must always be a pair if first == second and len(revs) == 1 and not _pairspec(revs[0]): diff --git a/tests/test-diff-change.t b/tests/test-diff-change.t --- a/tests/test-diff-change.t +++ b/tests/test-diff-change.t @@ -119,7 +119,7 @@ +wdir $ hg diff -r "2 and 1" abort: empty revision range - [255] + [10] $ cd .. diff --git a/tests/test-extdiff.t b/tests/test-extdiff.t --- a/tests/test-extdiff.t +++ b/tests/test-extdiff.t @@ -87,7 +87,7 @@ $ hg extdiff -p diff --patch --rev 'ancestor()' --rev 1 abort: empty revision on one side of range - [255] + [10] Test diff during merge: diff --git a/tests/test-rebase-parameters.t b/tests/test-rebase-parameters.t --- a/tests/test-rebase-parameters.t +++ b/tests/test-rebase-parameters.t @@ -132,7 +132,7 @@ $ hg rebase --dest '1 & !1' abort: empty revision set - [255] + [10] These work: diff --git a/tests/test-revset2.t b/tests/test-revset2.t --- a/tests/test-revset2.t +++ b/tests/test-revset2.t @@ -840,7 +840,7 @@ $ hg diff -r 'author("babar") or author("celeste")' abort: empty revision range - [255] + [10] aliases: