hgbook

view en/examples/hook.ws @ 44:012df94a02fe

Start hook examples. First is for trailing whitespace.
author Bryan O'Sullivan <bos@serpentine.com>
date Sun Jul 23 23:25:52 2006 -0700 (2006-07-23)
parents
children 6f37e6a7d8cd
line source
1 cp $EXAMPLE_DIR/data/check_whitespace.py .
3 hg init a
4 cd a
5 echo '[hooks]' > .hg/hgrc
6 echo "pretxncommit.whitespace = hg export tip | (! grep -qP '^\\+.*[ \\t]$')" >> .hg/hgrc
8 #$ name: simple
10 cat .hg/hgrc
11 echo 'a ' > a
12 hg commit -A -m 'test with trailing whitespace'