diff tests/test-commit.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 0f01394457a0
children 96ca817ec192
line wrap: on
line diff
--- a/tests/test-commit.t	Wed Oct 21 19:00:16 2020 -0700
+++ b/tests/test-commit.t	Tue Oct 06 22:36:15 2020 -0700
@@ -11,7 +11,7 @@
   $ HGEDITOR="sh $TESTTMP/checkeditform.sh" hg commit -m ""
   HGEDITFORM=commit.normal.normal
   abort: empty commit message
-  [255]
+  [10]
   $ hg commit -d '0 0' -m commit-1
   $ echo foo >> foo
   $ hg commit -d '1 4444444' -m commit-3
@@ -370,7 +370,7 @@
   HG: changed changed
   HG: removed removed
   abort: empty commit message
-  [255]
+  [10]
 
 test saving last-message.txt
 
@@ -456,7 +456,7 @@
   HG: subrepo 'sub' is changed
   HG: subrepo 'sub2' is changed
   abort: empty commit message
-  [255]
+  [10]
 
   $ cat >> .hg/hgrc <<EOF
   > [committemplate]
@@ -471,7 +471,7 @@
   HG: Leave message empty to abort commit.
   HG: no bookmark is activated
   abort: empty commit message
-  [255]
+  [10]
 
   $ cat >> .hg/hgrc <<EOF
   > [committemplate]
@@ -484,7 +484,7 @@
   HG: Leave message empty to abort commit.
   HG: no bookmark is activated
   abort: empty commit message
-  [255]
+  [10]
 
   $ cat >> .hg/hgrc <<EOF
   > [committemplate]
@@ -734,7 +734,7 @@
   $ hg add foo2
   $ HGEDITOR="sh $TESTTMP/notouching.sh" hg commit
   abort: commit message unchanged
-  [255]
+  [10]
 
   $ cd ..
 
@@ -762,7 +762,7 @@
   $ hg add foo2
   $ HGEDITOR="sh $TESTTMP/notouching.sh" hg ci
   abort: commit message unchanged
-  [255]
+  [10]
   $ HGEDITOR="sh $TESTTMP/lowercaseline.sh" hg ci
   first line
   HG: this is customized commit template