Freitag, 11. März 2011

Bazaar from a Subversion user`s sight

Currently I'm trying different distributed version control systems (DVCS) as alternative to an existing Subversion installation.

Today I will share my impressions of bazaar (bzr).

Overview

While learning the basic concepts of Bazaar, it seems very promising and easy. Users migrating from a centralized VCS will find the checkout functionality very useful: You can simply commit and update like you do in your old VCS, thus minimizing the learning curve. The only difference is that you can do local commits and you may unbind your (implicit created) branch when taking your laptop on the road.
Very impressive: you can even checkout your SVN repo and work on it. You could even branch it, but bazaar wants to rewrite the history when commiting, which is deactivated at our repo (for good reasons).

The packaged Tools are very good, You can either use TortoiseBZR (Windows Explorer Extension), or Bazaar Explorer, or both. They are both very good Tools (The best prepackaged ones, I have seen so far)!

Access / Serving

Bazaar uses a "Smart Server" to access bazaar repositories through file system access (or through SSH/SFTP,..). There's a module for Apache to provide access through HTTP.

Branching Concept

Branches can only be done by cloning. Branches can have default source and target branches, so you can easily pull from the official mainline and push to the development branch for review. A branch may even be bound to another branch, so a commit is done in both branches, or none (Local commits are still possible).
Bazaar insists that you have pulled and merged all changes from a branch before you are allowed to push your changes.

Wait, what?
Canonical (the company behind bazaar) says that there may be side-effects of two commits, even if they aren't related on a per-file base. So you should merge all changes and run the unit-tests before pushing your changes back to the mainline.
While the point is valid, imagine a project with 30+ full time developer: Change, commit, push, oh diverged... merge, build and test, (commit), push, oh diverged again....

Also negative:
We are currently using an unstable trunk model, and using stable branches for stabilizing before a final deployment and fixing bugs. We are merging back all fixes to trunk and mark other things (like maven dependency changes) as merged. While Subversions merge tracking is far from perfect, it handles this with ease and all merges are tracked.

I've looked for a similar feature in Bazaar, but the only function that provides a selective merge of single revisions is "cherry picking". Cherry picking only merges contents, so all merge tracking infos are lost. You could als export the revision as a patch and apply it on your mainline.

Repository Concept

Bazaar features a shared repository functionality, where a single repository can hold the history for different branches. This saves disk space and bandwidth.

Conclusion

Bazaar is a very interesting DVCS and supports a lot of workflows better than other systems. Migration from centralized systems is easy.
SVN support is very good, but slow.
Negative points are earned for forcing you to create clones of your branches and to merge all changes before pushing.
While speed is ok, it is definitely slower than other DVCS and sometimes even slower than SVN.

Keine Kommentare:

Kommentar veröffentlichen