hgbook / it / examples / ch09-hook.ws.better.it

<!-- BEGIN ch09/hook.ws.better -->
<screen><prompt>$</prompt> <userinput>cat .hg/hgrc</userinput>
pretxncommit.spazio_bianco = .hg/controllo_spazio_bianco.py
<prompt>$</prompt> <userinput>echo 'a ' &gt;&gt; a</userinput>
<prompt>$</prompt> <userinput>hg commit -A -m "Aggiunge una nuova riga con spazio bianco in coda."</userinput>
a, riga 1: aggiunto spazio bianco in coda
messaggio di commit salvato nel file .hg/commit.save
transazione abortita!
ripristino completato
fallimento: l'hook pretxncommit.spazio_bianco è terminato con codice di stato 1
<prompt>$</prompt> <userinput>sed -i 's, *$,,' a</userinput>
<prompt>$</prompt> <userinput>hg commit -A -m "Rimosso spazio bianco in coda."</userinput>
<!-- END ch09/hook.ws.better -->
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.