Mercurial > hg
comparison tests/test-bundle-type.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 | 89630d0b3e23 |
children | 471cd86c8eb4 |
comparison
equal
deleted
inserted
replaced
45826:21733e8c924f | 45827:8d72e29ad1e0 |
---|---|
32 $ cd t3 | 32 $ cd t3 |
33 $ hg -q unbundle ../b1 | 33 $ hg -q unbundle ../b1 |
34 $ hg bundle -a -t unknown out.hg | 34 $ hg bundle -a -t unknown out.hg |
35 abort: unknown is not a recognized bundle specification | 35 abort: unknown is not a recognized bundle specification |
36 (see 'hg help bundlespec' for supported values for --type) | 36 (see 'hg help bundlespec' for supported values for --type) |
37 [255] | 37 [10] |
38 | 38 |
39 $ hg bundle -a -t unknown-v2 out.hg | 39 $ hg bundle -a -t unknown-v2 out.hg |
40 abort: unknown compression is not supported | 40 abort: unknown compression is not supported |
41 (see 'hg help bundlespec' for supported values for --type) | 41 (see 'hg help bundlespec' for supported values for --type) |
42 [255] | 42 [10] |
43 | 43 |
44 $ cd .. | 44 $ cd .. |
45 | 45 |
46 test bundle types | 46 test bundle types |
47 | 47 |
197 zstd-v1 always fails | 197 zstd-v1 always fails |
198 | 198 |
199 $ hg -R tzstd bundle -a -t zstd-v1 zstd-v1 | 199 $ hg -R tzstd bundle -a -t zstd-v1 zstd-v1 |
200 abort: compression engine zstd is not supported on v1 bundles | 200 abort: compression engine zstd is not supported on v1 bundles |
201 (see 'hg help bundlespec' for supported values for --type) | 201 (see 'hg help bundlespec' for supported values for --type) |
202 [255] | 202 [10] |
203 | 203 |
204 #else | 204 #else |
205 | 205 |
206 zstd is a valid engine but isn't available | 206 zstd is a valid engine but isn't available |
207 | 207 |
226 | 226 |
227 $ cd t1 | 227 $ cd t1 |
228 $ hg bundle -a -t garbage ../bgarbage | 228 $ hg bundle -a -t garbage ../bgarbage |
229 abort: garbage is not a recognized bundle specification | 229 abort: garbage is not a recognized bundle specification |
230 (see 'hg help bundlespec' for supported values for --type) | 230 (see 'hg help bundlespec' for supported values for --type) |
231 [255] | 231 [10] |
232 $ cd .. | 232 $ cd .. |