From patchwork Thu Sep 23 18:26:03 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: D11498: errors: use InputError for bad path arguments to `hg annotate` From: phabricator X-Patchwork-Id: 49815 Message-Id: To: Phabricator Cc: mercurial-devel@mercurial-scm.org Date: Thu, 23 Sep 2021 18:26:03 +0000 martinvonz created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D11498 AFFECTED FILES mercurial/commands.py tests/test-annotate.t tests/test-fastannotate-hg.t CHANGE DETAILS To: martinvonz, #hg-reviewers Cc: mercurial-patches, mercurial-devel diff --git a/tests/test-fastannotate-hg.t b/tests/test-fastannotate-hg.t --- a/tests/test-fastannotate-hg.t +++ b/tests/test-fastannotate-hg.t @@ -458,7 +458,7 @@ $ hg ann nosuchfile abort: nosuchfile: no such file in rev e9e6b4fa872f - [255] + [10] annotate file without '\n' on last line diff --git a/tests/test-annotate.t b/tests/test-annotate.t --- a/tests/test-annotate.t +++ b/tests/test-annotate.t @@ -455,7 +455,7 @@ $ hg ann nosuchfile abort: nosuchfile: no such file in rev e9e6b4fa872f - [255] + [10] annotate file without '\n' on last line diff --git a/mercurial/commands.py b/mercurial/commands.py --- a/mercurial/commands.py +++ b/mercurial/commands.py @@ -526,7 +526,7 @@ ) def bad(x, y): - raise error.Abort(b"%s: %s" % (x, y)) + raise error.InputError(b"%s: %s" % (x, y)) m = scmutil.match(ctx, pats, opts, badfn=bad)