<?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>Chris Pratt // Metaphors Be With You &#187; svn</title>
	<atom:link href="http://www.chrisdpratt.com/tag/svn/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.chrisdpratt.com</link>
	<description>Random thoughts on random topics. What? You wanted predictability?</description>
	<lastBuildDate>Fri, 31 Jul 2009 14:58:51 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Recovering a Subversion Repository After a Major Deletion</title>
		<link>http://www.chrisdpratt.com/2008/08/07/recovering-subversion-repository-major-deletion/</link>
		<comments>http://www.chrisdpratt.com/2008/08/07/recovering-subversion-repository-major-deletion/#comments</comments>
		<pubDate>Thu, 07 Aug 2008 21:35:24 +0000</pubDate>
		<dc:creator>chrisdpratt</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[subversion]]></category>
		<category><![CDATA[svn]]></category>

		<guid isPermaLink="false">http://www.chrisdpratt.com/2008/08/07/recovering-subversion-repository-major-deletion/</guid>
		<description><![CDATA[At the company I work for, we store all our client files in a subversion repository. As I walked through the door on Monday, I was greeted with the glorious news that all the client files were gone. Gone? Yep. Nothing. Nada. Blank repository. After a brief temptation to throw myself out our 25th floor [...]]]></description>
			<content:encoded><![CDATA[<p>At the company I work for, we store all our client files in a subversion repository. As I walked through the door on Monday, I was greeted with the glorious news that all the client files were gone. Gone? Yep. Nothing. Nada. Blank repository. After a brief temptation to throw myself out our 25th floor window, I regained my composure and reminded myself that this was subversion: nothing is ever really gone.</p>
<p><code>
<pre>svn log https://our.subversion.repo</pre>
<p></code></p>
<p>Ah ha. At revision 5686 a &#8220;File/Folder was deleted&#8221;. Not very descriptive (thanks Subversion), but it&#8217;s the only reference to a deletion around the time the gates of hell opened and the spawn of Satan unleashed upon the earth.</p>
<p>So, I checkout a local copy of the current, destitute, repository. And try:</p>
<p><code>
<pre>svn merge -rHEAD:5685 https://our.subversion.repo clients</pre>
<p></code></p>
<p>And&#8230; drumroll&#8230; failure. Of course it <em>couldn&#8217;t</em> be <em>that</em> simple. Next:</p>
<p><code>
<pre>svn up -r5685</pre>
<p></code></p>
<p>Yay! Here comes all the client files&#8230; all&#8230; forty&#8230; six&#8230; gigs.</p>
<p>[<em>flash forward one day</em>]</p>
<p>So, I now have a local copy of the repo as it <em>should</em> be, but the actual repo is still empty. Now what? First, got to get rid of all those god-forsaken hidden .svn folders. I <em>could</em> simply run an export, but I really don&#8217;t want another 46 GB block on my computer. So I&#8217;ll use some find magic instead:</p>
<p><code>
<pre>
cd clients
find . -name ".svn*" -exec rm -rf "{}" \;
</pre>
<p></code></p>
<p>That took awhile. Now, all I have to do is checkout another working copy, move over all the files into the working copy, svn add and commit. No sweat.</p>
<p>Except&#8230;</p>
<p>Doh! Halfway into the process, the drive hosting the subversion repo reaches capacity and the commit fails miserably. At this point, I&#8217;m saying things I wouldn&#8217;t want my mother to hear. If you&#8217;re reading this, mom, that&#8217;s just a joke. I never curse.</p>
<p>Ideally, at this point, we&#8217;d go out, get a larger drive and move the repo over. Right. Have any of you actually worked in an office before? I&#8217;m told to delete the repo and re-import.</p>
<p>And, 6 hours later, our repo is back as it should be, only, at revision 1. If you haven&#8217;t guessed from the relatively low revision number mentioned previously, this isn&#8217;t the first time we had to start back at revision 1. Thankfully, there&#8217;s already documentation prepared (by me) for my coworkers to refresh any working copies they have on their computer.</p>
<p>I love my job.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.chrisdpratt.com/2008/08/07/recovering-subversion-repository-major-deletion/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>
