view en/examples/hook.ws.simple.out @ 273:00f69e8825c5

Bring book up to date with recent changes.
author Bryan O'Sullivan <bos@serpentine.com>
date Mon, 26 Nov 2007 12:24:53 -0800
parents e67251ac336f
children
line wrap: on
line source

$ \textbf{cat .hg/hgrc}
[hooks]
pretxncommit.whitespace = hg export tip | (! egrep -q '^\textbackslash{}+.*[ \textbackslash{}t]$')
$ \textbf{echo 'a ' > a}
$ \textbf{hg commit -A -m 'test with trailing whitespace'}
adding a
transaction abort!
rollback completed
abort: pretxncommit.whitespace hook exited with status 1
$ \textbf{echo 'a' > a}
$ \textbf{hg commit -A -m 'drop trailing whitespace and try again'}