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