Mercurial > public > mercurial-scm > hg
diff tests/test-tag.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 | c6d31e659a28 |
children | 527ce85c2e60 |
line wrap: on
line diff
--- a/tests/test-tag.t Wed Oct 21 19:00:16 2020 -0700 +++ b/tests/test-tag.t Tue Oct 06 22:36:15 2020 -0700 @@ -30,7 +30,7 @@ $ hg tag ' ' abort: tag names cannot consist entirely of whitespace - [255] + [10] (this tests also that editor is not invoked, if '--edit' is not specified) @@ -61,7 +61,7 @@ $ hg revert .hgtags $ hg tag -r 0 x y z y y z abort: tag names must be unique - [255] + [10] $ hg tag tap nada dot tip abort: the name 'tip' is reserved [255] @@ -73,17 +73,17 @@ [255] $ hg tag "bleah" abort: tag 'bleah' already exists (use -f to force) - [255] + [10] $ hg tag "blecch" "bleah" abort: tag 'bleah' already exists (use -f to force) - [255] + [10] $ hg tag --remove "blecch" abort: tag 'blecch' does not exist - [255] + [10] $ hg tag --remove "bleah" "blecch" "blough" abort: tag 'blecch' does not exist - [255] + [10] $ hg tag -r 0 "bleah0" hook: tag changes detected @@ -105,13 +105,13 @@ $ hg tag "bleah " abort: tag 'bleah' already exists (use -f to force) - [255] + [10] $ hg tag " bleah" abort: tag 'bleah' already exists (use -f to force) - [255] + [10] $ hg tag " bleah" abort: tag 'bleah' already exists (use -f to force) - [255] + [10] $ hg tag -r 0 " bleahbleah " hook: tag changes detected hook: +A acb14030fe0a21b60322c440ad2d20cf7685a376 bleahbleah @@ -144,7 +144,7 @@ $ hg tag -l localblah $ hg tag "foobar" abort: working directory is not at a branch head (use -f to force) - [255] + [10] $ hg tag -f "foobar" hook: tag changes detected hook: +A acb14030fe0a21b60322c440ad2d20cf7685a376 foobar @@ -401,16 +401,16 @@ 0 files updated, 0 files merged, 2 files removed, 0 files unresolved $ hg tag nullrev abort: working directory is not at a branch head (use -f to force) - [255] + [10] $ hg init empty $ hg tag -R empty nullrev abort: cannot tag null revision - [255] + [10] $ hg tag -R empty -r 00000000000 -f nulltag abort: cannot tag null revision - [255] + [10] issue5539: pruned tags do not appear in .hgtags