RE: Pre-commit hook set to fail if build fails
From: Mark Shead <sheadm_at_optimalinternet.com>
Date: 2005-11-11 03:25:54 CET
That is what we are currently doing. In certian places though I'd like the commit to fail unless it builds correctly. It sounds like when you check things in, it creates a transaction and then fires off the pre-commit scrips. If the script exits with a status of 0 the transaction is committed.
What I'd like to be able to do is use the script to copy the state of the transaction out to a directory and run the build script. If it builds then I want the transaction committed. If not I want it to abort and the user to be notified.
Obviously this means we'd have to wait around for the build to finish, but in our situation that would only mean a few minutes. The benefit would is that we wouldn't ever have a case where it works on the developer's machine but not on the integration server.
Is this possible?
Another possibility would be to fire off a build using a post-commit script and then just backing out the changes if the build fails, but I'd rather have the feedback comming directly from subversion's client when they commit.
Any suggestions or comments would be appreciated.
-----Original Message-----
What's usual is to do just a minimum of testing in the hook, and then
---------------------------------------------------------------------
|
This is an archived mail posted to the Subversion Users mailing list.
This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.