<?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>Benny's Blog &#187; Version Control</title>
	<atom:link href="http://blog.projectnibble.org/category/version-control/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.projectnibble.org</link>
	<description>House Of Code</description>
	<lastBuildDate>Fri, 13 Aug 2010 15:06:14 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=abc</generator>
		<item>
		<title>Subversion Obliterate, the forgotten feature</title>
		<link>http://blog.projectnibble.org/2008/03/01/subversion-obliterate-the-forgotten-feature/</link>
		<comments>http://blog.projectnibble.org/2008/03/01/subversion-obliterate-the-forgotten-feature/#comments</comments>
		<pubDate>Sat, 01 Mar 2008 20:28:23 +0000</pubDate>
		<dc:creator>Benny Bottema</dc:creator>
				<category><![CDATA[Version Control]]></category>
		<category><![CDATA[cvs]]></category>
		<category><![CDATA[obliterate]]></category>
		<category><![CDATA[revision control]]></category>
		<category><![CDATA[Subversion]]></category>
		<category><![CDATA[svn]]></category>

		<guid isPermaLink="false">http://blogs.quintor.nl/bbottema/2008/03/01/subversion-obliterate-the-forgotten-feature/</guid>
		<description><![CDATA[Sometimes it is best to know forehand some of the more obscure features and limitations of a software product, before diving in. One such obscure limitation is that of the infamous Obliterate feature of the Version Control software, Subversion, that people only learn of when they discover it is not there. Will you need it? [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Sometimes it is best to know forehand some of the more obscure features and limitations of a software product, before diving in. One such obscure limitation is that of the infamous Obliterate feature of the Version Control software, Subversion, that people only learn of when they discover it is not there. Will you need it? Most likely yes, at some point. Especially if you are dealing with a large codebase, you will want to be wary of Subversion, however great its existing feature are. Read on.</strong></p>
<p><span id="more-5"></span></p>
<p><strong>In a nutshell</strong>, Subversion is Open Source, therefor is free, it is time tested and is actively being developed for. For many, this alone is enough reason to use Subversion for their version control needs. It is the supposed successor to CVS and therefor boasts most of the features CVS had, better and more. According to the <a href="http://subversion.tigris.org/">feature list</a> on the Subversion homepage:</p>
<blockquote><p><strong>Most current CVS features.</strong></p>
<ul>
<li> Subversion is meant to be a better CVS, so it has most of CVS&#8217;s features. Generally, Subversion&#8217;s interface to a particular feature is similar to CVS&#8217;s, except where there&#8217;s a compelling reason to do otherwise.</li>
</ul>
</blockquote>
<p>This sounds really good, and this is only one item of the list. Yet still, one feature is missing. Can you guess it?</p>
<h2>The need to Obliterate</h2>
<p>Obliterate means &#8216;really removing stuff from the repository, seriously&#8217;. When you check in files and at some point decide you need  it removed, normally you would go and simply use the <em>delete</em> command for Subversion. Either manually by command line, or through some automated tool such as <a href="http://tortoisesvn.net/">TortoiseSVN</a>. However, you don&#8217;t really delete it from the repository, it is only <em>marked</em> as deleted. Now why would you want to completely obliterate anything from a repository including version history?</p>
<p>There are a couple of situations that might arise:</p>
<ul>
<li>You accidently<a href="http://subversion.tigris.org/servlets/ReadMsg?listName=dev&amp;msgNo=119876"> checked in sensitive information</a> and need it removed</li>
<li> You are<a href="http://subversion.tigris.org/issues/show_bug.cgi?id=516#desc40"> running a large codebase</a> and need to archive old repository entries to<a href="http://subversion.tigris.org/servlets/BrowseList?list=users&amp;by=thread&amp;from=169473"> clean up to save drivespace</a></li>
<li> You need to split up a repository in several others for some reason, maybe a project needs to be split up</li>
<li> You<a href="http://subversion.tigris.org/issues/show_bug.cgi?id=516#desc50"> accidently checked in large chunks of (unused) information</a> (perhaps  some .iso was somehow included), which is sitting there bloating your repository for no good reason</li>
</ul>
<p>All these cases have already happened. Most notably, the first case <a href="http://svn.haxx.se/dev/archive-2004-08/0163.shtml">happened with the Apache codebase</a>, where third-party code that Apache did not have intellectual rights of was checked into the Subversion repository. They simply couldn&#8217;t get it out, because there was no command like Obliterate. Deleting them the normal way wasn&#8217;t enough, since you could still get to the pre-deletion version. There is no way, at all, to accomplish this&#8230; save for one workaround that is not bulletproof (we&#8217;ll come to that).</p>
<p>These are not use cases I came up with. They are suggested many times already and the subversion dev team knows about these. In fact, and here&#8217;s something that will blow your mind, they have known about these problems for 7 years. Say what? Take a look at the <a href="http://subversion.tigris.org/issues/show_bug.cgi?id=516">Obliterate feature request</a> in the Subversion issue tracker. All these use cases have been discussed and summarized there, and are acknowledged as valid ground for feature implementation. Notice the first post of October 2001. It was then when it was first &#8216;officially&#8217; reported as an issue.</p>
<p>Also take a look at the feature requests on the <a href="http://subversion.tigris.org/servlets/SearchList?list=users&amp;searchText=516&amp;defaultField=body&amp;Search=Search">mailing lists</a>.</p>
<h2>The broken workaround</h2>
<p>There exists a feature in Subversion called &#8216;dump&#8217;. It allows you to dump the entire repository into a single file. Then there is the feature &#8216;load&#8217;, that can fill an existing (empty) repository from  such a dump file. The workaround revolves around a third feature called &#8216;dumpfilter&#8217;. With this, you can filter a dump file and so remove files with a pathbased matching pattern.</p>
<p>This works up to a certain point:</p>
<ul>
<li> It is cumbersome, and works inconsistent in various environments (related to filesystems and trailing slashes)</li>
<li> It is very slow (can end up in tens of hours for very large codebases)</li>
<li> It does not always work (the infamous <a href="http://archives.devshed.com/forums/development-94/svndumpfilter-invalid-copy-source-path-1286334.html">&#8216;Invalid copy source path&#8217; error</a>)</li>
</ul>
<p>So while it is very nice to have at least some workaround to fall back to, it sometimes simply isn&#8217;t a viable option. At least with CVS you could dive into the repository itself and remove the files manually. In Subversion not so (I&#8217;m not implying though CVS is a better alternative).</p>
<h2>So, after 7 years, where the hell is it?</h2>
<p>That&#8217;s the billion dollar question. Or to be more accurate, that&#8217;s the X dollar question, where X is the bounty that some suggested should be offered for whoever gets the feature in (<a href="http://subversion.tigris.org/issues/show_bug.cgi?id=516#desc56">cit.</a>). Apparently the problem lies in the nature of Subversion&#8217;s filesystem; working in an Obliterate command supposedly requires tons of requirement specifications, design reports and even more debates on these before even a capable programmer could be put on the matter, with a salary from a sponsor. All this may be true, but&#8230; let me reiterate:</p>
<p><em>Open source. Seven years.</em></p>
<p>Apparently Subversion&#8217;s codebase is so complex that it simply isn&#8217;t accessible enough  for the public to come up with a patch all this time. Remember Subversion  has been one of the accepted de facto standards for Revision Control for many years, it should be one of the more prolific Open Source projects running to date. Yet after seven years there has been no activity for an Obliterate command, save a whole lot of brain activity. In fact it apparently is so inaccessible, the Subversion development team itself doesn&#8217;t feel confident it can pull it off without rewriting the filesystem (<a href="http://subversion.tigris.org/issues/show_bug.cgi?id=516#desc1">cit.</a>). I&#8217;m not trying to trivialize the situation, it&#8217;s no small task and documentation certainly is important. The truth is that the issue has been dead in the water for many years, while question marks keep popping up around the web.</p>
<p>How is it possible that such a widely acknowledged feature is still missing after all these years. Perhaps planned already? Let&#8217;s see, what is Subversion&#8217;s (official) standpoint on this:</p>
<ul>
<li>It is not on the <a href="http://subversion.tigris.org/roadmap.html">roadmap</a>, medium or long term</li>
<li> the <a href="http://svnbook.red-bean.com/en/1.4/svn.reposadmin.maint.html#ftn.id2593959">Subversion guide (note 35)</a> (<a href="http://svnbook.red-bean.com/">SVN Guide</a> by red-bean) mentions this feature is planned, though posts on the web suggest it has been in there since the beginning of time</li>
<li> The<a href="http://subversion.tigris.org/issues/show_bug.cgi?id=516"> issue tracker</a> promises no timeframe and in fact states the development team is reluctant to do anything until design documents have been produced</li>
</ul>
<p>Finally there is the ubiquitous <a href="http://subversion.tigris.org/faq.html#removal">FAQ entry</a> about version history removal that states:</p>
<blockquote><p><strong>How do I completely remove a file from the repository&#8217;s history?</strong><br />
There are special cases where you might want to destroy all evidence of a file or commit. (Perhaps somebody accidentally committed a confidential document.) This isn&#8217;t so easy,<em> <strong>because Subversion is deliberately designed to never lose information</strong>.</em> Revisions are immutable trees which build upon one another. Removing a revision from history would cause a domino effect, creating chaos in all subsequent revisions and possibly invalidating all working copies.The project has plans, however, to someday implement an svnadmin obliterate command which would accomplish the task of permanently deleting information. (See issue tracker, issue 516.)</p>
<p>In the meantime, your only recourse is to svnadmin dump your repository, then pipe the dumpfile through svndumpfilter (excluding the bad path) into an svnadmin load command. See chapter 5 of the Subversion book for details about this.</p></blockquote>
<p>It all seems a case of a design flaw that is almost irreparable due to a complex filesystem implementation and seven years of labor on this implementation.</p>
<h2>What to do now</h2>
<p>There seems little we can do. Try downloading the <a href="http://subversion.tigris.org/servlets/ProjectDocumentList?folderID=260&amp;expandFolder=74">sourcecode</a> and see if you can make sense of it all. Be aware, even the core developers are afraid to touch it without refined documentation backup them up. Maybe go along with the bounty idea and attract <a href="http://c2.com/cgi/wiki?CowboyCoder">Cowboy Coders</a> that lack the compulsive need for documentation.</p>
<p>Meanwhile, take a look at the comparison list of <a href="http://en.wikipedia.org/wiki/Comparison_of_revision_control_software">revision Control software</a>.</p>
<p>Finally, here&#8217;s a <a href="http://svn.haxx.se/dev/archive-2008-02/0434.shtml">semi-interview</a> from 27 February 2008 I found, where Karl Fogel states what needs to be done to get the ball rolling.</p>
<p><img src="http://images.slashdot.org/favicon.ico" border="0" alt="Slashdot" width="16" height="16" /> <a href="http://slashdot.org/slashdot-it.pl?op=basic&amp;url=http://blogs.quintor.nl/bbottema/2008/03/01/subversion-obliterate-the-forgotten-feature/">Slashdot It!</a> /   <a href="http://blogs.quintor.nl/bbottema/2008/03/01/subversion-obliterate-the-forgotten-feature/trackback/">trackback</a><br />
<a href="http://technorati.com/faves?sub=addfavbtn&amp;add=http://blogs.quintor.nl/bbottema"><img src="http://static.technorati.com/pix/fave/btn-fave2.png" alt="Add to Technorati Favorites" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.projectnibble.org/2008/03/01/subversion-obliterate-the-forgotten-feature/feed/</wfw:commentRss>
		<slash:comments>22</slash:comments>
		</item>
	</channel>
</rss>
