<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
<title>Comments on snippet: 'remove missing files with SVN'</title>
<link>http://snipplr.com</link>
<description>Snipplr comments feed'</description>
<language>en-us</language>
<pubDate>Tue, 14 Feb 2012 10:32:29 GMT</pubDate>
<item>
<title>mrtambourineman said on 11/4/10</title>
<link>http://snipplr.com/view/2362/remove-missing-files-with-svn/</link>
<description><![CDATA[ cheers dude this works a treat! proper bo ]]></description>
<pubDate>Thu, 04 Nov 2010 21:06:30 GMT</pubDate>
<guid>http://snipplr.com/view/2362/remove-missing-files-with-svn/</guid>
</item>
<item>
<title>acdvorak said on 9/17/10</title>
<link>http://snipplr.com/view/2362/remove-missing-files-with-svn/</link>
<description><![CDATA[ This snippet removes all missing files, including those that have spaces in their paths:

    svn status | sed -Ee '/^!/!d' -e 's/^! *(.*)/"\1"/g' | xargs -L1 svn rm ]]></description>
<pubDate>Fri, 17 Sep 2010 07:43:39 GMT</pubDate>
<guid>http://snipplr.com/view/2362/remove-missing-files-with-svn/</guid>
</item>
<item>
<title>grabur said on 7/7/09</title>
<link>http://snipplr.com/view/2362/remove-missing-files-with-svn/</link>
<description><![CDATA[ How about something convulted like this?

svn status | sed -e '/^!/!d' -e 's/^! *//' | tr '\n' '\0' | xargs --null -i -t svn rm {} ]]></description>
<pubDate>Tue, 07 Jul 2009 13:31:36 GMT</pubDate>
<guid>http://snipplr.com/view/2362/remove-missing-files-with-svn/</guid>
</item>
<item>
<title>craiga said on 3/13/09</title>
<link>http://snipplr.com/view/2362/remove-missing-files-with-svn/</link>
<description><![CDATA[ Doesn't work with file paths with whitespace. ]]></description>
<pubDate>Fri, 13 Mar 2009 01:30:58 GMT</pubDate>
<guid>http://snipplr.com/view/2362/remove-missing-files-with-svn/</guid>
</item>
<item>
<title>troy said on 1/29/09</title>
<link>http://snipplr.com/view/2362/remove-missing-files-with-svn/</link>
<description><![CDATA[ <pre><code>@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"
  )  
)
</code></pre> ]]></description>
<pubDate>Thu, 29 Jan 2009 14:30:51 GMT</pubDate>
<guid>http://snipplr.com/view/2362/remove-missing-files-with-svn/</guid>
</item>
<item>
<title>troy said on 1/29/09</title>
<link>http://snipplr.com/view/2362/remove-missing-files-with-svn/</link>
<description><![CDATA[ A couple newline characters got lost when posting.  Not sure how to fix, but you get the idea.  Sorry for the repost. ]]></description>
<pubDate>Thu, 29 Jan 2009 14:24:26 GMT</pubDate>
<guid>http://snipplr.com/view/2362/remove-missing-files-with-svn/</guid>
</item>
<item>
<title>troy said on 1/29/09</title>
<link>http://snipplr.com/view/2362/remove-missing-files-with-svn/</link>
<description><![CDATA[ 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"
  )  
) ]]></description>
<pubDate>Thu, 29 Jan 2009 14:21:58 GMT</pubDate>
<guid>http://snipplr.com/view/2362/remove-missing-files-with-svn/</guid>
</item>
<item>
<title>troy said on 1/29/09</title>
<link>http://snipplr.com/view/2362/remove-missing-files-with-svn/</link>
<description><![CDATA[ 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"
  )  
) ]]></description>
<pubDate>Thu, 29 Jan 2009 14:19:42 GMT</pubDate>
<guid>http://snipplr.com/view/2362/remove-missing-files-with-svn/</guid>
</item>
</channel>
</rss>
