hg-commit-sanity

Mercurial extension to do sanity checks on commits.


License
MIT
Install
pip install hg-commit-sanity==0.0.1

Documentation

hg-commit-sanity: Mercurial Commit Sanity

https://api.travis-ci.org/paylogic/hg-commit-sanity.png https://pypip.in/v/hg-commit-sanity/badge.png https://coveralls.io/repos/paylogic/hg-commit-sanity/badge.png?branch=master

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.