bos@564: $ cat check_bug_id bos@144: #!/bin/sh bos@144: # check that a commit comment mentions a numeric bug id bos@564: hg log -r $1 --template {desc} | grep -q "\<bug *[0-9]" bos@564: $ echo 'pretxncommit.bug_id_required = ./check_bug_id $HG_NODE' >> .hg/hgrc bos@564: $ echo a >> a bos@564: $ hg commit -m 'i am not mentioning a bug id' bos@144: transaction abort! bos@144: rollback completed bos@273: abort: pretxncommit.bug_id_required hook exited with status 1 bos@564: $ hg commit -m 'i refer you to bug 666' bos@144: committed bos@144: bos@564: