Mercurial > hg
comparison tests/test-commandserver.t @ 46417:768056549737
errors: use exit code 40 for when a hook fails
A hook can be used for checking inputs, state, configuration,
security, etc., so it's unclear which of the existing exit codes to
use. Let's instead add one specifically for failed hooks. I picked 40.
Differential Revision: https://phab.mercurial-scm.org/D9910
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Fri, 29 Jan 2021 12:16:55 -0800 |
parents | f44b9c72f061 |
children | 40b51c28b242 |
comparison
equal
deleted
inserted
replaced
46416:bc3f3b59d0a4 | 46417:768056549737 |
---|---|
520 ... runcommand(server, [b'verify']) | 520 ... runcommand(server, [b'verify']) |
521 *** runcommand commit --config hooks.pretxncommit=false -mfoo | 521 *** runcommand commit --config hooks.pretxncommit=false -mfoo |
522 transaction abort! | 522 transaction abort! |
523 rollback completed | 523 rollback completed |
524 abort: pretxncommit hook exited with status 1 | 524 abort: pretxncommit hook exited with status 1 |
525 [255] | 525 [40] |
526 *** runcommand verify | 526 *** runcommand verify |
527 checking changesets | 527 checking changesets |
528 checking manifests | 528 checking manifests |
529 crosschecking files in changesets and manifests | 529 crosschecking files in changesets and manifests |
530 checking files | 530 checking files |
1011 ... runcommand(server, [b'verify', b'-q']) | 1011 ... runcommand(server, [b'verify', b'-q']) |
1012 *** runcommand commit --config hooks.pretxncommit=false -mfoo | 1012 *** runcommand commit --config hooks.pretxncommit=false -mfoo |
1013 transaction abort! | 1013 transaction abort! |
1014 rollback completed | 1014 rollback completed |
1015 abort: pretxncommit hook exited with status 1 | 1015 abort: pretxncommit hook exited with status 1 |
1016 [255] | 1016 [40] |
1017 *** runcommand log | 1017 *** runcommand log |
1018 *** runcommand verify -q | 1018 *** runcommand verify -q |
1019 | 1019 |
1020 (failure after finalization) | 1020 (failure after finalization) |
1021 | 1021 |
1055 ... runcommand(server, [b'verify', b'-q']) | 1055 ... runcommand(server, [b'verify', b'-q']) |
1056 *** runcommand commit --config hooks.pretxncommit=false -mfoo foo | 1056 *** runcommand commit --config hooks.pretxncommit=false -mfoo foo |
1057 transaction abort! | 1057 transaction abort! |
1058 rollback completed | 1058 rollback completed |
1059 abort: pretxncommit hook exited with status 1 | 1059 abort: pretxncommit hook exited with status 1 |
1060 [255] | 1060 [40] |
1061 *** runcommand log | 1061 *** runcommand log |
1062 0 bar (bar) | 1062 0 bar (bar) |
1063 *** runcommand verify -q | 1063 *** runcommand verify -q |
1064 | 1064 |
1065 (failure after finalization) | 1065 (failure after finalization) |