Pluggable Subversion Pre-Commit Hook

Prevents check ins to Subversion if any rules are broken. Rules are implemented as Python classes.


    cp src/ $REPO_DIR$/hooks/pre-commit
    cp src/svnhook.conf $REPO_DIR$/hooks/
    cp lib/python2.?/site-packages/ $REPO_DIR$/hooks/
    mkdir $REPO_DIR$/hooks/plugins/

Then install plug-ins - see

Call with -h to see additional options.

Development - Getting Started

Install Python dev tools, pip and virtualenv if you don't already have them:


    sudo apt-get install python-dev python-virtualenv python-pip


    sudo easy_install pip virtualenv

Initialise your environment:

    virtualenv --no-site-packages .

Update packages:

    pip -E . install -U -r pluggable-svn-hook.pip && rm -rf build

(On OSX 10.6, I had to use this as a prefix to the command above.)

    ARCHFLAGS='-arch i386 -arch x86_64'

Using your environment:

    source bin/activate

Seeing your dependencies:

    yolk -l

Running tests:

    nosetests tests/*

Unit test coverage:

    nosetests --with-coverage --cover-package=svnhook plugins tests/*

Copyright 2011 Trader Media Ltd.