Corith Malin
Corith Malin

Reputation: 1525

Continuous Integration with SVN with Large Repository

So we have a SVN repository which houses a rather large project that takes about an hour to pull down for the first time. We've setup continuous integration with CruiseControl and we have it triggered on commits. Because of the long pull time we don't delete the build directory on the build machine and instead just issue a svn update command to get the latest version.

The works fine on adding, updating, and removing files which have been checked into SVN, but the issue we have is that during the build process files are generated. Those generated files should never be checked in but I would like to clean them out between builds.

Essentially, I'd like a svn update command that:

  1. Updated the directory to the current version.
  2. Removes all files not under source control.

Am I just missing something or is there no SVN command for this?

Update: I am on a windows machine. I'm aware that I could do this with cygwin or other methods, but I'm curious if there is a SVN or CC.Net feature for this.

Upvotes: 2

Views: 261

Answers (2)

ojblass
ojblass

Reputation: 21640

You can run the svn update command and subsequently removed the unversioned files as mentioned here.

svn status | grep '^\?' | cut -c8- | xargs rm
svn status | grep '^?' | awk '{print $2}' | xargs rm -rf

either one would work. Oh maybe you are on a windows box? Could you clarify?

Upvotes: 0

Matt V.
Matt V.

Reputation: 9809

Check out this blog post (and comment thread) on how to Remove files that are not in subversion for several methods. If you're comfortable using git, I think switching to git-svn as your client might also allow you to handle the cleanup.

Upvotes: 1

Related Questions