hgbook

view it/examples/ch09-hook.ws.better.it @ 1038:aafcc7f42da9

1.4.2 zh translated
author Zhaoping Sun <zhaopingsun@gmail.com>
date Sun Nov 08 16:35:47 2009 -0500 (2009-11-08)
parents 7252e7b7f07d
children 719b03ea27c8
line source
1 <!-- BEGIN ch09/hook.ws.better -->
2 <screen><prompt>$</prompt> <userinput>cat .hg/hgrc</userinput>
3 [hooks]
4 pretxncommit.spazio_bianco = .hg/controllo_spazio_bianco.py
5 <prompt>$</prompt> <userinput>echo 'a ' &gt;&gt; a</userinput>
6 <prompt>$</prompt> <userinput>hg commit -A -m "Aggiunge una nuova riga con spazio bianco in coda."</userinput>
7 a, riga 1: aggiunto spazio bianco in coda
8 messaggio di commit salvato nel file .hg/commit.save
9 transazione abortita!
10 ripristino completato
11 fallimento: l'hook pretxncommit.spazio_bianco รจ terminato con codice di stato 1
12 <prompt>$</prompt> <userinput>sed -i 's, *$,,' a</userinput>
13 <prompt>$</prompt> <userinput>hg commit -A -m "Rimosso spazio bianco in coda."</userinput>
14 </screen>
15 <!-- END ch09/hook.ws.better -->