comparison tests/test-histedit-edit.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 6f8a94bbfba1
children f27a83399abb
comparison
equal deleted inserted replaced
46416:bc3f3b59d0a4 46417:768056549737
373 transaction abort! 373 transaction abort!
374 rollback completed 374 rollback completed
375 note: commit message saved in .hg/last-message.txt 375 note: commit message saved in .hg/last-message.txt
376 note: use 'hg commit --logfile .hg/last-message.txt --edit' to reuse it 376 note: use 'hg commit --logfile .hg/last-message.txt --edit' to reuse it
377 abort: pretxncommit.unexpectedabort hook exited with status 1 377 abort: pretxncommit.unexpectedabort hook exited with status 1
378 [255] 378 [40]
379 $ cat .hg/last-message.txt 379 $ cat .hg/last-message.txt
380 f 380 f
381 381
382 382
383 check saving last-message.txt 383 check saving last-message.txt
398 transaction abort! 398 transaction abort!
399 rollback completed 399 rollback completed
400 note: commit message saved in .hg/last-message.txt 400 note: commit message saved in .hg/last-message.txt
401 note: use 'hg commit --logfile .hg/last-message.txt --edit' to reuse it 401 note: use 'hg commit --logfile .hg/last-message.txt --edit' to reuse it
402 abort: pretxncommit.unexpectedabort hook exited with status 1 402 abort: pretxncommit.unexpectedabort hook exited with status 1
403 [255] 403 [40]
404 404
405 $ cat >> .hg/hgrc <<EOF 405 $ cat >> .hg/hgrc <<EOF
406 > [hooks] 406 > [hooks]
407 > pretxncommit.unexpectedabort = 407 > pretxncommit.unexpectedabort =
408 > EOF 408 > EOF