hghooks

Software Screenshot:
hghooks
Software Details:
Version: 0.5.4
Upload Date: 11 May 15
Distribution Type: Freeware
Downloads: 5

Rating: nan/5 (Total Votes: 0)

hghooks is a simple Python 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

Documentation

Installation

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.

Usage

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

[hooks]
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.

How to skip the hooks

If you need to avoid a hook for a specific changeset you can add one or more of the following keywords to the commit message: no-pep8, no-pyflakes and no-pdb.

On the other hand, if you want to avoid a hook in a specific file you can add a comment somewhere in the file saying so. For example:

# hghooks: no-pyflakes no-pdb

in this case the pyflakes and pdb hooks will skip this file. The "# hghooks:" prolog is important and you have to type it exactly like that. Then add the skip keyworkds separated by spaces.

What is new in this release:

  • Fix documentation rst errors

What is new in version 0.5.1:

  • Use the new pyjslint 0.3.1.

What is new in version 0.5.0:

  • Add support to jslint through the pyjslint package. Contribution by Manuel Viera and Pablo Martin.
  • Add support for the changegroup hook type in the trachooks.ticket_updater hook. In this case, merge all changeset messages into one message and add just one comment to the Trac ticket. Manuel and Pablo.
  • Use the server time in the trachooks.ticket_updater hook. Manuel and Pablo.

What is new in version 0.4.3:

  • Works with pyflakes 0.5.0 and backwards compatibility for previous versions

What is new in version 0.4.2:

  • Fix a bug with non ascii characters in the commit message

What is new in version 0.4.1:

  • Fix a bug when running the pyflakes hook over a syntactically wrong file.

What is new in version 0.4.0:

  • Make pyflakes hook ignore those code lines with a "pyflakes:ignore" comment

What is new in version 0.3.2:

  • Fix documentation

What is new in version 0.3.1:

  • Allow ignoring pep8 erros

Requirements:

  • Python

Similar Software

grt
grt

14 Apr 15

bzr-colo
bzr-colo

14 Apr 15

gitver
gitver

17 Feb 15

LinCVS XXL
LinCVS XXL

2 Jun 15

Other Software of Developer Lorenzo Gil Sanchez

searchform
searchform

11 May 15

Comments to hghooks

Comments not found
Add Comment
Turn on images!