<?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>t+1 &#187; subversion</title>
	<atom:link href="http://blog.tplus1.com/index.php/category/subversion/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.tplus1.com</link>
	<description>Programming, gardening, economics, life in Cleveland Heights</description>
	<lastBuildDate>Sat, 07 Jan 2012 21:12:21 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Use bazaar and subversion together</title>
		<link>http://blog.tplus1.com/index.php/2008/03/22/use-bazaar-and-subversion-together/</link>
		<comments>http://blog.tplus1.com/index.php/2008/03/22/use-bazaar-and-subversion-together/#comments</comments>
		<pubDate>Sun, 23 Mar 2008 01:18:57 +0000</pubDate>
		<dc:creator>matt</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[subversion]]></category>

		<guid isPermaLink="false">http://blog.tplus1.com/index.php/2008/03/22/use-bazaar-and-subversion-together/</guid>
		<description><![CDATA[Subversion is great and I have been using it for years.  But I keep running into the same two problems over and over:

I did a bunch of work and I want to commit it, but I don&#8217;t have network access.
I spent a day playing around with a crazy idea, and I want to store [...]]]></description>
			<content:encoded><![CDATA[<p>Subversion is great and I have been using it for years.  But I keep running into the same two problems over and over:</p>
<ul>
<li>I did a bunch of work and I want to commit it, but I don&#8217;t have network access.</li>
<li>I spent a day playing around with a crazy idea, and I want to store my half-finished and buggy work.  I don&#8217;t want to put it into the trunk because it will break a bunch of other people&#8217;s work.  I don&#8217;t want to make a branch because I find branching and merging again to be tedious.</li>
</ul>
<p>Both problems could be solved if I could make commits that were local to my hard drive and visible to me only.</p>
<p>Today I spent a few hours on IRC and I found out that bazaar plays really nicely with subversion, and now I have a solution.</p>
<ol>
<li>First, I loaded my subversion repository into bazaar.  Here&#8217;s the command I ran:
<p><code>bzr branch svn+http://my-svn-repository.example.com/myproj</code></p>
<p>My subversion repository has 990 revisions.  This command took about 3 minutes to finish.</li>
<li>Then I went into the local myproj directory and edited some code.  I used <code>bzr status</code> and <code>bzr diff</code> to see what I changed while I worked.  They operate nearly identically to their svn counterparts, but <code>bzr diff</code> has no <code>--summarize</code> option.</li>
<li>Committing locally is really simple:
<p><code>bzr commit -m &quot;This is a local commit and svn won&#039;t see it!&quot;</code></p>
</li>
<li>Then I did some more edits and committed those:
<p><code>bzr commit -m &quot;OK, now maybe I have something that I want to put into subversion.&quot;</code></p>
</li>
<li>Before committing to the subversion repository, I pulled down other people&#8217;s updates to the subversion repository like this:
<p><code>bzr pull svn+http://my-svn-repository.example.com/myproj</code></p>
<p>This is a lot like running <code>svn update</code>.</p>
</li>
<li>After making sure my stuff plays nice with other people&#8217;s updates, I pushed my stuff into subversion:
<p><code>bzr push svn+http://my-svn-repository.example.com/myproj</code></li>
<li>Now when anyone runs svn update in their subversion working copy, they will get my work along with my commit comment.</li>
</ol>
<p>So far, I&#8217;m really happy with this set up.  The <a href="http://bazaar-vcs.org/BzrForeignBranches/Subversion/FAQ">Bazaar-Subversion FAQ</a> had a lot of really useful tips.  Finally, there&#8217;s still a lot of stuff I haven&#8217;t tried yet, like renaming or copying files with svn.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.tplus1.com/index.php/2008/03/22/use-bazaar-and-subversion-together/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
		</item>
		<item>
		<title>How to use vimdiff as the subversion diff tool</title>
		<link>http://blog.tplus1.com/index.php/2007/08/29/how-to-use-vimdiff-as-the-subversion-diff-tool/</link>
		<comments>http://blog.tplus1.com/index.php/2007/08/29/how-to-use-vimdiff-as-the-subversion-diff-tool/#comments</comments>
		<pubDate>Wed, 29 Aug 2007 19:40:42 +0000</pubDate>
		<dc:creator>matt</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[subversion]]></category>
		<category><![CDATA[vim]]></category>

		<guid isPermaLink="false">http://blog.tplus1.com/index.php/2007/08/29/how-to-use-set-up-vimdiff-as-the-subversion-diff-tool/</guid>
		<description><![CDATA[vimdiff is fantastic. Follow these instructions to make subversion use vimdiff when you run svn diff.
Get this diffwrap.sh script and save it anywhere.  I saved mine in my $HOME/bin directory.  Make sure to make it executable!  I&#8217;m showing it below:

#!/bin/sh

# Configure your favorite diff program here.
DIFF=&#34;/usr/bin/vimdiff&#34;

# Subversion provides the paths we need [...]]]></description>
			<content:encoded><![CDATA[<p>vimdiff is fantastic. Follow these instructions to make subversion use vimdiff when you run <code>svn diff</code>.</p>
<p>Get <a href="http://svnbook.red-bean.com/en/1.4/svn.advanced.externaldifftools.html#svn.advanced.externaldifftools.diff.ex-1">this diffwrap.sh script</a> and save it anywhere.  I saved mine in my $HOME/bin directory.  Make sure to make it executable!  I&#8217;m showing it below:<br />
<pre><code>
#!/bin/sh

# Configure your favorite diff program here.
DIFF=&quot;/usr/bin/vimdiff&quot;

# Subversion provides the paths we need as the sixth and seventh
# parameters.
LEFT=${6}
RIGHT=${7}

# Call the diff command (change the following line to make sense for
# your merge program).
$DIFF $LEFT $RIGHT

# Return an errorcode of 0 if no differences were detected, 1 if some were.
# Any other errorcode will be treated as fatal.
</code></pre></p>
<p>Then change your $HOME/.subversion/config file to point at that script:<br />
<pre><code>
[helpers]
diff-cmd = /home/matt/bin/diffwrap.sh
</code></pre></p>
<p>Then go diff a file!</p>
<p>See <a href="http://svnbook.red-bean.com/en/1.4/svn.advanced.externaldifftools.html">this section of the svn book</a> for all the details.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.tplus1.com/index.php/2007/08/29/how-to-use-vimdiff-as-the-subversion-diff-tool/feed/</wfw:commentRss>
		<slash:comments>14</slash:comments>
		</item>
	</channel>
</rss>

