views:

1392

answers:

3

I am using CruiseControl .NET with the Subversion source control plugin to automatically build our project.

Some of the projects are automatically checking for modifications, but occasionally the check fails and CruiseControl .NET marks the project with an "Exception":

ThoughtWorks.CruiseControl.Core.CruiseControlException: Source control operation failed: svn: Working copy 'xxFilename' locked svn: run 'svn cleanup' to remove locks (type 'svn help cleanup' for details)

After this I must manually log into the server and do a svn cleanup on the folder before the project will build again. Is there a workaround for this?

+1  A: 

Kinda of a kludge but could you create a project that runs on demand and does an svn cleanup?

I know you can in the Java version of CruiseControl so I assume you can do the same w/CC.NET.

Jeffrey Fredrick
I would like to avoid this solution, since it scales very poorly when the number of projects increases.
mbp
A: 

You should be able to use a publisher task in the project configuration.

The Project Configuration Block has a publishers task that will execute after every build.

Using an executable task, you can pass in the current integration status as an environment variable, and that will allow you to use a simple script or command to decide whether or not to execute the svn cleanup.

For eg, all you need would be:
if %CCNetIntegrationStatus% == "Exception" svn cleanup

Disclaimer: I've only really played around with CC, and this is from the docs, not experience.

Nader Shirazie
+4  A: 

The new Cruise Control.Net 1.4.4 server has two additional properties on the Subversion Source Control Block.

See CCNET Documentation - Subversion Source Control Block

The cleanUp and revert properties does what you want.

FkYkko
Matt Jacobsen