Jumping ship! From Subversion To Mercurial

I've been a big fan of Subversion since 2005, but since lately I've been having a bit of distributed source-control envy. Many people seem to be switching to Git and Mercurial, and frankly I've felt a bit left behind.

For some smaller stuff I've been starting to use Mercurial a bit more, and I've been pretty easily convinced since then. If you have some random code lying around, and need to make some changes you might need to revert? Just enter "hg init ." and now it's a repository. hg add, hg commit and it's committed as a first repository.

So I've bit the bullet and now also converted SabreDAV to Mercurial, which was a very easy process using Google's manual (which by the way could apply for non-google repo's too). The biggest change from here on is to remember to type hg instead of svn.

Joel Spolsky actually recently wrote a nice tutorial for hg, pretty easy to get through; especially if you already understand version control.


7 Responses to Jumping ship! From Subversion To Mercurial

  1. 1083 mattijs 2010-02-25 9:43 am

    Hi Evert,

    Great you switched to distributed version control. Besides local commits it also allows greater cooperation between developers, especially in open source projects. SabreDAV could benefit from that.

    It has a lot to do with preference what dvc you choose. Did you consider using Git for SabreDAV? Or did you want to stick with google code and therefore could only use mercurial?

    cheers

  2. 1085 David 2010-02-25 11:30 am

    You mentioned Git and Mercurial, but not Bazaar. Was it considered?

  3. 1086 Evert 2010-02-25 2:51 pm

    @mattijs: The reason to go for Git instead of Mercurial was not out of my own experience, but mostly from what I've read from other people.. which is that hg seems feels more like a tight set of tools, where there are a ton of ways to do anything with Git.

    The fact that googlecode only has support for svn and hg was also pretty major.

    @David: Quite frankly I hadn't thought of Bazaar. I heard about it before but I know very little about it. Curious how it compares.

  4. 1087 Oleg 2010-02-25 4:59 pm

    Yeah, I recently switched from svn to Git and I like it so far. I proposed switching FM-codebase to Git as well to Dave, but he seems reluctant to do so :)

  5. 1088 Evert 2010-02-26 4:13 am

    I'm already running into some 'interesting' issues with hg, I do think there's a benefit to having everything central when working in a company.

    That said, I think you can just hook your git to use SVN as a backend.. everybody happy =)

  6. 1090 Oleg 2010-03-02 5:16 pm

    Well, I have a master which is central, but the centralization is just conceptual.
    BTW - what are the 'interesting' issues you are having?

  7. 1091 Evert 2010-03-02 6:32 pm

    Branching and remerging is only sequential. This means that if I would create a separate branch ('live' for example) and the main branch ('trunk' in svn terms) gets 2 changes. We only want the second change to go to the live branch.

    There's now no clean way to just merge change 2, because merges can only happen in order. There's an hg extension called 'transplant', which kind of does that.. but not really.

    I guess I'm just missing the flexibility of the arbitrary merging svn had.

Leave a Reply



About

My name is Evert, and I've been writing semi-regularly on this blog since 2006.

I'm currently available for contract work.

more info.

Subscribe

Dropbox

Dropbox is a simple cross-platform online backup and sync application. The first 2GB of space is free, and both you and me get an extra 250MB extra space if you sign up through this link.