<p>What do folks here see as the relative strengths and weaknesses of Git, Mercurial, and Bazaar?</p>

<p>In considering each of them with one another and against version control systems like SVN and Perforce, what issues should be considered?</p>

<p>In planning a migration from SVN to one of these distributed version control systems, what factors would you consider?</p>

[{'answer_id': 77631, 'author': 'jfm3', 'author_id': 11138, 'author_profile': 'https://Stackoverflow.com/users/11138', 'pm_score': 1, 'selected': False, 'text': '<p>This is a big question that depends a lot on context that would take you a lot of time to type into one of these little text boxes.  Also, all three of these appear substantially similar when used for the usual stuff most programmers do, so even understanding the differences requires some fairly esoteric knowledge.</p>\n\n<p>You will probably get much better answers if you can break your analysis of these tools down to the point at which you have more specific questions.</p>\n'}, {'answer_id': 77727, 'author': 'Charles Duffy', 'author_id': 14122, 'author_profile': 'https://Stackoverflow.com/users/14122', 'pm_score': 8, 'selected': True, 'text': '<p>Git is very fast, scales very well, and is very transparent about its concepts. The down side of this is that it has a relatively steep learning curve. A Win32 port is available, but not quite a first-class citizen. Git exposes hashes as version numbers to users; this provides guarantees (in that a single hash always refers to the exact same content; an attacker cannot modify history without being detected), but can be cumbersome to the user. Git has a unique concept of tracking file contents, even as those contents move between files, and views files as first-level objects, but does not track directories. Another issue with git is that has many operations (such as <I>rebase</I>) which make it easy to modify history (in a sense -- the content referred to by a hash will never change, but references to that hash may be lost); some purists (myself included) don\'t like that very much.</p>\n\n<p>Bazaar is reasonably fast (very fast for trees with shallow history, but presently scales poorly with history length), and is easy-to-learn to those familiar with the command-line interfaces of traditional SCMs (CVS, SVN, etc). Win32 is considered a first-class target by its development team. It has a pluggable architecture for different components, and replaces its storage format frequently; this allows them to introduce new features (such as better support for integration with revision control systems based on different concepts) and improve performance. The Bazaar team considers directory tracking and rename support first-class functionality. While globally unique revision-id identifiers are available for all revisions, tree-local revnos (standard revision numbers, more akin to those used by svn or other more conventional SCMs) are used in place of content hashes for identifying revisions. Bazaar has support for "lightweight checkouts", in which history is kept on a remote server instead of copied down to the local system and is automatically referred to over the network when needed; at present, this is unique among DSCMs.</p>\n\n<p>Both have some form of SVN integration available; however, bzr-svn is considerably more capable than git-svn, largely due to backend format revisions introduced for that purpose. <I>[Update, as of 2014: The third-party commercial product SubGit provides a bidirectional interface between SVN and Git which is comparable in fidelity to bzr-svn, and considerably more polished; I <B>strongly</B> recommend its use over that of git-svn when budget and licensing constraints permit].</I></p>\n\n<p>I have not used Mercurial extensively, and so cannot comment on it in detail -- except to note that it, like Git, has content-hash addressing for revisions; also like Git, it does not treat directories as first-class objects (and cannot store an empty directory). It is, however, faster than any other DSCM except for Git, and has far better IDE integration (especially for Eclipse) than any of its competitors. Given its performance characteristics (which lag only slightly behind those of Git) and its superior cross-platform and IDE support, Mercurial may be compelling for teams with significant number of win32-centric or IDE-bound members.</p>\n\n<p>One concern in migrating from SVN is that SVN\'s GUI frontends and IDE integration are more mature than those of any of the distributed SCMs. Also, if you currently make heavy use of precommit script automation with SVN (ie. requiring unit tests to pass before a commit can proceed), you\'ll probably want to use a tool similar to <A HREF="https://launchpad.net/pqm" rel="noreferrer">PQM</A> for automating merge requests to your shared branches.</p>\n\n<p>SVK is a DSCM which uses Subversion as its backing store, and has quite good integration with SVN-centric tools. However, it has dramatically worse performance and scalability characteristics than any other major DSCM (even Darcs), and should be avoided for projects which are liable to grow large in terms of either length of history or number of files.</p>\n\n<p>[About the author: I use Git and Perforce for work, and Bazaar for my personal projects and as an embedded library; other parts of my employer\'s organization use Mercurial heavily. In a previous life I built a great deal of automation around SVN; before that I have experience with GNU Arch, BitKeeper, CVS and others. Git was quite off-putting at first -- it felt like GNU Arch inasmuch as being a concept-heavy environment, as opposed to toolkits built to conform to the user\'s choice of workflows -- but I\'ve since come to be quite comfortable with it].</p>\n'}, {'answer_id': 77794, 'author': 'Herge', 'author_id': 14102, 'author_profile': 'https://Stackoverflow.com/users/14102', 'pm_score': 3, 'selected': False, 'text': "<p>Mercurial and Bazaar resemble themselves very much on the surface. They both provide basic distributed version control, as in offline commit and merging multiple branches, are both written in python and are both slower than git. There are many differences once you delve into the code, but, for your routine day-to-day tasks, they are effectively the same, although Mercurial seems to have a bit more momentum.</p>\n\n<p>Git, well, is not for the uninitiated. It is much faster than both Mercurial and Bazaar, and was written to manage the Linux kernel. It is the fastest of the three and it is also the most powerful of the three, by quite a margin. Git's log and commit manipulation tools are unmatched. However, it is also the most complicated and the most dangerous to use. It is very easy to lose a commit or ruin a repository, especially if you do not understand the inner workings of git.</p>\n"}, {'answer_id': 77834, 'author': 'Craig Trader', 'author_id': 12895, 'author_profile': 'https://Stackoverflow.com/users/12895', 'pm_score': 0, 'selected': False, 'text': '<p>Distributed version control systems (DVCSs) solve different problems than Centralized VCSs.  Comparing them is like comparing hammers and screwdrivers.</p>\n\n<p><a href="http://en.wikipedia.org/wiki/Revision_control" rel="nofollow noreferrer">Centralized VCS</a> systems are designed with the intent that there is One True Source that is Blessed, and therefore Good.  All developers work (checkout) from that source, and then add (commit) their changes, which then become similarly Blessed.  The only real difference between CVS, Subversion, ClearCase, Perforce, VisualSourceSafe and all the other CVCSes is in the workflow, performance, and integration that each product offers.</p>\n\n<p><a href="http://en.wikipedia.org/wiki/Distributed_revision_control" rel="nofollow noreferrer">Distributed VCS</a> systems are designed with the intent that one repository is as good as any other, and that merges from one repository to another are just another form of communication.  Any semantic value as to which repository should be trusted is imposed from the outside by process, not by the software itself.</p>\n\n<p>The real choice between using one type or the other is organizational -- if your project or organization wants centralized control, then a DVCS is a non-starter.  If your developers are expected to work all over the country/world, without secure broadband connections to a central repository, then DVCS is probably your salvation.  If you need both, you\'re fsck\'d.</p>\n'}, {'answer_id': 77883, 'author': 'Rafał Rawicki', 'author_id': 13767, 'author_profile': 'https://Stackoverflow.com/users/13767', 'pm_score': 1, 'selected': False, 'text': '<p>Bazaar is IMHO easier to learn than git.\nGit has a nice support in github.com.</p>\n\n<p>I think you should try to use both and decide which suits you most.</p>\n'}, {'answer_id': 77943, 'author': 'ddaa', 'author_id': 11549, 'author_profile': 'https://Stackoverflow.com/users/11549', 'pm_score': 1, 'selected': False, 'text': '<blockquote>\n  <p>What do folks here see as the relative strengths and weaknesses of Git, Mercurial, and Bazaar?</p>\n</blockquote>\n\n<p>This is a very open question, bordering on flamebait.</p>\n\n<p>Git is fastest, but all three are fast enough. Bazaar is the most flexible (it has transparent read-write support for SVN repositories) and cares a lot about the user experience. Mercurial is somewhere in the middle.</p>\n\n<p>All three systems have lots of fanboys. I am personally a Bazaar fanboy.</p>\n\n<blockquote>\n  <p>In considering each of them with one another and against version control systems like SVN and Perforce, what issues should be considered?</p>\n</blockquote>\n\n<p>The former are distributed systems. The latter are centralized systems. In addition, Perforce is proprietary while all the others are free <a href="http://www.gnu.org/philosophy/free-sw.html" rel="nofollow noreferrer">as in speech</a>.</p>\n\n<p>Centralized versus decentralized is a much more momentous choice than any of the systems you mentioned within its category.</p>\n\n<blockquote>\n  <p>In planning a migration from SVN to one of these distributed version control systems, what factors would you consider?</p>\n</blockquote>\n\n<p>First, lack of a good substitute for TortoiseSVN. Although Bazaar is working on their own <a href="http://bazaar-vcs.org/TortoiseBzr" rel="nofollow noreferrer">Tortoise variant</a>, but it\'s not there yet, as of September 2008.</p>\n\n<p>Then, training the key people about how using a decentralized system is going to affect their work.</p>\n\n<p>Finally, integration with the rest of the system, such as issue trackers, the nightly build system, the automated test system, etc.</p>\n'}, {'answer_id': 79577, 'author': 'DGentry', 'author_id': 4761, 'author_profile': 'https://Stackoverflow.com/users/4761', 'pm_score': 3, 'selected': False, 'text': '<p>Sun did an evaluation of <A HREF="http://opensolaris.org/os/community/tools/scm/git-eval.txt" rel="noreferrer">git</A>, <A HREF="http://opensolaris.org/os/community/tools/scm/mercurial-eval.html" rel="noreferrer">Mercurial</A>, and <A HREF="http://opensolaris.org/os/community/tools/scm/bzr-eval/" rel="noreferrer">Bazaar</A> as candidates to replace the Sun Teamware VCS for the Solaris code base. I found it very interesting.</p>\n'}, {'answer_id': 81563, 'author': 'Hank Gay', 'author_id': 4203, 'author_profile': 'https://Stackoverflow.com/users/4203', 'pm_score': 1, 'selected': False, 'text': "<p>ddaa.myopenid.com mentioned it in passing, but I think it's worth mentioning again: Bazaar can read and write to remote SVN repositories. That means you could use Bazaar locally as a proof-of-concept while the rest of the team is still using Subversion.</p>\n\n<p>EDIT: Pretty much all the tool now have <em>some</em> way of interacting with SVN, but I now have personal experience that <code>git svn</code> works <strong>extremely</strong> well. I've been using it for months, with minimal hiccups.</p>\n"}, {'answer_id': 91429, 'author': 'David Plumpton', 'author_id': 16709, 'author_profile': 'https://Stackoverflow.com/users/16709', 'pm_score': 1, 'selected': False, 'text': "<p>Your major issue is going to be that these are <strong>Distributed</strong> SCMs, and as such require a bit of a change to the user's mindset. Once people get used to the idea the technical details and usage patterns will fall into place, but don't underestimate that initial hurdle, especially in a corporate setting. Remember, all problems are people problems.</p>\n"}, {'answer_id': 437296, 'author': 'Jakub Narębski', 'author_id': 46058, 'author_profile': 'https://Stackoverflow.com/users/46058', 'pm_score': 4, 'selected': False, 'text': '<hr>\n\n<blockquote><em>What do folks here see as the relative strengths and weaknesses of Git, Mercurial, and Bazaar?</em></blockquote>\n\n<p>In my opinion <strong>Git</strong> strength is its clean underlying design and very rich set of features. It also has I think the best support for multi-branch repositories and managing branch-heavy workflows. It is very fast and has small repository size.</p>\n\n<p>It has some features which are useful but take some effort to be used to them. Those include <em>visible</em> intermediate staging ara (index) between working area and repository database, which allows for better merge resolution in more complicated cases, incremental comitting, and comitting with dirty tree; <em>detecting</em> renames and copies using similarity heuristic rather than tracking them using some kind of file-ids, which works well and which allow for blame (annotate) which can follow code movement across files and not only wholesale renames.</p>\n\n<p>One of its disadvantages is that MS Windows support lags behind and is not full. Another perceived disadvantage is that it is not as well documented as for example Mercurial, and is less user friendly than competition, but it changes.</p>\n\n<p>In my opinion <strong>Mercurial</strong> strength lies in its good performance and small repository size, in its good MS Windows support.</p>\n\n<p>The main disadvanatge is in my opinion the fact that local branches (multiple branches in single repository) is still second-class citizen, and in strange and complicated way it implements tags. Also the way it deals with file renames was suboptimal (but this migth have changed). Mercurial doesn\'t support octopus merges (with more than two parents).</p>\n\n<p>From what I have heard and read main <strong>Bazaar</strong> advantages are it easy support for centralized workflow (which is also disadvantage, with centralized concepts visible where it shouldn\'t), tracking renames of both files and directories.</p>\n\n<p>Its main disadvantage are performance and repository size for large repositories with long nonlinear history (the performance improved at least for not too large repositories), the fact that default paradigm is one ranch per repository (you can set it up to share data, though), and centralized concepts (but that also from what I have heard changes).</p>\n\n<p>Git is written in C, shell scripts and Perl, and is scriptable; Mercurial is written in C (core, for performance) and Python, and provides API for extensions; Bazaar is written in Python, and provides API for extensions.</p>\n\n<hr>\n\n<blockquote><em>In considering each of them with one another and against version control systems like SVN and Perforce, what issues should be considered?</em></blockquote>\n\n<p>Version control systems like Subversion (SVN), Perforce, or ClearCase are <em>centralized</em> version control systems. Git, Mercurial, Bazaar (and also Darcs, Monotone and BitKeeper) are <em>distributed</em> version control systems. Distributed version control systems allow for much wider range of workflows. They allow to use "publish when ready". They have better support for branching and merging, and for branch-heavy workflows. You don\'t need to trust people with commit access to be able to get contributions from them in an easy way.</p>\n\n<hr>\n\n<blockquote><em>In planning a migration from SVN to one of these distributed version control systems, what factors would you consider?</em></blockquote>\n\n<p>One of factors you might want to consider is the support for inetracting with SVN; Git has git-svn, Bazaar has bzr-svn, and Mercurial has hgsubversion extension.</p>\n\n<p><strong>Disclaimer:</strong> I am Git user and small time contributor, and watch (and participate on) git mailing list. I know Mercurial and Bazaar only from their documentation, various discussion on IRC and mailing lists, and blog posts and articles comparing various version control systems (some of which are listed on <a href="http://git.or.cz/gitwiki/GitComparison" rel="noreferrer">GitComparison</a> page on Git Wiki).</p>\n'}, {'answer_id': 493199, 'author': 'Davide', 'author_id': 25891, 'author_profile': 'https://Stackoverflow.com/users/25891', 'pm_score': 2, 'selected': False, 'text': '<p>A very important <strong>missing</strong> thing in bazaar is cp. You cannot have multiple files sharing the same history, as you have in SVN, see for example <a href="https://lists.ubuntu.com/archives/bazaar/2007q3/029792.html" rel="nofollow noreferrer">here</a> and <a href="https://bugs.launchpad.net/bzr/+bug/269095" rel="nofollow noreferrer">here</a>. If you don\'t plan to use cp, bzr is a great (and very easy to use) replacement for svn.</p>\n'}, {'answer_id': 493241, 'author': 'sh1mmer', 'author_id': 53569, 'author_profile': 'https://Stackoverflow.com/users/53569', 'pm_score': 2, 'selected': False, 'text': '<p>I was using Bazaar for a while which I liked a lot but it was only smaller projects and even then it was pretty slow. So easy to learn, but not super fast. It is very x-platform though.</p>\n\n<p>I currently use Git which I like a lot since version 1.6 made it much more similar to other VCS in terms of the commands to use.</p>\n\n<p>I think the main differences for my experience in using DVCS is this:</p>\n\n<ol>\n<li>Git has the most vibrant community and it\'s common to see articles about Git</li>\n<li><a href="http://github.com" rel="nofollow noreferrer">GitHub</a> really rocks. Launchpad.net is ok, but nothing like the pleasure of Github</li>\n<li>The number of workflow tools for Git has been great. It\'s integrated all over the place. There are some for Bzr but not nearly as many or as well maintained.</li>\n</ol>\n\n<p>In summary Bzr was great when I was cutting my teeth on DVCS but I\'m now very happy with Git and Github.</p>\n'}, {'answer_id': 783778, 'author': 'k1udge', 'author_id': 74220, 'author_profile': 'https://Stackoverflow.com/users/74220', 'pm_score': 1, 'selected': False, 'text': '<p>There is good video by Linus Torvalds on git. He is creator of Git so this is what he promotes but in the video he explain what distributed SCMs are and why they are better then centralized ones. There is a good deal of comparing git (mercurial is considered to be OK) and cvs/svn/perforce. There are also questions from the audience regarding migration to distributed SCM.</p>\n\n<p>I found this material enlightening and I am sold to distributed SCM. But despite Linus\' efforts my choice is mercurial. The reason is bitbucket.org, I found it better (more generous) then github.</p>\n\n<p>I need to say here a word of warning: Linus has quite aggressive style, I think he wants to be funny but I didn\'t laugh. Apart from that the video is great if you are new to distributed SCMs and think about move from SVN.</p>\n\n<p><a href="http://www.youtube.com/watch?v=4XpnKHJAok8" rel="nofollow noreferrer">http://www.youtube.com/watch?v=4XpnKHJAok8</a></p>\n'}, {'answer_id': 897862, 'author': 'Martin Geisler', 'author_id': 110204, 'author_profile': 'https://Stackoverflow.com/users/110204', 'pm_score': 3, 'selected': False, 'text': '<p>Take a look at the comparison made recently by the Python developers: <a href="http://wiki.python.org/moin/DvcsComparison" rel="noreferrer">http://wiki.python.org/moin/DvcsComparison</a>. They chose Mercurial based on three important reasons:</p>\n\n<blockquote>\n  <p>The choice to go with Mercurial was made for three important reasons:</p>\n  \n  <ul>\n  <li>According to a small survey, Python developers are more interested in using Mercurial\n  than in Bazaar or Git.</li>\n  <li>Mercurial is written in Python, which is congruent with the python-dev tendency to \'eat their own dogfood\'.</li>\n  <li>Mercurial is significantly faster than bzr (it\'s slower than git, though by a much smaller difference).</li>\n  <li>Mercurial is easier to learn for SVN users than Bazaar.</li>\n  </ul>\n  \n  <p>(from <a href="http://www.python.org/dev/peps/pep-0374/" rel="noreferrer">http://www.python.org/dev/peps/pep-0374/</a>)</p>\n</blockquote>\n'}, {'answer_id': 1489019, 'author': 'Michael La Voie', 'author_id': 65843, 'author_profile': 'https://Stackoverflow.com/users/65843', 'pm_score': 4, 'selected': False, 'text': '<p>Steve Streeting of the Ogre 3D project just (9/28/2009) published a blog entry on this topic where he does a great and even handed <a href="http://www.stevestreeting.com/2009/09/28/early-stage-gitmercurialbazaar-evaluation-thoughts/" rel="nofollow noreferrer">comparison of Git, Mercurial and Bazaar</a>.</p>\n\n<p>In the end he finds strengths and weaknesses with all three and no clear winner.  On the plus side, he gives a great table to help you decide which to go with.</p>\n\n<p><img src="https://i.stack.imgur.com/hlrmT.png" alt="alt text"></p>\n\n<p>Its a short read and I highly recommend it.</p>\n'}]
['https://Stackoverflow.com/questions/77485', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/13750/']