Mercurial > hg
comparison tests/test-commit.t @ 45895:fc4fb2f17dd4
errors: use exit code 10 for parse errors
Now that `ParseError`s raised while reading the config file has been
converted into `ConfigError`s, the remaining parse errors should all
be "input errors" (i.e. exit code 10), according to
https://www.mercurial-scm.org/wiki/ErrorCategoriesPlan.
Differential Revision: https://phab.mercurial-scm.org/D9332
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Mon, 16 Nov 2020 16:00:50 -0800 |
parents | ac362d5a7893 |
children | 95c4cca641f6 |
comparison
equal
deleted
inserted
replaced
45894:9dc1351d0b5f | 45895:fc4fb2f17dd4 |
---|---|
14 [10] | 14 [10] |
15 $ hg commit -d '0 0' -m commit-1 | 15 $ hg commit -d '0 0' -m commit-1 |
16 $ echo foo >> foo | 16 $ echo foo >> foo |
17 $ hg commit -d '1 4444444' -m commit-3 | 17 $ hg commit -d '1 4444444' -m commit-3 |
18 hg: parse error: impossible time zone offset: 4444444 | 18 hg: parse error: impossible time zone offset: 4444444 |
19 [255] | 19 [10] |
20 $ hg commit -d '1 15.1' -m commit-4 | 20 $ hg commit -d '1 15.1' -m commit-4 |
21 hg: parse error: invalid date: '1\t15.1' | 21 hg: parse error: invalid date: '1\t15.1' |
22 [255] | 22 [10] |
23 $ hg commit -d 'foo bar' -m commit-5 | 23 $ hg commit -d 'foo bar' -m commit-5 |
24 hg: parse error: invalid date: 'foo bar' | 24 hg: parse error: invalid date: 'foo bar' |
25 [255] | 25 [10] |
26 $ hg commit -d ' 1 4444' -m commit-6 | 26 $ hg commit -d ' 1 4444' -m commit-6 |
27 $ hg commit -d '111111111111 0' -m commit-7 | 27 $ hg commit -d '111111111111 0' -m commit-7 |
28 hg: parse error: date exceeds 32 bits: 111111111111 | 28 hg: parse error: date exceeds 32 bits: 111111111111 |
29 [255] | 29 [10] |
30 $ hg commit -d '-111111111111 0' -m commit-7 | 30 $ hg commit -d '-111111111111 0' -m commit-7 |
31 hg: parse error: date exceeds 32 bits: -111111111111 | 31 hg: parse error: date exceeds 32 bits: -111111111111 |
32 [255] | 32 [10] |
33 $ echo foo >> foo | 33 $ echo foo >> foo |
34 $ hg commit -d '1901-12-13 20:45:52 +0000' -m commit-7-2 | 34 $ hg commit -d '1901-12-13 20:45:52 +0000' -m commit-7-2 |
35 $ echo foo >> foo | 35 $ echo foo >> foo |
36 $ hg commit -d '-2147483648 0' -m commit-7-3 | 36 $ hg commit -d '-2147483648 0' -m commit-7-3 |
37 $ hg log -T '{rev} {date|isodatesec}\n' -l2 | 37 $ hg log -T '{rev} {date|isodatesec}\n' -l2 |
38 3 1901-12-13 20:45:52 +0000 | 38 3 1901-12-13 20:45:52 +0000 |
39 2 1901-12-13 20:45:52 +0000 | 39 2 1901-12-13 20:45:52 +0000 |
40 $ hg commit -d '1901-12-13 20:45:51 +0000' -m commit-7 | 40 $ hg commit -d '1901-12-13 20:45:51 +0000' -m commit-7 |
41 hg: parse error: date exceeds 32 bits: -2147483649 | 41 hg: parse error: date exceeds 32 bits: -2147483649 |
42 [255] | 42 [10] |
43 $ hg commit -d '-2147483649 0' -m commit-7 | 43 $ hg commit -d '-2147483649 0' -m commit-7 |
44 hg: parse error: date exceeds 32 bits: -2147483649 | 44 hg: parse error: date exceeds 32 bits: -2147483649 |
45 [255] | 45 [10] |
46 | 46 |
47 commit added file that has been deleted | 47 commit added file that has been deleted |
48 | 48 |
49 $ echo bar > bar | 49 $ echo bar > bar |
50 $ hg add bar | 50 $ hg add bar |