Mercurial > hgbook
diff en/examples/results/hook.simple.pretxncommit.out @ 663:0d5935744f87
Switch from LaTeX to XML for examples.
author | Bryan O'Sullivan <bos@serpentine.com> |
---|---|
date | Mon, 09 Mar 2009 21:39:23 -0700 |
parents | 44d1363234d2 |
children | 4432ad34b8e5 |
line wrap: on
line diff
--- a/en/examples/results/hook.simple.pretxncommit.out Mon Mar 09 21:37:47 2009 -0700 +++ b/en/examples/results/hook.simple.pretxncommit.out Mon Mar 09 21:39:23 2009 -0700 @@ -1,13 +1,14 @@ -$ \textbf{cat check_bug_id} +<screen><prompt>$</prompt> <userinput>cat check_bug_id</userinput> #!/bin/sh # check that a commit comment mentions a numeric bug id -hg log -r $1 --template \{desc\} | grep -q "\textbackslash{}<bug *[0-9]" -$ \textbf{echo 'pretxncommit.bug_id_required = ./check_bug_id $HG_NODE' >> .hg/hgrc} -$ \textbf{echo a >> a} -$ \textbf{hg commit -m 'i am not mentioning a bug id'} +hg log -r $1 --template {desc} | grep -q "\<bug *[0-9]" +<prompt>$</prompt> <userinput>echo 'pretxncommit.bug_id_required = ./check_bug_id $HG_NODE' >> .hg/hgrc</userinput> +<prompt>$</prompt> <userinput>echo a >> a</userinput> +<prompt>$</prompt> <userinput>hg commit -m 'i am not mentioning a bug id'</userinput> transaction abort! rollback completed abort: pretxncommit.bug_id_required hook exited with status 1 -$ \textbf{hg commit -m 'i refer you to bug 666'} +<prompt>$</prompt> <userinput>hg commit -m 'i refer you to bug 666'</userinput> committed +</screen>