As I mentioned early I've been working on a SVN post-commit script. We've got a SVN repository that will be modified by several remote developers and I really need to keep an eye on this repository and I need to closely monitor changes to this repository.
There are two major functions that I needed in my post-commit script:
There are an abundant of examples showing off how to do this in various *nix flavors, but I couldn't find any good Windows-based solutions that didn't require Perl to be installed on the server. That led me to create the following post-commit.bat script.
I've been working on a Subversion post-commit hook that will send me an e-mail when a user checks in some code to a repository. In order to send an e-mail from the post-commit script I needed a command line tool that would let me send an SMTP message from my batch file.
Fortunately for me, I stumbled upon SendEmail by Brandon Zehm.
This program is chock-full of features and is the perfect companion for Subversion for Windows installations. I can also see this being an extremely useful general debugging tool as it as you can create some really complex e-mail scripts.
SendEmail is actually a Perl program but has been compiled into a native Windows executable. You can download the Windows executable in two flavors—with or without TLS support.
I've been working on a post-commit hook for our Subversion install and was running in to a number of issues. The post-commit.bat file would run fine from command line, but I just could get things to work as I expected from SVN. After much debugging and scouring Google for answers, I've found a few tips that will hopefully help you to troubleshoot your own SVN repository hooks.
This was the biggest issue I was running in to, because I was expecting the my script to be able to find any programs in my %PATH% statement. That's the main reason my scripts were working fine from command line, but were breaking when executing from my SVN hook.