comparison tests/test-status-terse.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 09b09fe7ee90
children b7fde9237c92
comparison
equal deleted inserted replaced
45826:21733e8c924f 45827:8d72e29ad1e0
22 ? b 22 ? b
23 ? x/aa.o 23 ? x/aa.o
24 ? x/bb.o 24 ? x/bb.o
25 $ hg status --terse f 25 $ hg status --terse f
26 abort: 'f' not recognized 26 abort: 'f' not recognized
27 [255] 27 [10]
28 28
29 Add a .hgignore so that we can also have ignored files 29 Add a .hgignore so that we can also have ignored files
30 30
31 $ echo ".*\.o" > .hgignore 31 $ echo ".*\.o" > .hgignore
32 $ hg status 32 $ hg status
222 222
223 Trying with --rev 223 Trying with --rev
224 224
225 $ hg status --terse marduic --rev 0 --rev 1 225 $ hg status --terse marduic --rev 0 --rev 1
226 abort: cannot use --terse with --rev 226 abort: cannot use --terse with --rev
227 [255] 227 [10]
228 228
229 Config item to set the default terseness 229 Config item to set the default terseness
230 $ cat <<EOF >> $HGRCPATH 230 $ cat <<EOF >> $HGRCPATH
231 > [commands] 231 > [commands]
232 > status.terse = u 232 > status.terse = u