hgbook

annotate 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
rev   line source
bos@44 1 cp $EXAMPLE_DIR/data/check_whitespace.py .
bos@44 2
bos@44 3 hg init a
bos@44 4 cd a
bos@44 5 echo '[hooks]' > .hg/hgrc
bos@44 6 echo "pretxncommit.whitespace = hg export tip | (! grep -qP '^\\+.*[ \\t]$')" >> .hg/hgrc
bos@44 7
bos@44 8 #$ name: simple
bos@44 9
bos@44 10 cat .hg/hgrc
bos@44 11 echo 'a ' > a
bos@44 12 hg commit -A -m 'test with trailing whitespace'