view en/examples/hook.msglen @ 110:75c076c7a374

More concepts stuff.
author Bryan O'Sullivan <bos@serpentine.com>
date Fri, 10 Nov 2006 15:09:49 -0800
parents 18210d46491f
children 914babdc99c8
line wrap: on
line source

#!/bin/sh

hg init a
cd a
echo '[hooks]' > .hg/hgrc
echo 'pretxncommit.msglen = test `hg tip --template {desc} | wc -c` -ge 10' >> .hg/hgrc

#$ name: run

cat .hg/hgrc
echo a > a
hg add a
hg commit -A -m 'too short'
hg commit -A -m 'long enough'