Start or Pre commit hook?

As part of our automated build process, I provide a list of branches/versions that can be compiled. With Visual Source Safe I just wrote a script to use the SourceOffSite client and read all the versionNo.h’s from certain folders and generate an XML file. With SVN it seems like I could improve on that by making it so that any commits of “versionNo.h” would automatically set a property on the top-level folder and then my build tool could just read properties rather than having to fetch versionNo.h from each folder and scan it.

Only I’m new to SVN so … Would I do that client side or in a start commit hook or a pre commit hook?


Well, we went ahead and did it; switched from Visual Source Safe to Subversion. Ahh. The producers see TortoiseSVN and want it, so our data will be going over soon too. Right now we’re running VisualSVN¬†server on our Windows file server and their client for Visual Studio.

I’m now trying to set up commit hooks and running into brick walls. I wanted to avoid having to write something myself and though the Ruby commit-mailer.rb sounded promising. Except, it appears that Ruby no-longer ships with ruby-svn and I can’t figure out where the heck you would¬†get it from.

So, I guess I’ll do something with the Perl version. That’s not so bad, really, I can make it announce commits to the IRC server while I’m at it :) Or, more likely, have it write the announcements to a database and let something else pick them up.