Mercurial > hg
comparison tests/test-rebase-interruptions.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 | 21733e8c924f |
children |
comparison
equal
deleted
inserted
replaced
46416:bc3f3b59d0a4 | 46417:768056549737 |
---|---|
348 $ hg rebase --source 2 --dest 5 --tool internal:other --config 'hooks.precommit=hg status | grep "M A"' | 348 $ hg rebase --source 2 --dest 5 --tool internal:other --config 'hooks.precommit=hg status | grep "M A"' |
349 rebasing 2:965c486023db "C" | 349 rebasing 2:965c486023db "C" |
350 M A | 350 M A |
351 rebasing 6:a0b2430ebfb8 tip "F" | 351 rebasing 6:a0b2430ebfb8 tip "F" |
352 abort: precommit hook exited with status 1 | 352 abort: precommit hook exited with status 1 |
353 [255] | 353 [40] |
354 $ hg tglogp | 354 $ hg tglogp |
355 @ 7: 401ccec5e39f secret 'C' | 355 @ 7: 401ccec5e39f secret 'C' |
356 | | 356 | |
357 | o 6: a0b2430ebfb8 secret 'F' | 357 | o 6: a0b2430ebfb8 secret 'F' |
358 | | | 358 | | |
399 summary: C | 399 summary: C |
400 rebasing 6:a0b2430ebfb8 tip "F" | 400 rebasing 6:a0b2430ebfb8 tip "F" |
401 transaction abort! | 401 transaction abort! |
402 rollback completed | 402 rollback completed |
403 abort: pretxncommit hook exited with status 1 | 403 abort: pretxncommit hook exited with status 1 |
404 [255] | 404 [40] |
405 $ hg tglogp | 405 $ hg tglogp |
406 @ 7: 401ccec5e39f secret 'C' | 406 @ 7: 401ccec5e39f secret 'C' |
407 | | 407 | |
408 | o 6: a0b2430ebfb8 secret 'F' | 408 | o 6: a0b2430ebfb8 secret 'F' |
409 | | | 409 | | |
449 summary: C | 449 summary: C |
450 rebasing 6:a0b2430ebfb8 tip "F" | 450 rebasing 6:a0b2430ebfb8 tip "F" |
451 transaction abort! | 451 transaction abort! |
452 rollback completed | 452 rollback completed |
453 abort: pretxnclose hook exited with status 1 | 453 abort: pretxnclose hook exited with status 1 |
454 [255] | 454 [40] |
455 $ hg tglogp | 455 $ hg tglogp |
456 @ 7: 401ccec5e39f secret 'C' | 456 @ 7: 401ccec5e39f secret 'C' |
457 | | 457 | |
458 | o 6: a0b2430ebfb8 secret 'F' | 458 | o 6: a0b2430ebfb8 secret 'F' |
459 | | | 459 | | |