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?
- Subversion python bindings could not be loaded
- Confusing .gitignore syntax
- Migration from StarTeam to distributed source control
- What is the equivalent of hg up -C in git
- Strategies for multiplatform project repository design
- How to migrate/convert from SVN to Mercurial (hg) on windows
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.