errors: use InputError for bad path arguments to `hg annotate`
authorMartin von Zweigbergk <martinvonz@google.com>
Thu, 23 Sep 2021 09:42:20 -0700
changeset 48032 12966768595a
parent 48031 5b89626c11e9
child 48033 62f325f9b347
errors: use InputError for bad path arguments to `hg annotate` Differential Revision: https://phab.mercurial-scm.org/D11498
mercurial/commands.py
tests/test-annotate.t
tests/test-fastannotate-hg.t
--- a/mercurial/commands.py	Thu Sep 23 09:40:01 2021 -0700
+++ b/mercurial/commands.py	Thu Sep 23 09:42:20 2021 -0700
@@ -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)
 
--- a/tests/test-annotate.t	Thu Sep 23 09:40:01 2021 -0700
+++ b/tests/test-annotate.t	Thu Sep 23 09:42:20 2021 -0700
@@ -455,7 +455,7 @@
 
   $ hg ann nosuchfile
   abort: nosuchfile: no such file in rev e9e6b4fa872f
-  [255]
+  [10]
 
 annotate file without '\n' on last line
 
--- a/tests/test-fastannotate-hg.t	Thu Sep 23 09:40:01 2021 -0700
+++ b/tests/test-fastannotate-hg.t	Thu Sep 23 09:42:20 2021 -0700
@@ -458,7 +458,7 @@
 
   $ hg ann nosuchfile
   abort: nosuchfile: no such file in rev e9e6b4fa872f
-  [255]
+  [10]
 
 annotate file without '\n' on last line