diff tests/test-graft-interrupted.t @ 45827:8d72e29ad1e0

errors: introduce InputError and use it from commands and cmdutil This patch introduces a `InputError` class and replaces many uses of `error.Abort` by it in `commands` and `cmdutil`. This is a part of https://www.mercurial-scm.org/wiki/ErrorCategoriesPlan. There will later be a different class for state errors (to raise e.g. when there's an unfinished operation). It's not always clear when one should report an input error and when it should be a state error. We can always adjust later if I got something wrong in this patch (but feel free to point out any you notice now). Differential Revision: https://phab.mercurial-scm.org/D9167
author Martin von Zweigbergk <martinvonz@google.com>
date Tue, 06 Oct 2020 22:36:15 -0700
parents 85b03b1e4715
children 527ce85c2e60
line wrap: on
line diff
--- a/tests/test-graft-interrupted.t	Wed Oct 21 19:00:16 2020 -0700
+++ b/tests/test-graft-interrupted.t	Tue Oct 06 22:36:15 2020 -0700
@@ -250,17 +250,17 @@
 
   $ hg graft --stop --continue
   abort: cannot specify both --stop and --continue
-  [255]
+  [10]
 
   $ hg graft --stop -U
   abort: cannot specify both --stop and --user
-  [255]
+  [10]
   $ hg graft --stop --rev 4
   abort: cannot specify both --stop and --rev
-  [255]
+  [10]
   $ hg graft --stop --log
   abort: cannot specify both --stop and --log
-  [255]
+  [10]
 
   $ hg graft --stop
   stopped the interrupted graft
@@ -356,19 +356,19 @@
 
   $ hg graft --continue --abort
   abort: cannot specify both --abort and --continue
-  [255]
+  [10]
 
   $ hg graft --abort --stop
   abort: cannot specify both --abort and --stop
-  [255]
+  [10]
 
   $ hg graft --abort --currentuser
   abort: cannot specify both --abort and --user
-  [255]
+  [10]
 
   $ hg graft --abort --edit
   abort: cannot specify both --abort and --edit
-  [255]
+  [10]
 
 #if abortcommand
 when in dry-run mode
@@ -554,15 +554,15 @@
 
   $ hg graft 1 --no-commit -e
   abort: cannot specify both --no-commit and --edit
-  [255]
+  [10]
 
   $ hg graft 1 --no-commit --log
   abort: cannot specify both --no-commit and --log
-  [255]
+  [10]
 
   $ hg graft 1 --no-commit -D
   abort: cannot specify both --no-commit and --currentdate
-  [255]
+  [10]
 
 Test --no-commit is working:
   $ hg graft 1 --no-commit