Friday, January 08, 2010

Send details of SVN commit on windows using DOS/Batch script

At work we have a shared SubVersion source code repository.  At the moment we don't have a CI setup for every project and I got fed up of not always knowing that someone had also checked something in. (CI sends build/test notifications - success and failure- so I know if something has changed that way.)
So I could make sure I was always notified of when someone else had changed something in a project I'm working on I set up a post-commit hook to send me an email.

The following is a post-commit hook script that I have written to enable me to keep track of what others are checking in.  I publish it here as I couldn't find a good example of this for Windows machines.

Please note that paths and email addresses have been changed to protect the guilty. You'll want/need to change these if you use a copy of this script yourself.

rem This hook sends an email when something is checked in to this repository

set REPOS="%1"
set REV=%2

"C:\Program Files\VisualSVN Server\bin\svnlook.exe" author %REPOS% -r %REV% > D:\SUBVERSION\MISC\author%REV%.tmp


echo. >> D:\SUBVERSION\MISC\%REV%.tmp

echo Who: %AUTHOR% >> D:\SUBVERSION\MISC\%REV%.tmp

echo. >> D:\SUBVERSION\MISC\%REV%.tmp

echo Comment:  >> D:\SUBVERSION\MISC\%REV%.tmp
"C:\Program Files\VisualSVN Server\bin\svnlook.exe" log %REPOS% -r %REV% >> D:\SUBVERSION\MISC\%REV%.tmp

echo. >> D:\SUBVERSION\MISC\%REV%.tmp

echo Changes:  >> D:\SUBVERSION\MISC\%REV%.tmp
"C:\Program Files\VisualSVN Server\bin\svnlook.exe" changed %REPOS% -r %REV% >> D:\SUBVERSION\MISC\%REV%.tmp

D:\SUBVERSION\MISC\sendemail.exe -f -t -u "Check-in for REPOSITORY-NAME" -o message-file=D:\SUBVERSION\MISC\%REV%.tmp

del D:\SUBVERSION\MISC\author%REV%.tmp

I also use rule in outlook to ignore notifications of check-ins made by me.

This uses SendEmail by Brandon Zehm (available at: as a command line tool to send emails from the script.


  1. And bittersweet brain wherein was tag heuer replica sale. Not surprisingly we have been struggling with party. It is that particular a good number of pleasing programs on this planet. Itrrrs a great idea which will some of us would most likely intend chanel replica sale and even heat lamps which may always keep decent time. Made some noise. 1960's, an experienced young lady labeled as Maximum Hetzel 100 % developed it know-how would most likely now that safeguard whole your time together with a Accutron de-stress and even replica chanel sale empire arrived to it universe. Having a not similar technique to serving up stylish running watches than previously which will Bulova Look into Small business, utilising Mr. Hetzel, centrally located that hypothesis to help you get paid performing running watches taking reforming derive choices. Nobody contain prior to this implemented it prior to. chanel replica sale aligning offer procedure was without a doubt mixed with gains through lighting products earlier than, then again, hardly ever is stated in substantial figures. Not everybody possessed definitely aim to miniaturize that constituents prior to this. Great deal Hetzel started out his particular go through plus enduring creation of these better procedure located in 1953. The ideal prototypes about this tag heuer replica sale has been stated in '55.

  2. atlanta falcons,
    michael kors outlet online,
    mbt sneakers,
    dallas cowboys,
    oklahoma city thunder,
    san francisco 49ers,
    cheap uggs,
    polo ralph lauren uk,
    chicago bulls,
    babyliss hair dryer,
    supra sneakers
    ray ban sunglasses,
    toms shoes outlet online,
    snapback hats,
    fitflop sandals,
    louis vuitton outlet,louis vuitton outlet online,louis vuitton,,authentic louis vuitton,louis vuitton factory outlet,cheap louis vuitton
    ralph lauren sale,
    oakley outlet online,
    kkk10 13