Hi I got tired of having to manually add any new files to svn after I apply a patch so I wrote a little bash-script that does it automatically. After I had done that I figured it would be nice to also do the opposite, so I wrote one that deletes all unversioned files, and then one that reverts and then deletes all unversioned files so it completely removes the patch and you're left with a clean, pristine copy.
I'm not very good at this so it's not very fancy, but it works quite well and maybe someone else will find it useful. How to use: Save the files somewhere on your path and make them executable svnpatch <patch> Must be run from the root-directory of the patch. Will apply the patch with -p0 -i <patch>, and then add any new files to svn. ----- svnclean >From the root of the client, or svnclean <directory> from anywhere else This will run 'svn stat' and delete any unversioned files. (Except the files .project and .classpath and the folder .externalToolBuilders which is used by Eclipse) ----- svnrevert . >From the root of the client (note the dot at the end), or svnrevert <directory> from anywhere else Will run revert -R and then run svnclean to remove any unversioned files left behind. ----- Just make sure you don't have any unversioned files that you don't want to delete! I have used it a few times now and it works for me, and hopefully it will for everyone. I hope it's useful! Feel free to improve! -Erlend
svnpatch
Description: Binary data
svnclean
Description: Binary data
svnrevert
Description: Binary data