hgbook
diff en/examples/hook.simple.pretxncommit.out @ 259:b42689a730a2
Typo
author | Johannes Hoff <wbunaarfubss@gmail.com> |
---|---|
date | Sun Jun 17 11:42:14 2007 +0200 (2007-06-17) |
parents | |
children | 00f69e8825c5 |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/en/examples/hook.simple.pretxncommit.out Sun Jun 17 11:42:14 2007 +0200 1.3 @@ -0,0 +1,13 @@ 1.4 +$ \textbf{cat check_bug_id} 1.5 +#!/bin/sh 1.6 +# check that a commit comment mentions a numeric bug id 1.7 +hg log -r $1 --template \{desc\} | grep -q "\textbackslash{}<bug *[0-9]" 1.8 +$ \textbf{echo 'pretxncommit.bug_id_required = ./check_bug_id $HG_NODE' >> .hg/hgrc} 1.9 +$ \textbf{echo a >> a} 1.10 +$ \textbf{hg commit -m 'i am not mentioning a bug id'} 1.11 +abort: pretxncommit.bug_id_required hook exited with status 1 1.12 +transaction abort! 1.13 +rollback completed 1.14 +$ \textbf{hg commit -m 'i refer you to bug 666'} 1.15 +committed 1.16 +