Patchwork D11498: errors: use InputError for bad path arguments to `hg annotate`

login
register
mail settings
Submitter phabricator
Date Sept. 23, 2021, 6:26 p.m.
Message ID <differential-rev-PHID-DREV-ywrj2mvzmguwio5zfr6w-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/49815/
State Superseded
Headers show

Comments

phabricator - Sept. 23, 2021, 6:26 p.m.
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

Patch

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)