<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>About Web Development by Activo &#187; RoboCopy</title>
	<atom:link href="http://www.activoinc.com/blog/tag/robocopy/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.activoinc.com/blog</link>
	<description>Web Development in a Web 2.0 World</description>
	<lastBuildDate>Fri, 29 Jan 2010 17:16:07 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Cleaning an entire subversion working folder from &#8216;.svn&#8217; folders</title>
		<link>http://www.activoinc.com/blog/2009/05/12/cleaning-an-entire-subversion-working-folder-from-svn-folders/</link>
		<comments>http://www.activoinc.com/blog/2009/05/12/cleaning-an-entire-subversion-working-folder-from-svn-folders/#comments</comments>
		<pubDate>Tue, 12 May 2009 19:11:22 +0000</pubDate>
		<dc:creator>Ron Peled</dc:creator>
				<category><![CDATA[Ektron]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[RichCopy]]></category>
		<category><![CDATA[RoboCopy]]></category>
		<category><![CDATA[subversion]]></category>

		<guid isPermaLink="false">http://www.activoinc.com/blog/?p=220</guid>
		<description><![CDATA[Rarely I need to clean an entire folder from all the hidden &#8216;.svn&#8217; folders which makes it a working copy of an existing repository. Unfortunately my projects tend to be large in the number of files and fairly complex. When I upgrade the project, say from Ektron 7.0.4 to Ektron 7.65 SP2, there are a [...]]]></description>
			<content:encoded><![CDATA[<p>Rarely I need to clean an entire folder from all the hidden &#8216;.svn&#8217; folders which makes it a working copy of an existing repository. Unfortunately my projects tend to be large in the number of files and fairly complex. When I upgrade the project, say from Ektron 7.0.4 to Ektron 7.65 SP2, there are a lot of changes in the files. In the upgrade process, some folders loose their &#8216;.svn&#8217; subfolders which makes it difficult to use the &#8216;SVN Update&#8217; + &#8216;SVN Commit&#8217; walk in the park method. What we need is a &#8216;SVN Reintegrate&#8217; option, lets create one.</p>
<p><img class="alignnone size-full wp-image-221" title="subversion_svn_reintegrate" src="http://www.activoinc.com/blog/wp-content/uploads/2009/05/subversion_svn_reintegrate.gif" alt="subversion_svn_reintegrate" width="667" height="304" /></p>
<p>Until now, what I end up doing is removing all the &#8216;.svn&#8217; subfolders, checking out the project to another folder, removing all the files from the checked out folder (SVN Delete), copying over all the current set of files/folders, and checking the whole thing back in to the SVN repository. This works well but it requires some serious file manipulation efforts. Here are two usefull tools I just recently discovered that can help tremendously with this process:</p>
<p>1. Cleaning an entire subversion working folder from &#8216;.svn&#8217; folders:</p>
<p>Ryan Christensen describes <a href="http://baseplane.com/2008/03/19/howto-remove-all-subversion-svn-folders-and-files-on-windows-quickly/">how to remove all .svn subfolders from a SVN working copy</a>. In short, you need to create a small &#8216;.cmd&#8217; file that will live in the top folder that you want to detach from SVN and write this command in it:</p>
<pre>for /f "tokens=* delims=" %%i in ('dir /s /b /a:d *svn') do ( rd /s /q "%%i" )</pre>
<p>I saved it as cleansvn.cmd and run it from a command line window after changing the current directory to the project folder. You will need to wait until the TortoiseSVN checks all the subfolders because it keeps a bunch of info in cache and with this util &#8211; it doesn&#8217;t refresh veru quickly. But it works great.</p>
<p>2. The new Rsync for Windows, called <a href="http://download.microsoft.com/download/f/d/0/fd05def7-68a1-4f71-8546-25c359cc0842/HoffmanUtilitySpotlight2009_04.exe">RichCopy</a>:</p>
<p>Apparently, Microsoft has recently (April 2009) <a href="http://technet.microsoft.com/en-us/magazine/2009.04.utilityspotlight.aspx">published this free utility called RichCopy</a> which comes to replace the RoboCopy GUI tool from 2006. According to the article, this utility is also many times more efficient and handles multi threading, network connections, etc. I tried it and it worked great for me.</p>
<p>Here are the new steps for my &#8216;SVN Reintegrate&#8217; procedure:</p>
<ol>
<li>Backup all working copies before proceeding</li>
<li>Clean working copy from all &#8216;.svn&#8217; folders</li>
<li>Checkout latest project from SVN repository to another folder (not a subfolder)</li>
<li>Use RichCopy to copy over all the files, these are the settings:
<ol>
<li>Source: the new clean working folder</li>
<li>Destination: the latest SVN checked out folder</li>
<li>Use the &#8216;Purge&#8217; option</li>
<li>Exclude all &#8216;.svn&#8217; folders from this process</li>
</ol>
</li>
<li>SVN Commit the SVN folder that was overwritten by the working folder</li>
</ol>
<p>A bit confusing but if you know what you are doing it can save you a few white hairs. Enjoy!</p>
<h3  class="related_post_title">Related Posts</h3><ul class="related_post"><li>March 30, 2009 -- <a href="http://www.activoinc.com/blog/2009/03/30/will-visual-svn-server-remain-a-for-free-product/" title="Will Visual SVN Server remain a for-Free product?">Will Visual SVN Server remain a for-Free product?</a> (0)</li><li>March 27, 2009 -- <a href="http://www.activoinc.com/blog/2009/03/27/recommended-visual-svn-server-now-with-subversion-16/" title="Recommended: Visual SVN Server, now with Subversion 1.6">Recommended: Visual SVN Server, now with Subversion 1.6</a> (1)</li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.activoinc.com/blog/2009/05/12/cleaning-an-entire-subversion-working-folder-from-svn-folders/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
