hg-commit-sanity: Mercurial Commit Sanity
hg-commit-sanity
is a Mercurial extension that allows to easily create precommit hooks to do sanity checks on commits.
Kudos to Matthew Schinckel
Installation
pip install hg-commit-sanity
Configuration
An example of your .hgrc:
[extensions]
hg_commit_sanity =
[hg_commit_sanity]
.py =
^[^#]*import pdb; pdb.set_trace\(\)
.js =
^[^(//)]*console\.[a-zA-Z]+\(.*\)
This will Abort the commit in case it will find import pdb; pdb.set_trace() in *.py files and console. in *.js files
Contact
If you have questions, bug reports, suggestions, etc. please create an issue on the GitHub project page.
License
This software is licensed under the MIT license
See LICENSE.txt
© 2013 Paylogic International.