hgbook
annotate ja/examples/hook.simple.pretxncommit.out @ 963:1dd00abb3fa9
merge with bryan - it's been a while but everything seems ok
author | Romain PELISSE <belaran@gmail.com> |
---|---|
date | Sun Aug 16 03:41:39 2009 +0200 (2009-08-16) |
parents | |
children |
rev | line source |
---|---|
foozy@708 | 1 $ \textbf{cat check_bug_id} |
foozy@708 | 2 #!/bin/sh |
foozy@708 | 3 # check that a commit comment mentions a numeric bug id |
foozy@708 | 4 hg log -r $1 --template \{desc\} | grep -q "\textbackslash{}<bug *[0-9]" |
foozy@708 | 5 $ \textbf{echo 'pretxncommit.bug_id_required = ./check_bug_id $HG_NODE' >> .hg/hgrc} |
foozy@708 | 6 $ \textbf{echo a >> a} |
foozy@708 | 7 $ \textbf{hg commit -m 'i am not mentioning a bug id'} |
foozy@708 | 8 transaction abort! |
foozy@708 | 9 rollback completed |
foozy@708 | 10 abort: pretxncommit.bug_id_required hook exited with status 1 |
foozy@708 | 11 $ \textbf{hg commit -m 'i refer you to bug 666'} |
foozy@708 | 12 committed |
foozy@708 | 13 |