Sometimes we require to replace an entire directory and its sub-directories with new files. However if we simply delete the directory (which is under SVN) and replace it, then SVN will complain that the new directory is not a working copy and will not allow the net changes to be committed. Short of “svn deleting” the entire directory and “svn adding” it, the following steps can be performed.
The steps assume you want to do this for the mantis directory under /var/www/sub. This was actually perfomed when upgrading mantis as my mantis install is under SVN.
of here are the alternate steps
cd mantis
to change directory into the mantis directoryfind .|grep -v “\.svn”|xargs rm
to delete all files except SVN related files and directoriescp -R mantis1/* mantis/
assuming mantis1 directory already has the new extracted files. Before doing this slip a directory back and then go back up to mantis directory for next stepsvn status|grep “^\!”|awk '{print $2}'|xargs svn delete
to “SVN Delete” the deleted filessvn status|grep “?”|awk '{print $2}'|xargs svn add
to “SVN Add” the new filessvn commit -m “Whatever comment”
to finish the commit