Bazaar loses to git

And now I have tried bzr too. Maybe it is to early to declare a winner in the epic battle between it and git since I only have about 20 minutes of bzr experience under my belt.

Never the less, git is the winner and bzr is the total loser. I have used both tools to mirror the waf Subversion repository. Here are my conclusions:

  • Both tools take a long time to clone a Subversion repository. Like an hour for bzr and two hours for git for a repository with about 4000 commits.
  • bzr version 1.3.1 released in April 2008 has some severe performance problems. Simple commands like bzr diff, blame and log takes almost ten seconds to execute. Those commands are instanteous in git.
  • git log and diff are colized by default. Their bzr equivalents are not.
  • git uses some kind of smarts so that it automatically pages output through less when needed. bzr does not.
  • The Bazaar User Guide at least looks much more helpful than the Git User's Manual.

The last point is Bazaar's only redeeming quality. But it is a big one and I will spend some more time with it before deciding if Bazaar is rubbish or not.

The reason why I'm even considering bzr is because I'm getting sick of gits branch model. It just doesn't fit my brain. There is no such thing as a branch in git, branches are just pointers to commits. That leads to annoying problems when you want to rebase a branch tree.

Say that you are working on feature branch foo. In that branch you branch of to an experimental branch bar-foo. Then you want to update foo because some new commits has arrived at master while keeping your private branch structure intact. The only way to do that, I've found, is to rebase both branches. First you rebase foo to master, which probably involves solving some conflicts. Now your branch structure is messed up, the bar-foo branch will contain all the commits from the foo branch. That is, the foo branchs commits are duplicated!

It is totally stupid and absolutely not what i wanted. The solution is to rebase bar-foo on top of foo. But now you will have to resolve all the conflicts from the foo branch again!

Multiply with the number of branches you have combined with gits unwillingness to automatically resolve conflicts and you get lots of work needed just to keep some feature branches up to date with a Subversion master. I really hope bzr's workflow is better.

Inga kommentarer:

Bloggarkiv