Quinn decides to make use of a pre-commit script provided by the makers of TortoiseSVN. The script is available from TortoiseSVN's Google Code Project, which checks .cpp
and .h
files and shows an error for every file the user forgot to update the copyright year. It's a simple matter to change the .cpp
to .py
so that the Python files in the project are checked.
Download the script from: http://code.google.com/p/tortoisesvn/source/browse/trunk/contrib/hook-scripts/client-side/checkyear.js. If necessary, modify it to suit the file type, and copyright message format, of your project.
Make a note of where you save the file; you'll need the path later.
Bring up the TortoiseSVN right-click menu and select Settings.
In the Settings dialog box that appears, select Hook Scripts, then click Add.
Set the Hook Type to Pre-Commit Hook. Tick Wait for the script to finish, point the working copy path to your working copy, and in the Command Line To Execute...