How does Mercurial stack up against GIT and SVN?

With Phil Haack and others recently tweeting about CodePlex’s move to support Mercurial as a DVCS, I thought it might be worth a look.

As someone who currently uses SVN for personal projects and TFS at The Office, how does Mercurial compare in terms of usability, features and what are some of the better Mercurial hosting services available?

  • Diffing between two entire directories/projects?
  • What of Eclipse project .metadata can I safely ignore in Git/Mercurial?
  • What is the state of the art user interface for browsing complex version control system history?
  • Mercurial <--> git cheat sheet?
  • Using git-remote-hg on windows
  • Putting a project in Eclipse under source control
  • What happens to original changesets after an Hg “history rewrite” (histedit, commit --amend), and how can they be recovered?
  • Repair links between moved files in Mercurial
  • 6 Solutions collect form web for “How does Mercurial stack up against GIT and SVN?”

    As far as comparing to Git, Google recently published an interesting comparison of Git and Mercurial based on their evaluation: http://code.google.com/p/support/wiki/DVCSAnalysis

    Compared to SVN, for which I recently worked with again after quite awhile, Mercurial is amazing. It gave me a feeling of “Why would anyone use SVN anymore”. SVN is pretty good, but Mercurial really does just work better.

    For personal projects I would switch without a doubt to a DVCS. It does everything SVN does but better, and much faster. The “learning curve” is just understanding some terminology.

    In reality the difference between SVN and a DVCS is that everyone has a full working repository on their system. If you decide to have a “master server”, it is exactly the same as what you have, except it is setup to continually serve over a network. To sync these all you do is send/receive(push/pull) the changes between these repositories.

    About comparing Mercurial with Git – see this SO question: Git and Mercurial – Compare and Contrast (and my long answer there).

    About comparing Mercurial with svn – see this SO question: For home projects, can Mercurial or Git (or other DVCS) provide more advantages over Subversion? (theoretically this question is limited in range, though; I wrote about Git vs Subversion in my answer).

    One thing not mentioned in the Google comparison was that Git appears to be much faster. Mercurial seems fast enough (with small projects at least) but Git is simply lightning-fast no matter what size the project.

    It’s probably just me, but I have been using Mercurial for six months, after several years of using SVN exclusively, and for some reason it just doesn’t fit my mental model as well. I know exactly what I’m doing in SVN, and if something goes wrong, I pretty much always know how to fix it. Conceptually I have no problem with Mercurial – love that I have a local copy of the repository, for example – but in practise I am always losing things. I think it might be because a merge in SVN is quite a big deal, whereas in Hg it’s the normal way of things. I want more control over my merges. In SVN it’s always clear which changeset precedes which, but Mercurial seems to lack this. Even TortoiseHg, which is quite nice visually, doesn’t seem to offer enough opportunities to see exactly what’s being merged.

    SVN has lots of support by 3rd party tools including IDE and bug tracking systems etc including the rather nice TortoiseSVN.

    Most developers have used SVN in the past, so getting new developers up to speed on your team is quicker with SVN.

    How important this sort of thing is to you, only you can decide.

    Git Baby is a git and github fan, let's start git clone.