Published in: SVN
URL: http://svn.haxx.se/users/archive-2005-07/0849.shtml
svn rm $( svn status | sed -e '/^!/!d' -e 's/^!//' )
Comments
Subscribe to comments
You need to login to post a comment.
Version Control with Subversion
Written by members of the Subversion open source development team, Version Control with Subversion introduces the powerful new versioning tool designed to be the successor to the Concurrent Version System or CVS. CVS users will find the "look and feel" Subversion comfortably familiar, but under the surface it's far more flexible, robust, and usable, and more importantly, it improves on CVS's more notable flaws.
bartbons on 03/20/07
svn delete remove files missing
2 people have marked this snippet as a favorite
Published in: SVN
URL: http://svn.haxx.se/users/archive-2005-07/0849.shtml
svn rm $( svn status | sed -e '/^!/!d' -e 's/^!//' )
Subscribe to comments
You need to login to post a comment.
Hello, I like the Unix script above, but at work I'm forced into a Windows environment. For others stuck in a Windows environment, I hope the following will be useful. (I'm not experienced with Windows batch scripting, but the following worked for me on Windows XP.)
@echo off :: This script deletes files from svn that are missing in the specified working copy.
if "%1"=="" ( echo usage: %0 workingCopy exit /b )
for /f "usebackq tokens=1*" %%a in (
svn status %1) do ( if "%%a"=="!" ( echo svn delete "%%b" svn delete "%%b" ))
Hello, I like the Unix script above, but at work I'm forced into a Windows environment. For others stuck in a Windows environment, I hope the following will be useful. (I'm not experienced with Windows batch scripting, but the following worked for me on Windows XP.)
@echo off :: This script deletes files from svn that are missing in the specified working copy.
if "%1"=="" ( echo usage: %0 workingCopy exit /b )
for /f "usebackq tokens=1*" %%a in (
svn status %1) do ( if "%%a"=="!" ( echo svn delete "%%b" svn delete "%%b" ))
A couple newline characters got lost when posting. Not sure how to fix, but you get the idea. Sorry for the repost.
Doesn't work with file paths with whitespace.