<?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>Made of Bugs &#187; svk</title>
	<atom:link href="http://blog.nelhage.com/tag/svk/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.nelhage.com</link>
	<description>It's software. It's made of bugs.</description>
	<lastBuildDate>Thu, 18 Aug 2011 21:57:23 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>6.170, CVS, and SVN</title>
		<link>http://blog.nelhage.com/2007/02/3/</link>
		<comments>http://blog.nelhage.com/2007/02/3/#comments</comments>
		<pubDate>Sun, 11 Feb 2007 05:33:00 +0000</pubDate>
		<dc:creator>nelhage</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[6.170]]></category>
		<category><![CDATA[cvs]]></category>
		<category><![CDATA[svk]]></category>
		<category><![CDATA[svn]]></category>
		<category><![CDATA[tailor]]></category>
		<category><![CDATA[vcs]]></category>

		<guid isPermaLink="false">http://nelhage.scripts.mit.edu/madeofbugs/?p=3</guid>
		<description><![CDATA[I&#8217;m taking 6.170 Lab in Software Engineering this semester. The course sucks in various ways, but one of the most egregious, in my opinion, is that they force you to use CVS for your version control. Problem sets are distributed by the TAs importing them into your repository, and are then checked out later to [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m taking <a href="http://web.mit.edu/6.170/www/">6.170</a> Lab in Software
Engineering this semester. The course sucks in various ways, but
one of the most egregious, in my opinion, is that they <em>force</em> you to
use CVS for your version control. Problem sets are distributed by the
TAs importing them into your repository, and are then checked out
later to be graded. Well, CVS sucks, and there&#8217;s no way I&#8217;m going to
use it when there are sane, modern alternatives like SVN and
<a href="http://svk.bestpractical.com/">SVK</a></p>

<p>Luckily for sanity, there&#8217;s a great piece of software called
<a href="http://www.darcs.net/DarcsWiki/Tailor">Tailor</a> designed to solve exactly this problem &#8212; it lets you
mirror a repository that uses one version control system into one
using another. So, I can mirror the required CVS repository into a svn
repository somewhere, and operate against that.</p>

<p>But the issue is that tailor only really does one-way mirroring; It
doesn&#8217;t do syncing and merging between the two repositories. So, if I
have svn mirror CVS, then changes I make don&#8217;t get propagated back. If
I mirror svn to CVS, I don&#8217;t get new problem sets the TAs import.</p>

<p>My current solution, which I can describe only as “I know what I am
doing is wrong”, is as follows:</p>

<ul>
<li>I have tailor set up to merge from SVN to CVS</li>
<li><code>tailor</code> runs in a SVN post-commit hook, so revisions are
automatically pushed to CVS</li>
<li><p>Whenever the TAs announce a new pset is available, I do the following:</p>

<pre><code># The svn repo is checked out at ~/6.170/psets
# The cvs repo is located at /mit/nelhage/6.170/cvsroot
# The TAs have just announced ps2 is available
$ cd ~/6.170/psets
$ cvs -d /mit/nelhage/6.170/cvsroot co /psets/ps2
$ svn add ps2
$ rm -rf /mit/nelhage/6.170/cvsroot/psets/ps2
$ svn ci -m "ps2 import from CVS"
</code></pre></li>
</ul>

<p>That is to say, I manually add the new problem set to SVN, and then
delete all trace of it from CVS, and then the commit runs tailor to
re-create it in CVS, but keeping svn as the master repository.</p>

<p>The sketchy piece is that I am <em>actually</em> deleting all trace of it
from the CVSROOT; There is no trace whatsoever of the initial import
by the TAs.</p>

<p>However, the same time, it feels somewhat elegant; The svn
repository is at all times the master, containg all the
information in the CVS repository. And, frankly, I&#8217;m uncomfortable
that the TAs are injecting things directly into my repository
anyways, so I have no problem undoing it.</p>

<ul>
<li><a href="http://web.mit.edu/nelhage/Public/6.170.tailor">tailor configuration file</a></li>
<li><a href="http://web.mit.edu/nelhage/Public/psets.post-commit">post-commit hook to run tailor</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://blog.nelhage.com/2007/02/3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

