<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">

 <title>Dave Dash</title>
 <link href="http://davedash.com/tag/svn/atom.xml" rel="self"/>
 <link href="http://davedash.com/tag/svn"/>
 <updated>2012-04-07T22:42:44-07:00</updated>
 <id>http://davedash.com/</id>
 <author>
   <name>Dave Dash</name>
   <email>dd+atom1@davedash.com</email>
 </author>

 
 <entry>
   <title>git svn rebase... forever?</title>
   <link href="http://davedash.com/2009/08/12/git-svn-rebase-forever/"/>
   <updated>2009-08-12T00:00:00-07:00</updated>
   <id>http://davedash.com/2009/08/12/git-svn-rebase-forever</id>
   <content type="html">&lt;p&gt;While working on &lt;a href=&quot;http://addons.mozilla.org/&quot;&gt;addons.mozilla.org&lt;/a&gt; I ran into an issue of &lt;code&gt;git svn rebase&lt;/code&gt; continually asking me to merge a file, over and over.&lt;/p&gt;

&lt;p&gt;I had a branch open for a bug.  In that branch I wrote a library.  While that bug was under review, I had to use that library in a new branch for another bug - and had to develop on it a bit.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;$ git co -b bug1 master
$ vi libs/mylib.php # make the lib
$ git add .
$ git commit -m &quot;my new lib&quot;
$ git checkout -b bug2 master
$ git checkout bug1 libs/mylib.php # copies this file from one branch to the next
$ git commit -m &quot;lib copied over&quot;
$ vi libs/mylib.php # hack on the lib 
$ git commit -m &quot;awesomized lib&quot;
$ git svn dcommit # push it up
$ git checkout bug1
$ git svn rebase #... oh shit
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;So the rebase was happening.  This is git trying to merge your changes in bug1 and bug2 and play them together in realtime nicely, asking you each step of the way to merge things manually.  I thought something weird was happening since &quot;libs/mylib.php&quot; kept needing manual merging.  Then I noticed that git is applying a series of patches, and that eventually this will resolve and your site will be rebased.&lt;/p&gt;

&lt;p&gt;Don't lose hope, &lt;code&gt;git svn rebase&lt;/code&gt; will finish.&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Creating a new project in Mercurial versus SVN</title>
   <link href="http://davedash.com/2008/07/22/creating-a-new-project-in-mercurial-versus-svn/"/>
   <updated>2008-07-22T00:00:00-07:00</updated>
   <id>http://davedash.com/2008/07/22/creating-a-new-project-in-mercurial-versus-svn</id>
   <content type="html">&lt;p&gt;One of the most annoying things about creating new SVN projects is the new project dance:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;$ svnadmin create $SVNREP_DIR/newproject
$ svn mkdir -m &quot;layout creation&quot; file:///$SVNREP_DIR/newproject/trunk file:///$SVNREP_DIR/newproject/tags file:///$SVNREP_DIR/newproject/branches
$ mkdir newproject
$ cd newproject
$ svn import -m &quot;initial import&quot; . file:///$SVNREP_DIR/newproject/trunk
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Oh... yeah, no this isn't that bad.&lt;/p&gt;

&lt;p&gt;It's this part that's bad:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;$ cd ..
$ mv newproject newproject.tmp
$ svn co file:///$SVNREP_DIR/newproject/trunk newproject
$ # do sanity check here...
$ rm -rf newproject.tmp
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;That's a lot of work, and it's actually hard to remember unless you do it a lot.&lt;/p&gt;

&lt;p&gt;Here's the mercurial equivalent:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;$ mkdir -p newproject/trunk
$ cd newproject
$ mkdir branches tags
$ hg init
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;That's it.  It's not apples to apples of course.  Mercurial keeps its repository locally, and does very simple push/pull commands for synchronization.  But the dreaded dance of removing a project after it's been imported and then checking out the project is really a peeve of mine.&lt;/p&gt;
</content>
 </entry>
 

</feed>

