view en/examples/hook.msglen @ 70:365b41b6a15e

bash is not necessarily in /bin. Original patch against an earlier rev from Guy Brand <gb@isis.u-strasbg.fr>.
author Bryan O'Sullivan <bos@serpentine.com>
date Tue, 08 Aug 2006 14:13:28 -0700
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'