Mercurial > hgbook
annotate en/examples/hook.simple.pretxncommit.out @ 488:b7d4d66c3ae5
Aiiiiiee section translated
author | Igor TAmara <igor@tamarapatino.org> |
---|---|
date | Mon, 03 Nov 2008 08:23:10 -0500 |
parents | 00f69e8825c5 |
children |
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 |