view en/examples/hook.msglen @ 50:8b0d389cf6e0

Update MQ chapter to match recent bug fixes.
author Bryan O'Sullivan <bos@serpentine.com>
date Thu, 27 Jul 2006 10:20:55 -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'