Mercurial > hgbook
annotate en/examples/hook.msglen @ 826:a17d6390a480
More fixes to chapters 1 and 2.
author | Bryan O'Sullivan <bos@serpentine.com> |
---|---|
date | Sun, 03 May 2009 20:27:09 -0700 |
parents | 914babdc99c8 |
children |
rev | line source |
---|---|
49 | 1 #!/bin/sh |
2 | |
3 hg init a | |
4 cd a | |
5 echo '[hooks]' > .hg/hgrc | |
6 echo 'pretxncommit.msglen = test `hg tip --template {desc} | wc -c` -ge 10' >> .hg/hgrc | |
7 | |
155
914babdc99c8
run-example: better error if bogus section name found.
Bryan O'Sullivan <bos@serpentine.com>
parents:
49
diff
changeset
|
8 #$ name: go |
49 | 9 |
10 cat .hg/hgrc | |
11 echo a > a | |
12 hg add a | |
13 hg commit -A -m 'too short' | |
14 hg commit -A -m 'long enough' |