hgbook

diff 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 diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/en/examples/hook.ws	Sun Jul 23 23:25:52 2006 -0700
     1.3 @@ -0,0 +1,12 @@
     1.4 +cp $EXAMPLE_DIR/data/check_whitespace.py .
     1.5 +
     1.6 +hg init a
     1.7 +cd a
     1.8 +echo '[hooks]' > .hg/hgrc
     1.9 +echo "pretxncommit.whitespace = hg export tip | (! grep -qP '^\\+.*[ \\t]$')" >> .hg/hgrc
    1.10 +
    1.11 +#$ name: simple
    1.12 +
    1.13 +cat .hg/hgrc
    1.14 +echo 'a ' > a
    1.15 +hg commit -A -m 'test with trailing whitespace'