comparison tests/test-hook.t @ 31743:f610c3220eec

hook: fix name used in untrusted message The name used in the message we issue when a hook is untrusted was using "name" which is actually the hook type and not the name of the hook.
author Pierre-Yves David <pierre-yves.david@ens-lyon.org>
date Fri, 31 Mar 2017 11:02:05 +0200
parents 728d37353e1e
children 0fa30fbccc34
comparison
equal deleted inserted replaced
31742:f243b7fbeba5 31743:f610c3220eec
902 $ cat << EOF >> .hg/hgrc 902 $ cat << EOF >> .hg/hgrc
903 > [hooks] 903 > [hooks]
904 > txnclose.testing=echo txnclose hook called 904 > txnclose.testing=echo txnclose hook called
905 > EOF 905 > EOF
906 $ touch a && hg commit -Aqm a 906 $ touch a && hg commit -Aqm a
907 warning: untrusted hook txnclose not executed 907 warning: untrusted hook txnclose.testing not executed
908 $ hg log 908 $ hg log
909 changeset: 0:3903775176ed 909 changeset: 0:3903775176ed
910 tag: tip 910 tag: tip
911 user: test 911 user: test
912 date: Thu Jan 01 00:00:00 1970 +0000 912 date: Thu Jan 01 00:00:00 1970 +0000
921 > pretxnclose.testing=echo pre-txnclose hook called 921 > pretxnclose.testing=echo pre-txnclose hook called
922 > EOF 922 > EOF
923 $ touch b && hg commit -Aqm a 923 $ touch b && hg commit -Aqm a
924 transaction abort! 924 transaction abort!
925 rollback completed 925 rollback completed
926 abort: untrusted hook pretxnclose not executed 926 abort: untrusted hook pretxnclose.testing not executed
927 (see 'hg help config.trusted') 927 (see 'hg help config.trusted')
928 [255] 928 [255]
929 $ hg log 929 $ hg log
930 changeset: 0:3903775176ed 930 changeset: 0:3903775176ed
931 tag: tip 931 tag: tip