<?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/mercurial/atom.xml" rel="self"/>
 <link href="http://davedash.com/tag/mercurial"/>
 <updated>2012-01-17T21:54:19-08:00</updated>
 <id>http://davedash.com/</id>
 <author>
   <name>Dave Dash</name>
   <email>dd+atom1@davedash.com</email>
 </author>

 
 <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>

