comparison tests/test-log.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 ed84a4d48910
children 95c4cca641f6
comparison
equal deleted inserted replaced
45894:9dc1351d0b5f 45895:fc4fb2f17dd4
1061 1061
1062 log -r "" 1062 log -r ""
1063 1063
1064 $ hg log -r '' 1064 $ hg log -r ''
1065 hg: parse error: empty query 1065 hg: parse error: empty query
1066 [255] 1066 [10]
1067 1067
1068 log -r <some unknown node id> 1068 log -r <some unknown node id>
1069 1069
1070 $ hg log -r 1000000000000000000000000000000000000000 1070 $ hg log -r 1000000000000000000000000000000000000000
1071 abort: unknown revision '1000000000000000000000000000000000000000'! 1071 abort: unknown revision '1000000000000000000000000000000000000000'!
2433 simple error 2433 simple error
2434 $ hg log -r . -T '{shortest(node}' 2434 $ hg log -r . -T '{shortest(node}'
2435 hg: parse error at 14: unexpected token: end 2435 hg: parse error at 14: unexpected token: end
2436 ({shortest(node} 2436 ({shortest(node}
2437 ^ here) 2437 ^ here)
2438 [255] 2438 [10]
2439 2439
2440 multi-line template with error 2440 multi-line template with error
2441 $ hg log -r . -T 'line 1 2441 $ hg log -r . -T 'line 1
2442 > line2 2442 > line2
2443 > {shortest(node} 2443 > {shortest(node}
2444 > line4\nline5' 2444 > line4\nline5'
2445 hg: parse error at 27: unexpected token: end 2445 hg: parse error at 27: unexpected token: end
2446 (line 1\nline2\n{shortest(node}\nline4\nline5 2446 (line 1\nline2\n{shortest(node}\nline4\nline5
2447 ^ here) 2447 ^ here)
2448 [255] 2448 [10]
2449 2449
2450 $ cd .. 2450 $ cd ..
2451 2451
2452 New namespace is registered per repo instance, but the template keyword 2452 New namespace is registered per repo instance, but the template keyword
2453 is global. So we shouldn't expect the namespace always exists. Using 2453 is global. So we shouldn't expect the namespace always exists. Using