Confirmed users
149
edits
| Line 9: | Line 9: | ||
An example for a passing commit message would be, | An example for a passing commit message would be, | ||
Bug 577872 - Create WebM versions of Ogg reftests. r=kinetik | Bug 577872 - Create WebM versions of Ogg reftests. r=kinetik | ||
notice the Bug ##### and the r=. Also the review is not checked at the moment, it could be at a | notice the Bug ##### and the r=. Also the review is not checked at the moment, it could be at a | ||
| Line 20: | Line 20: | ||
* Commit messages containing "no bug" (please use this sparingly) | * Commit messages containing "no bug" (please use this sparingly) | ||
* Commit message indicates backout of a given 12+ digit changeset id, by starting with | * Commit message indicates backout of a given 12+ digit changeset id, by starting with | ||
(back out|backing out|backed out|backout)( of)? (rev|changeset|cset)s? [0-9a-f]{12} | |||
* Commit message starts with "merge" or "merging" and is actually a merge changeset. | * Commit message starts with "merge" or "merging" and is actually a merge changeset. | ||
| Line 47: | Line 48: | ||
Change your .hgrc to include: | Change your .hgrc to include: | ||
< | <tt> | ||
[hooks] | [hooks] | ||
pretxncommit.good_commit_message = python:goodCommitMessage.hook | pretxncommit.good_commit_message = python:goodCommitMessage.hook | ||
</ | </tt> | ||
You probably need to add good_commit_message to your Python path | You probably need to add good_commit_message to your Python path | ||
< | <tt> | ||
export PYTHONPATH = ~/myhooks # assuming good_commit_message.py is in this folder | |||
</tt> | |||
You can also edit good_commit_message.py to abort commits instead of warning. | You can also edit good_commit_message.py to abort commits instead of warning. | ||