$ \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{}> .hg/hgrc} $ \textbf{echo a >> a} $ \textbf{hg commit -m 'i am not mentioning a bug id'} abort: pretxncommit.bug_id_required hook exited with status 1 transaction abort! rollback completed $ \textbf{hg commit -m 'i refer you to bug 666'} committed