2012/3/9 Simon Dean <simon.d...@moneysupermarket.com>: > Hi > > Are there any plans to add a command to SVN that cleans a working copy or > path of all unversioned and/or ignored files and directories? > > This is a very common need for automated Continuous Integration builds where > a working copy is reused for multiple runs of the same build. Currently > there is no simple and fast way to restore a working copy to a prestine > state. Often users have to choose between i) completely deleting the working > copy for every build and then doing a fresh checkout from scratch or ii) > living with lots of unversioned and ignored files and directories building up > with each successive build. > > The only option at the moment is to write a shell/batch script to provide > this feature which is messy and there's common way to do this. A new SVN > command or enhanced exiting command that provided this functionality would be > incredibly useful. > > As an example, here is the DOS batch script that I use at the moment: > > @echo off > :: revert any uncommitted changes > svn revert . --recursive
If you use svn 1.7 (that is you have only ".svn" directory) it is easy to 1. just delete everything 2. do your "svn revert". The revert will restore missing files and folders from their pristine copies. It would not work if you have externals there, though. Those will be restored if you do "svn up". Best regards, Konstantin Kolinko