comparison tests/test-identify.t @ 45846: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 6ecfd12f09cd
children 95c4cca641f6
comparison
equal deleted inserted replaced
45845:21733e8c924f 45846:8d72e29ad1e0
4 4
5 no repo 5 no repo
6 6
7 $ hg id 7 $ hg id
8 abort: there is no Mercurial repository here (.hg not found) 8 abort: there is no Mercurial repository here (.hg not found)
9 [255] 9 [10]
10 10
11 #endif 11 #endif
12 12
13 create repo 13 create repo
14 14
113 113
114 remote with rev number? 114 remote with rev number?
115 115
116 $ hg id -n http://localhost:$HGPORT1/ 116 $ hg id -n http://localhost:$HGPORT1/
117 abort: can't query remote revision number, branch, or tags 117 abort: can't query remote revision number, branch, or tags
118 [255] 118 [10]
119 119
120 remote with tags? 120 remote with tags?
121 121
122 $ hg id -t http://localhost:$HGPORT1/ 122 $ hg id -t http://localhost:$HGPORT1/
123 abort: can't query remote revision number, branch, or tags 123 abort: can't query remote revision number, branch, or tags
124 [255] 124 [10]
125 125
126 remote with branch? 126 remote with branch?
127 127
128 $ hg id -b http://localhost:$HGPORT1/ 128 $ hg id -b http://localhost:$HGPORT1/
129 abort: can't query remote revision number, branch, or tags 129 abort: can't query remote revision number, branch, or tags
130 [255] 130 [10]
131 131
132 test bookmark support 132 test bookmark support
133 133
134 $ hg bookmark Y 134 $ hg bookmark Y
135 $ hg bookmark Z 135 $ hg bookmark Z