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

Start hook examples. First is for trailing whitespace.
author Bryan O'Sullivan <bos@serpentine.com>
date Sun, 23 Jul 2006 23:25:52 -0700
parents
children 6f37e6a7d8cd
line wrap: on
line source

cp $EXAMPLE_DIR/data/check_whitespace.py .

hg init a
cd a
echo '[hooks]' > .hg/hgrc
echo "pretxncommit.whitespace = hg export tip | (! grep -qP '^\\+.*[ \\t]$')" >> .hg/hgrc

#$ name: simple

cat .hg/hgrc
echo 'a ' > a
hg commit -A -m 'test with trailing whitespace'