Mercurial > hgbook
view en/examples/hook.simple.pretxncommit.out @ 398:2936cb7eae7a
Fix sample output for test 'branch-named'.
author | Guido Ostkamp <hg@ostkamp.fastmail.fm> |
---|---|
date | Wed, 20 Aug 2008 21:55:35 +0200 |
parents | 00f69e8825c5 |
children |
line wrap: on
line source
$ \textbf{cat check_bug_id} #!/bin/sh # check that a commit comment mentions a numeric bug id hg log -r $1 --template \{desc\} | grep -q "\textbackslash{}<bug *[0-9]" $ \textbf{echo 'pretxncommit.bug_id_required = ./check_bug_id $HG_NODE' >> .hg/hgrc} $ \textbf{echo a >> a} $ \textbf{hg commit -m 'i am not mentioning a bug id'} transaction abort! rollback completed abort: pretxncommit.bug_id_required hook exited with status 1 $ \textbf{hg commit -m 'i refer you to bug 666'} committed