My Story of Mercurial and Subversion

I'm really getting attached to using Mercurial. I've been a Subversion fan for years but when Ben Collins-Sussman (one of the authors of Subversion) mentioned he's been using Mercurial, I took that as a pretty solid endorsement. I'm not saying I'm jumping ship but I definitely have found some of the things I can do with hg to be pretty convenient compared to the way I've been using Subversion. I've used the two for different types of projects though. My subversion repositories have held the code and resources for my websites for a long time. I've also worked on shared C/C++ applications with Jeff and stored our stuff on an SVN server. It's really convenient since it works well across OSes and I have a central server that I can reach from pretty much wherever I want.

Mercurial on the other hand, I first set up to get at current Mozilla source code. Then the Go project code came out and it's in a Mercurial repo too. So I had this handy little hg command ready to go on all my computers. When I put stuff in a Subversion repo, I feel like I should be organized. I think this comes from the way I've set up the SVN server I use the most. Now I get an idea for some project that I want to try out with Go and I write a little code. After that I just go to the command line and do hg init followed by hg commit (roughly). Every machine is a server and a client. If the project turns in to something I want to share I can either share it locally with hg serve or I can send it to a public repo like Google Code by doing hg push.

The sharing step is one place that's easier than Subversion. The way I know to do the same thing with svn is more complex: I have to create the repo and check out a working copy of the code. Of course whatever is in a new repo is just an empty folder so if I've already written some code I have to copy some files around to populate the working copy & check it in.

Subversion is a very mature project and I don't intend to move away from it. But Mercurial has made me more relaxed about creating a repo so I can just start coding - with revision control.

0
Your rating: None

Right, nothing against git. Just my path took me to hg first. Reading Sam's post makes me want to look at hooks for hg too now...

Typo: "authour"

Fixed, thx.