annotate ja/examples/hook.simple.pretxncommit.out @ 290:b0db5adf11c1 ja_root

fork Japanese translation.
author Yoshiki Yazawa <yaz@cc.rim.or.jp>
date Wed, 06 Feb 2008 17:43:11 +0900
parents en/examples/hook.simple.pretxncommit.out@00f69e8825c5
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
144
006bbad1f190 Add expected output files.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
1 $ \textbf{cat check_bug_id}
006bbad1f190 Add expected output files.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
2 #!/bin/sh
006bbad1f190 Add expected output files.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
3 # check that a commit comment mentions a numeric bug id
006bbad1f190 Add expected output files.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
4 hg log -r $1 --template \{desc\} | grep -q "\textbackslash{}<bug *[0-9]"
006bbad1f190 Add expected output files.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
5 $ \textbf{echo 'pretxncommit.bug_id_required = ./check_bug_id $HG_NODE' >> .hg/hgrc}
006bbad1f190 Add expected output files.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
6 $ \textbf{echo a >> a}
006bbad1f190 Add expected output files.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
7 $ \textbf{hg commit -m 'i am not mentioning a bug id'}
006bbad1f190 Add expected output files.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
8 transaction abort!
006bbad1f190 Add expected output files.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
9 rollback completed
273
00f69e8825c5 Bring book up to date with recent changes.
Bryan O'Sullivan <bos@serpentine.com>
parents: 144
diff changeset
10 abort: pretxncommit.bug_id_required hook exited with status 1
144
006bbad1f190 Add expected output files.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
11 $ \textbf{hg commit -m 'i refer you to bug 666'}
006bbad1f190 Add expected output files.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
12 committed
006bbad1f190 Add expected output files.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
13