Git, Mercurial and Bazaar – A Comparison

Open-source Version Control Systems have come a long way since the days of CVS. SVN, one of the most successful VCS to be ever used,  is now loosing its ground to a new genre of VCS known as DVCS or Distributed Version Control Systems. A DVCS or Distributed Version Control System is a version control software where each working copy contains the full history of all the revisions, thereby making it a fully functional code-base repository and a remote backup to the original code-base. With the increasing size of teams working on the same code-base, the need for DVCS was apparent. We are going to compare the three most popular open-source DVCSs – i.e. Git, Mercurial and Bazaar.

Some early DVCS were BitKeeper and Monotone. The Linux Project can be credited for the creation of two of the most popular DVCSs, i.e. GIT and Mercurial. The Ubuntu development group later joined in by the creation of Bazaar.

Git was created after BitKeeper, the original Linux Kernel DVCS, decided to restrict its licensing. It was created by Linus Torvalds himself and targeted at high performance and an extensive set of advanced features. As a mater of fact,  another very popular Open-source DVCS called Mercurial was created because of BitMover’s (company behind BitKeeper) decision to remove the free version. Mercurial was written in python. It was initially meant to run only on Linux  but was later ported to Windows. The Ubuntu community with the backing to Canonical Limited, created their own DVCS called Bazaar. It was later Open-sourced along with the LaunchPad platform for hosting repositories.

Let us see some of the similarities among the three

  1. The License: Not to forget! The most important thing while considering the use of any software is “the License”. Git, Mercurial and Bazaar are all licensed under the GPL.
  2. Support for Atomic Commits: It is an operation in which a set of distinct changes is applied as a single operation and when the changes are applied the atomic commit is said to have succeeded. All of Git, Mercurial and Bazaar support this vital feature.
  3. Support for Symbolic Links: All the three have support for symbolic links
  4. Pre and Post event hooks: All of them support Pre and Post event hooks making them extremely useful in staging and deployment scenarios.
  5. Merge Tracking: The three of them support Merge Tracking
  6. Revision Tags: All of them have support for Revision Tags
  7. RCS Keywords: Git, Mercurial and Bazaar have support for standard Revision Control System Keywords
  8. Interactive commits: Interactive commits allow the user to cherry-pick the patch-hunks that become part of a commit, instead of having only a file-level granularity. All of the three support Interactive commits.
  9. External References: The three allow embedding of foreign repositories in the source tree, i.e. support for external reference.

Now for the differences in the three:

  1. Basic Binaries Structure: Git, the most powerful of the three, is more of a tool-set (git-pull, git-merge, git-checkout etc which form the git-core) than a single binary which supports DVCS commands, where as Bazaar and Mercurial are single monolith binaries with command arguments performing various DVCS actions.
  2. Ease of Use: For a beginner who is new to Version Controls Git will definitely seem much more confusing than the other two, and one has to go through all the VCS jargon like merging, branching, tagging etc to have a grip over Git. On the other hand Mercurial and Bazaar are quiet easy to catchup and understand. Although both have advanced features, they are neatly abstracted under a simpler command structure.
  3. Power to the User: Git seems to be the most powerful out of the three in-terms of the flawless set of features it provides. The very reason why some of the biggest projects like to use Git. In-fact Git was designed to be powerful.
  4. Performance: In terms of raw performance, Git leads almost all benchmarks followed by Mercurial and then by Bazaar. A detailed benchmark can be found here.
  5. Final Repository Size: Again Git stores wins here, with the least size of the Final Repository. It is followed by Bazaar and then by Mercurial. Reference: GitBenchMarks
  6. Network Protocols Supported: Git has support for 3 protocols HTTP/HTTPS, SSH and the GIT protocol. Mercurial supports 2 of them HTTP/HTTPS or SSH.  Bazaar supports HTTP/HTTPS and SSH by default, but with plugins it can also support SFTP and RSYNC protocols.
  7. Design Differences: Mercurial and Bazaar are FILE LEVEL VCS as they store versions of files but GIT is a CONTENT LEVEL VCS i.e.  it stores delta of content, not the file itself: two files with the same content will be stored only once.
  8. Repository Hosting: For open-source and private repository hosting both Mercurial and Git are way ahead of Bazaar in-terms of number of Source code hosting providers available. When there are more than 9 hosting providers for Mercurial and about 8 hosting providers for Git, only 3 hosting providers are available for Bazaar.
  9. Usage by Popular Open-source Projects: When there are about 11 popular Open-source projects which are version controlled by Bazaar, there are about 29 popular projects which use Mercurial as a VCS and more than 65 popular projects which use Git as their Source Control.
  10. Free Private Repository Hosting: For coders looking to host their private projects for free, Mercurial has BitBucket which provides a whopping 1GB for hosting single Private repository. for Git there is Unfuddle which provides 200 MB for a single project with multiple repository support.  Git also has ProjectLocker which provides about 500 MB space for unlimited repositories though with a messy Web UI. I couldn’t find any similar service providers for Bazaar though.

The Conclusion: If you are a big group of professional coders working on a huge project with lots of moving parts Git is the best open-source DVCS out their for you guys, but if your team has trainees and noobs then Mercurial or Bazaar is what you should go for. Again if you are working on a project closely related to the Ubuntu project launchpad should be your platform and Bazaar should be your DVCS.

This entry was posted in Comparisons and tagged , , , , , , , , , , , , , , , , , , . Bookmark the permalink.

22 Responses to Git, Mercurial and Bazaar – A Comparison

  1. Pingback: Tweets that mention Git, Mercurial and Bazaar – A Comparison | TechTatva -- Topsy.com

  2. Pingback: 版本管理系統的戰國時代 | bossliaw

  3. Pingback: Как избавиться от страха и чувства тревоги, беспокойства без причины и стресса

  4. Pingback: как избавиться от чувства вины

  5. Pingback: как избавиться от чувства вины и стыда

Leave a Reply to Anonymous Cancel reply

Your email address will not be published. Required fields are marked *