Introduction to Bazaar, part one (by Yann Pouillon)
===================================================

<div class="warning">
<b>Important note</b>

<p>Except when specifically mentioned, this document only refers to the
new implementation of Bazaar, aka bzr. Every feature advertised here has
been thoroughly tested by at least one ABINIT developer.</p>
</div>



Short overview
--------------

Bazaar[1] is a distributed Version Control System (VCS) available under the
GNU General Public License (GPL) that aids open source development and
reduces barriers to participation. Its priorities are to be safe,
friendly, free and fast, and to support Windows, GNU/Linux, UNIX and the
Mac OS. The main objective is to provide the user with fast and
decentralised revision control that "Just Works", supporting renames of
files and directories smoothly. Bazaar is designed to maximise the level
of community participation in any project. Decentralized revision
control systems give people the ability to collaborate more efficiently
over the internet using the so-called bazaar development model (see below).

Unlike its predecessors Bazaar depends only on Python 2.4, which is a
guarantee of portability, flexibility and ease of installation. Its
extremely clever merge algorithms let the package maintainers focus
exclusively on relevant and important conflicts and provide an advanced
cherrypicking mechanism. Users start to be productive after having
learned five commands only, and the information provided by the **"bzr
help ..."** command is very complete. Partial commits and uncommits are
fully supported, both for files and subdirectories, and it is possible
to transfer uncommitted changes between two branches. Most parameters can
be tuned very simply on a per-user or per-branch basis. A lot of
plugins are already available, and it is quite easy to extend Bazaar's
abilities with the help of Python scripts. Command aliases to ease the
migration of former users of CVS and Subversion are even provided.

The documentation available on the Bazaar website is comprehensive and well
structured, with a few sections approaching progressively industry-standard
levels. Both Bazaar user and developer communities are very active and
well organised, and include famous Free Software projects. Moreover the
command syntax and their underlying philosophy are quite similar to what
existed with the previous version of the VCS. All this will greatly
ease, simplify and speed-up the transition, limiting the efforts
necessary to prepare the developers of ABINIT as well. And, as a cherry
upon the cake, it will not be so difficult to have Bazaar interacting
with the upcoming restructured ABINIT website.



A bit of history
----------------

One of the ancestors of Bazaar is GNU Arch[2], a distributed,
changeset-oriented, peer-to-peer VCS. Started in
2001, the GNU Arch project has been a leader and a contributor in the
efforts of free software and open source hackers to develop
revolutionary tools to advance their efforts. Its most famous
implementation is the one of Tom Lord, codename TLA, which became part
of the GNU project in 2003. It was adopted in 2004 by the ABINIT
project, which was previously using CVS privately. At that time,
distributed versioning had become necessary for us due to the
source code reaching a critical size and the rate of contributions
increasing more and more steeply. Specific tutorials were written as a
step-in procedure for the ABINIT developers.

Despite a very promising future and the support of the Free Software
Foundation, the TLA project died abruptly. In 2005, shortly after
announcing a new release of his Arch 2.0 project, Tom Lord told
Richard Stallman and the GNU Arch users that he was resigning as the
maintainer of Arch. He recommended that Canonical Ltd's Bazaar project
become the main Arch project. After getting a confirmation that the TLA
project was dead, we switched to Bazaar. The existing tutorials were
updated accordingly and enhanced.

The GNU Arch project has forked several times along its chaotic history,
resulting in several VCS projects. The most common criticism about TLA was
the lack of friendliness of its user interface, an issue Bazaar 1 (baz)
did its best to address. This in turn induced many portability problems:
though baz was indeed more friendly than TLA, its installation on a
non-Debian-based system was a long, laborious and painful process.
Shortly after the release of Bazaar 1.3, Canonical Ltd decided to put
most development efforts on a new project, codename Bazaar-NG or bzr,
with a clear emphasis on ease-of-use and portability. In mid-2006, the
Bazaar 1 project was abruptly wiped-out from existence, and it became
virtually impossible to install it on non-Linux systems. At the same
time, bzr started to be used successfully at production-level in huge
projects[3].

During the third ABINIT developer workshop held in Liège, Belgium, in
January 2007, it was decided to switch to bzr as soon as its version 1.0
would be released and the ABINIT developers adequately prepared. The
main part of the process is scheduled to start on May 2007, while the
preparation is starting now. The automatic conversion of the existing
ABINIT archives to the bzr format using the bzr-provided scripts has
already been successfully tested, and several subprojects such as BigDFT
and part of the documentation are already managed with bzr. A few ABINIT
developers are now managing their other personal projects with bzr as well.



Why Bazaar?
-----------

The Bazaar project is named after Eric S. Raymond's essay,
_The Cathedral and the Bazaar_[4], which describes and compares two
software development models:

 * the _Cathedral_ model, in which source code is available with each
   software release, but code developed between releases is restricted
   to an exclusive group of developers; GNU Emacs and GCC are presented
   as examples;
 * the _Bazaar_ model, in which the code is developed over the Internet
   in view of the public.

Eric Raymond credits Linus Torvalds, leader of the Linux kernel project,
as the inventor of the latter. He also provides anecdotal accounts of
his own implementation of this model for the fetchmail project.

One of the main advantages of the Bazaar VCS is that it allows
these two development models to be mixed seamlessly within the same
project. Such a possibility brings forth extreme flexibility for a
constantly-growing project like ABINIT, allowing dynamical restructuring
of the development teams and subprojects. It is also easy to mix
topic-based branches with per-developer ones.



What now?
---------

The next part will deal with the efficient workflows matching Bazaar's
philosophy usable within the ABINIT project, as well as the
restructuring of the archive.

In the meantime, if you have a taste for adventure, you may already try
to install Bazaar and play with it a little bit. You might find [Damien
Caliste's tutorial](http://www.abinit.org/developers/?text=bzr-manual)
interesting too.

Those who would not have Python[5] 2.4 support available yet are kindly
invited to do the necessary.  If you have to request it officially and
encounter some difficulty, you may argue that Python 2.4 is available
since March 30th, 2005, has been thoroughly tested and bugfixed since
then, and is in bugfix-only mode since October 18th, 2006.

If it is materially impossible for you to get Python 2.4 installed,
please report to Yann Pouillon so that we can try to find a solution for
you.



References
----------

[1] [http://bazaar-vcs.org/](http://bazaar-vcs.org/ "Bazaar")

[2] [http://gnuarch.org/](http://gnuarch.org/ "GNU Arch")

[3] [http://launchpad.net/](http://launchpad.net/ "Launchpad")

[4] [http://en.wikipedia.org/wiki/The\_Cathedral\_and\_the\_Bazaar](http://en.wikipedia.org/wiki/The\_Cathedral\_and\_the\_Bazaar "The Cathedral and the Bazaar")

[5] [http://python.org/](http://python.org/ "Python")
