hgbook

diff it/examples/ch09-hook.ws.simple.it @ 812:42e2c9d47ef4

Minor changes and translation of code snippets for Ch.12.
author Giulio@puck
date Sat Aug 15 15:15:39 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/ch09-hook.ws.simple.it	Sat Aug 15 15:15:39 2009 +0200
     1.3 @@ -0,0 +1,14 @@
     1.4 +<!-- BEGIN ch09/hook.ws.simple -->
     1.5 +<screen><prompt>$</prompt> <userinput>cat .hg/hgrc</userinput>
     1.6 +[hooks]
     1.7 +pretxncommit.spazio_bianco = hg export tip | (! egrep -q '^\+.*[ \t]$')
     1.8 +<prompt>$</prompt> <userinput>echo 'a ' &gt; a</userinput>
     1.9 +<prompt>$</prompt> <userinput>hg commit -A -m 'Collaudo con spazio bianco in coda.'</userinput>
    1.10 +aggiungo a
    1.11 +transazione abortita!
    1.12 +ripristino completato
    1.13 +fallimento: l'hook pretxncommit.spazio_bianco รจ terminato con codice di stato 1
    1.14 +<prompt>$</prompt> <userinput>echo 'a' &gt; a</userinput>
    1.15 +<prompt>$</prompt> <userinput>hg commit -A -m 'Elimina lo spazio bianco in coda e riprova.'</userinput>
    1.16 +</screen>
    1.17 +<!-- END ch09/hook.ws.simple -->