The revisions let you track differences between multiple versions of a post.

Revision of Comparing Popular Version Control Systems from Sun, 2010-04-11 21:57

Toturial

Why another comparison review!!?

Perhaps because many of other reviews are either outdated or unfair.

What's the difference between this and the others!!?

There are some differences.

  1. Most of the current reviews are written by a user of one of this softwares so the author can't be fair since he has much less experience with the others, in this article however i only write about Bazaar and let the users of other DVCSs to participate and write about their favorite software.
  2.  There are many resources available regarding to this topic and each one has pros and cons. But the main issue i have with them is that most of them are outdated because all this DVCSs are under very active development. An issue that exists now, might become a feature! few months later. So i started this article as a research project which means that just like DVCSs it's also under active development :). Anyway if you like to read resources on other sites i suggest you to check the date they've been published before relying on them. (You can subscribe to this page's RSS/Feed in order to be notices of the new updates.)
  3.  This article is practical because it includes personal experiences from users of all these DVCSs, and challenges they've faced using them ,not only what's been written in Documentations
  4. I try to prevent long boring disscussions between each VCS users! i'll share my opinion at the end plus some other developers so you can see which one suits you best :)

There are two well known type of version control systems, Centralized(Like Subversion) and Distributed(Like Git). In this article i'm not going to describe the differences between this two, however it's important to understand how they work before making any decision. This article can be a good starting point. I consider centralized VCSs an expired type of VCS so i start with comparing distributed VCSs and if you're about to start using VCSs i suggest you start with a distributed VCS. Note that distributed VCSs like Bazaar also support Centralized VCSs Workflow.

It's about the sixth years since my first commit using Subversion, Moving from CVS to Subversion was eally amazing, Subversion was superior in many ways and it served me well. But the age of centralized version control systems is over, we need much more powerful VCSs to deal with huge projects. Now days we should to be able to work with anyone, on anything, anywhere , at anytime, and also keep track of all this activities.

The age of single all-in-one solution is over in many fields including Version Control Systems, each solution has its own pros and cons and Same applies to VCSs. So in this article i'm going to compare three major DVCSs available.

My main focus on this article is Bazaar since i've decided to start (You can read why i decided to start with Bazaar at the Conclusions section) but i asked my friend Antoni who is a Mercurial(HG) user to help with all sections related to HG. Kudus to him. Currently i use whygitisbetterthanx.com site for Git but i'm also looking for Git user to share his personal experience by using Git with me. So if you're Git user i'll be more than happy to hear your opinion :)

Installation

Bazaar

Karmic :
Add this repository for Bazaar gui (known as bazaar explorer)

ppa:bzr-explorer-dev/ppa

If you're not using Ubuntu Karmic more information here :  https://launchpad.net/~bzr-explorer-dev/+archive/ppa

sudo apt-get install bzr bzr-explorer bzr-svn

Migration

Obviously any DVCSs without proper migration utilities is useless for most projects, so lets see what each one has to offer.

Bazaar

To get started with bazaar as fast as you possible with subversion background : BzrForSVNUsers - Bazaar Version Control and Bazaar for Subversion users — Bazaar Migration Docs

You might want to have look at Migrating from Subversion to Bazaar (Including special guide for Sourceforge projects)

Note : While i was trying to migrate one of my sourceproject from svn to bzr, i came into some very nasty issue due to the difference between server and local bzr version, however bazaar developers say that in 2.x serious and upwards it's no longer a issue. bazaar supports various different tree formats which can causes lots of headaches. this command helped https://sourceforge.net/apps/trac/sourceforge/ticket/517

Performance

Bazaar

Bazaar is considerably slower than the others however imporing performance is work in progress.

Git

Git is really fast and i think everyone is agree on that.

Mercurial

HG is very close to Git so obviously optimziation plays much more important rule than the programming language. and regarding whygitisbetterthanx.com here is Antonio's opinion :

  • ERRATA: C++ over Python is obviously faster
  • Graphs can't be right, since hg's tagging is another commit,
    therefore can't be slower
  • Unfairness: hg also has local tagging which is really fast, since
    it only edits a text plain entry
  • Slower task for hg would be building the change history log, due to
    the optimization on choosing whether to use snapshot/changeset, which
    directly impacts on detriment when gathering all the info at once
    (which is done only one time in a whole work session, since further
    operations over change log, including refresh are optimized)

Size

Git

Bazaar

Mercurial

Antonio :

I really don't know what would be the size of Django, but Drupal 7 is near 3MB and neither of those operations spent that much time (on my old P4 single core) 96 sec a branching?! are they insane?!

Features

All of the major DVCSs have the important features so i'll skip the feature that are available on all of them. Also this part is mostly a respond to whygitisbetterthanx.com  because it seems that the information they're providing is not accurate.

Cheap local branching

Bazaar

As far as i know Bazaar supports this feature, also it might be interesting to have a look at Filtered views — Bazaar v2.2.0dev1 documentatio

Git

According to whygitisbetterthanx.com git has this feature in a very good way!

Mercurial

Antonio : HG inherited good ideas from Git

Staging

Git

According to whygitisbetterthanx.com git has this feature in a very good way!

Bazaar

Bazaar has this feature but not out of the box, the only thing you need to do is creating another branch and bind you current branch to it, then commit you changes to that branch. when you're finished you can bind that branch to any branch you want and push/commit the changes! instead of directly committing your changes.

Mercurial

Just like Bazaar simulating it is not really a big deal. Antonio has good point :

"staging"? just make up your mind and have precisely another "cheap branch" and name it what ever you like, or even better, another "staging" repo from/to which you synchronize (push/pull) when the resulting branch is of your likings. It is just a "personal workflow" matter, not need to become another feature to be learned.

Dedicated Free Hosting

Note That in my opnion it's not big deal since big free opensource hosings like Sourceforge already support this major VCSs!

Bazaar

launchpad.net

Git

github.com

Mercurial

bitbucket.org

Antonio's opinion reagarding to whygitisbetterthanx.com

don't know how many hosting might git have, but bitbucket.org has good performance so it is NOT out of capacity (plus they are .org instead of .com, and their agreement reads loud and clear while not so extensive: http://bitbucket.org/site/privacy/ vs http://help.github.com/terms/)

GUI

With lots of tools available out there , having a good GUI is getting more critical everyday and i think the main reason is because it decrease the learning curve dramatically.

Bazaar

Integration

Software development without using third-party applications and IDEs is a waste of time! So we should able to use our favoride VCS via our favorite IDE!

Bazaar

Has a plugin for Eclipse, the installation process was not as smooth as subeclipse but i can't say that it was difficult. i had to manually add the bzr binary and plugin folders location and also configure few options (All couldn't be pre configured). But according to BzrEclipse roadmap, it's going to be much better soon. number of feature is also very limited comparing to subeclipse.

Mercurial

Mercurial is much better integrated with other applications, for example currently netbeans does not support Bezaar. more information here IDEIntegration - Bazaar Version Control

Roadmap

All major DVCSs are under active development, which means that their roadmap plays an important role in the decision.

Bazaar

Bazaar roadmap And also it looks like that bazaar developers really care about their users ThreeWishes - Bazaar Version Control , Bazaar also has Bazaar Performance Roadmap

Plugins

Bazaar

Bazaar like the other three supports plugins , in my experience installing Bazaar plugins is as easy as downloading and then extracting it into the plugins folder. That's it. it's even easier on windows.

Notes

There is a nice website for comparing git vs others, very useful. Funny thing is that HG users did the same! but made their point quite clear! Also Git users made another one for Bazaar!

There is also another website for comparing Bazaar and Git , they approach is interesting and it's based on personal experience using Tweeter! http://www.bzrvsgit.com/

Conclusions

In this part you can read the main reasons that people use particular VCS

Bazaar

Author : I decided to start with Bazaar for several reasons

  • It's written with python and for this reason it's much easier to extend and develop than C or C++.
  • It's a multi purpose VCS covering several different Use Cases (Workflows)
  • It's plugin system is quite easy to use (With no compiling or building process)
  • It comes with several great cross platform GUI utilities

Antonio :

Why not bazaar?
The first taste: create a new repo.
What kind of repo would you like?
Which branching model will you be using?
I really don't care much, just give me a new empty repo and let me
start working.
I'll branch whatever/however I want, and if later I regret, then I'll
be able to convert/rebase/transplant it preserving history logs.

Git

Author : Why not Git? Well, although most git users are very passionate about their favorite VCS but it seems that many of them haven't even heard of/tried other ones. The fact that Linus has written it or it has been used for Linux Kernel might be main reason people like using it.

There is two reason that i don't like git, first it does not track folders! and the second it's written by C. I'm totally against using C for everything.

BTW it has awesome merge functionality which is expected since it's been originally developed for Linux Kernel which is all about merging!

Mercurial

Antonio :

Another point that hg wins over Git and Bazaar: easy to learn and use. Definitely hg help is not so short in vain. Enabling extensions would bring more advanced help. But that short basic help is enough to start and to handle any type of workflow.

News

More and more software and developers are migrating to DVCSs, here you can read their favorite DVCSs

 

 

A disscussion regarding to Git on #drupal-contrinute channel

(10:31:26 AM) sinasalek: Hi, Any pro git user around?
(10:32:18 AM) marvil07: sinasalek: hi
(10:36:30 AM) sinasalek: marvil07: Does git support Partial Checkout http://stackoverflow.com/questions/50945/can-you-do-a-partial-checkout-with-subversion
(10:38:08 AM) mikey_p: sinasalek: no it doesn't 
(10:40:04 AM) marvil07: sinasalek: I suppose I did not catch the git question(a X restart on a debian upgrade took me out :-p)
(10:40:40 AM) sinasalek: marvil07: :) that's cool. are you familiar with Partial Checkout?
(10:41:47 AM) marvil07: sinasalek: I know that git can clone a subset of commits on the top of a repo, but not sure what you are reffering 
(10:42:33 AM) marvil07: IIRC there was a work to make git-clone do partial clones, but not sure if it's ready, I think not
(10:42:35 AM) sinasalek: marvil07: i mean checkout for example only the modules folder of a project
(10:42:58 AM) marvil07: sinasalek: not, that's not possible IIRC
(10:43:29 AM) marvil07: sinasalek: git does not track directories, it tracks content, no matter wher it is 
(10:44:12 AM) sinasalek: marvil07: thanks, do u consider installing git plugins easy? 
(10:45:44 AM) sinasalek: marvil07: have you ever install a plugin on git?
(10:46:01 AM) marvil07: sinasalek: I never needed it :-p, but what are you trying to do?
(10:46:21 AM) ***marvil07 becomes really curious
(10:46:46 AM) sinasalek: marvil07: :) Actually i'm trying to choose my primary VCS
(10:47:34 AM) sinasalek: marvil07: Other options are Mercurial and Bazaar
(10:47:57 AM) sinasalek: marvil07: Bazaar has limited support for partial checkout
(10:48:41 AM) marvil07: sinasalek: are your sure you really need that?
(10:49:30 AM) mikey_p: git is fast enough and efficient enough that partial checkouts aren't much of an issue for me
(10:49:43 AM) mikey_p: hg does not support partial checkouts either
(10:49:47 AM) marvil07: sinasalek: there was a__big__ discussion about pro/cons many VCSs on g.d.o http://groups.drupal.org/node/48818
(10:49:50 AM) Druplicon: http://groups.drupal.org/node/48818 => Evaluation discussion for how to move Drupal.org off of CVS => 150 comments, 80 IRC mentions
(10:50:10 AM) sinasalek: marvil07: Yes, my bandwidth is limited sometimes when i work remotely on a for example 300MB project it takes several hours it checkout the whole thing
(10:50:44 AM) sinasalek: Thanks mikey_p
(10:51:00 AM) mikey_p: git is general more efficient than about anything else (except maybe hg, in some circumstances), and you can do most of you operations offline
(10:51:31 AM) mikey_p: frankly, if you have 300MB of code in source control, you're doing it wrong
(10:51:43 AM) mikey_p: or 300MB of anything
(10:51:44 AM) sinasalek: marvil07: i already read that discussion (very helpful), but a webchick mentioned the main reason for choosing git over bazaar was the number of people willing to make it happen
(10:51:46 AM) marvil07: actually git is great using efficiently the resoures, I mean how it store data and how it make calculations
(10:51:48 AM) Albright: Arg, that thread.
(10:51:57 AM) sinasalek: mikey_p: Yes, but if i already checked out :)
(10:52:21 AM) mikey_p: sinasalek: what project do you work on that has 300MB of versioned things?
(10:53:28 AM) marvil07: sinasalek: yep, what mikey_p said is really important, you do not want to have 300MB repo of anything
(10:53:40 AM) sinasalek: mikey_p: It's website, and all require resources including psds,libraries etc are under version control
(10:53:47 AM) Albright: That thread frustrated me. It seemed to confirm that the only thing Git has in its favor is its popularity, which is a horrible reason to choose something when better alternatives are available.
(10:54:08 AM) sinasalek: Albright: That's true
(10:54:22 AM) mikey_p: Albright: that issues with that whole process have been hashed out many times here
(10:54:24 AM) Albright: But whatever. I'm over it. At least we won't be using CVS anymore.
(10:54:41 AM) mikey_p: Albright: for the most part I agree with you, it was a wreck
(10:54:42 AM) sinasalek: Albright: that's the point :)
(10:54:57 AM) sinasalek: Albright: Any DVCS is better than CVS
(10:55:56 AM) marvil07: sinasalek: maybe you want to use node revisions instead?
(10:56:09 AM) mikey_p: sinasalek: what I've been doing is switching to a process that feature more repositories, or keeps large binary assets out of version control
(10:56:15 AM) sinasalek: marvil07: why do u mean node revisions?
(10:56:48 AM) mikey_p: for the most part all the designers seem much happier to use something like dropbox, which syncs everything seamlessly when they save, and keeps old versions for them
(10:56:49 AM) Albright: Heh, I remember when chx and I started to work out how you could build a CVS using the PHP filter and node revisions. :D
(10:56:50 AM) marvil07: files dir should not be versioned IMHO, unless you have a really good reason
(10:57:30 AM) mikey_p: whatever images are part of the theme, yes, but those shouldn't be that big anyway
(10:57:57 AM) sinasalek: marvil07: No did mean files directory. Those file are part of the website development , which means that they change and sometime i need to revert them.
(10:58:34 AM) mikey_p: sinasalek: if you don't always need them, put them in a separate repo
(10:58:53 AM) sinasalek: mikey_p: but anyway as i know many Linux Distrus are also under version control , you can imagine how big they repository can be.
(10:59:19 AM) marvil07: mm, well not surem maybe you want to see some other ways of dealing with staging/deploy
(10:59:22 AM) mikey_p: sinasalek: the packages are, but not necessarily the distro as a whole
(10:59:51 AM) sinasalek: mikey_p: Yes i'll have to do that if no DVCS supports it. So far only subversion has full support
(11:00:41 AM) mikey_p: even the entire history of the entire linux kernel is around 100 MB in git if I remember correctly
(11:03:03 AM) sinasalek: mikey_p: Yup, that's the problem :). The question is why should i download 100mb or allocate 200mb disk space when i only want to work on a 200kb folder and nothing else!
(11:04:28 AM) marvil07: sinasalek: actually git support "submodules"
(11:04:46 AM) mikey_p: sinasalek: yes, but that's a one time operation
(11:04:51 AM) mikey_p: i used to think like this as well
(11:05:25 AM) mikey_p: finding faults with git or bzr or whatever, but I have decided to accept them and figure out how I can adapt my workflow
(11:05:27 AM) marvil07: sinasalek: but I never try it hard, the idea is like "sub-repos" like in svn IIRC
(11:06:24 AM) sinasalek: mikey_p: I'm simply trying to pick the one that suits best with projects ;)
(11:06:49 AM) sinasalek: marvil07: i see
(11:07:08 AM) mikey_p: the similar concept is svn:externals
(11:07:40 AM) sinasalek: mikey_p: Subversion already has this feature via depth sub command
(11:08:11 AM) mikey_p: i mean svn:externals is similar to git sub-modules
(11:08:20 AM) sinasalek: mikey_p: ah, yes it has
(11:09:12 AM) dereine: Its not just about the features; once you work with git, life is fun. Merging from a to b and c to d, many times per hour etc.
(11:11:42 AM) sinasalek: dereine: Have you tried merging with Bazaar or Mercurial or the others ?
(11:12:46 AM) dereine: sinasalek: i tryed once with bazaar it didn't worked such well, because you needed another folder per branch
(11:14:59 AM) sinasalek: dereine,mikey_p,marvil07 : As i remember git does not track folder moves (perhaps because it track only cotent). Is it still the same?
(11:15:45 AM) mikey_p: it tracks moved files, but can't actually track folders at all
(11:28:14 AM) sinasalek: dereine,mikey_p,marvil07 : Thanks for the help, it was very useful

Resources

Your rating: None Average: 2.4 (47 votes)

Comments

Jelmer Vernooij's picture

SourceForge's outdated bzr

Unfortunately your issues with Bazaar seem to be caused by the fact that SourceForge is still running an old version of Bazaar. The format issues all have been resolved as of Bazaar 2.0.

admin's picture

Thanks Jelmer for the

Thanks Jelmer for the tip.
Yes i noticed that after playing with Bazaar for a while. Unfortunately i have to stick with Sourceforge's old Bazaar :(, i hope they upgrade to v2 soon.
I manged to convert one of my projects to Bazaar successfully and i'm writing an easy migration guide for Sourceforge's svn users.

Pooya Sanooei's picture

I can't use anything but git

I can't use anything but git cause it's a nightmare to migrate or start another VCS learning curves. I still have second thoughts about Bazaar. btw never heared of directory track feature.

quite useful

Web Application Development's picture

Thanks jelmer

Excellent post....I really appreciate this site & thank you so much sharing with us.