SVN pre-commit hooks with perl tests

muppet scott at
Thu Jan 12 02:25:39 GMT 2006

On Jan 11, 2006, at 4:06 PM, Dominic Mitchell wrote:

> Looking at the pre-commit documentation there, you should be able  
> to use
> svnlook --transaction to see what's been checked in.

This still doesn't help you verify whether the tests succeed.  You  
either have to pass that information in from the client (which can't  
be trusted), or run the tests on the server.

Doing a checkout and build in a post-commit is not unthinkable,  
though for performance reasons it is more desirable to merely  
schedule a build in the post-commit, in case there are a whole bunch  
piling up.

Doing a checkout, patch, build, and test in a pre-commit, whose  
return code will be inspected to determine whether the commit may  
continue, is going to be slow.  You can speed things up by keeping a  
persistent sandbox and updating, but it will still incur a noticeable  
lag on the client side ("Why does svn seem to hang whenever i commit?").

That's it!  It's one thing for a ghost to scare my children, but it's  
another to play my theremin!
   - Homer Simpson

More information about the mailing list