R – Clean builds in continuous integration

cruisecontrol.netnantsvn

We use a CruiseControl.Net/NAnt/Subversion stack for CI. Doing a fresh checkout for every build is way too time-consuming, so currently we just do an update on a working copy. However, this leaves the possibility that orphaned files may remain in the working copy, after being deleted in source control. We have tried using the NAnt delete task just to remove all code source files before an update, but this can corrupt the working copy. Does anyone know a fast way to run a build on a clean and up-to-date working copy?
EDIT: We are on SVN 1.3.2

Best Answer

If you do just 'update', SVN will delete all the files that were deleted in the source control. However files that were created during build process might still be there and might interfere with new build. I'm not sure if SVN has a command to delete them but I guess you could do that with a little script, SVN definitely could tell you which files are under source control and which aren't.