hgbook

view en/examples/hook.simple.pretxncommit.out @ 296:e0b56f008b09

Fix sample output for 'backout' test.
author Guido Ostkamp <hg@ostkamp.fastmail.fm>
date Wed Aug 20 21:51:54 2008 +0200 (2008-08-20)
parents 006bbad1f190
children
line source
1 $ \textbf{cat check_bug_id}
2 #!/bin/sh
3 # check that a commit comment mentions a numeric bug id
4 hg log -r $1 --template \{desc\} | grep -q "\textbackslash{}<bug *[0-9]"
5 $ \textbf{echo 'pretxncommit.bug_id_required = ./check_bug_id $HG_NODE' >> .hg/hgrc}
6 $ \textbf{echo a >> a}
7 $ \textbf{hg commit -m 'i am not mentioning a bug id'}
8 transaction abort!
9 rollback completed
10 abort: pretxncommit.bug_id_required hook exited with status 1
11 $ \textbf{hg commit -m 'i refer you to bug 666'}
12 committed