SVN batch commands for adding or deleting multiple files (Linux)
Here are a few little hints that may help speed up your SVN workflow if you are using SVN in a Linux environment. I found the first one on Snipplr and used that to create the second one for myself.
- Deleting multiple missing files (ie. the ones with a “!” next to them):
svn delete $( svn status | sed -e '/^!/!d' -e 's/^!//' )
- Adding multiple new files (ie. the ones with a “?” next to them):
svn add $( svn status | sed -e '/^?/!d' -e 's/^?//' )
October 30th, 2008 at 11:18 am
svn: invalid option character: f
March 9th, 2009 at 9:10 am
took the svn file from http://unxutils.sourceforge.net/.
Using the following lines, after looking at your unix example.
“c:\Program Files\VisualSVN Server\bin\svn.exe” status | sed -e “/^?/ !d” -e “s/^?//g” > filestoadd.txt
FOR /F “eol=;” %%i in (filestoadd.txt) do “c:\Program Files\VisualSVN Server\bin\svn.exe” add %%i
Thanks you very much.
Mark