hgbook
diff it/examples/hook.msglen.go.it @ 804:16c50eea5366
Minor changes and translation of code snippets for Ch.14.
author | Giulio@puck |
---|---|
date | Sat Aug 15 03:01:38 2009 +0200 (2009-08-15) |
parents | |
children | 5bbebcdfb533 |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/it/examples/hook.msglen.go.it Sat Aug 15 03:01:38 2009 +0200 1.3 @@ -0,0 +1,13 @@ 1.4 +<!-- BEGIN hook.msglen.go --> 1.5 +<screen><prompt>$</prompt> <userinput>cat .hg/hgrc</userinput> 1.6 +[hooks] 1.7 +pretxncommit.lunghezza_messaggio = test `hg tip --template {desc} | wc -c` -ge 15 1.8 +<prompt>$</prompt> <userinput>echo a > a</userinput> 1.9 +<prompt>$</prompt> <userinput>hg add a</userinput> 1.10 +<prompt>$</prompt> <userinput>hg commit -A -m 'Troppo breve.'</userinput> 1.11 +transazione abortita! 1.12 +ripristino completato 1.13 +fallimento: l'hook pretxncommit.lunghezza_messaggio รจ terminato con codice di stato 1 1.14 +<prompt>$</prompt> <userinput>hg commit -A -m 'Abbastanza lungo.'</userinput> 1.15 +</screen> 1.16 +<!-- END hook.msglen.go -->