hgbook

annotate en/examples/hook.ws @ 47:6f37e6a7d8cd

Get Emacs to figure out what syntax highlighting to use for examples.
author Bryan O'Sullivan <bos@serpentine.com>
date Sun Jul 23 23:38:41 2006 -0700 (2006-07-23)
parents 012df94a02fe
children 18210d46491f
rev   line source
bos@47 1 #!/bin/bash
bos@47 2
bos@44 3 cp $EXAMPLE_DIR/data/check_whitespace.py .
bos@44 4
bos@44 5 hg init a
bos@44 6 cd a
bos@44 7 echo '[hooks]' > .hg/hgrc
bos@44 8 echo "pretxncommit.whitespace = hg export tip | (! grep -qP '^\\+.*[ \\t]$')" >> .hg/hgrc
bos@44 9
bos@44 10 #$ name: simple
bos@44 11
bos@44 12 cat .hg/hgrc
bos@44 13 echo 'a ' > a
bos@44 14 hg commit -A -m 'test with trailing whitespace'