1. Waldemar Kornewald
  2. hghooks


hghooks /

Filename Size Date modified Message
58 B
73 B
7.5 KB
77 B
990 B
3.1 KB
1.4 KB


hghooks is a simple module that adds several useful hooks for use in Mercurial hooks system.

Right now it includes hooks for:

  • pep8 checking of python files
  • pyflakes checking of python files
  • checking for forgotten pdb statements in python files



hghooks is distributed as a Python egg so is quite easy to install. You just need to type the following command:

easy_install hghooks

And Easy Install will go to the Cheeseshop and grab the last hghooks for you. It will also install it for you at no extra cost :-)


To use one of the hooks provided by this package edit your hgrc file of your Mercurial repository and add these lines:

pretxncommit.pep8 = python:hghooks.pep8hook.pretxncommit
pretxncommit.pyflakes = python:hghooks.pyflakeshook.pretxncommit
pretxncommit.pdb = python:hghooks.pdbhook.pretxncommit

You can add only the hooks that you need.