[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Best practice question - undo or prevent commit?

From: Bill Walton <bill.walton_at_charter.net>
Date: Wed, 6 Feb 2008 07:45:46 -0500

We've set up an integration environment in which we're running our automated test suite. We're currently kicking off the tests after the code is committed. The problem that presents is that if someone commits code that fails the tests (the team is new to automated tests and still getting into the habit), all the commits that follow will also fail until the problem is fixed.

My goal is to prevent 'bad' code from being committed to the repository. Is it possible to use a pre-commit hook to move the code being committed into the test environment and run the tests? Or do I need to 'undo' the commit to back out the offending code?

Thanks,
Bill
Received on 2008-02-06 13:46:21 CET

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.