Bazaar

Bazaar

 




Wiki Tools

  • Find Page
  • Recent Changes
  • Page History
  • Attachments

Bazaar Migration Guide

Bzr plugins and external programs for interoperation with other version control systems.

Background

Tasks

Conversion tools can accomplish different tasks:

  • Importing historical data, when switching from another system. These tools perform a so called "one-off translation".

  • Mirroring a foreign repository on an ongoing basis. When a project uses another system for its official repository, it can be useful to have a bzr branch that mirrors changes from this repository.

  • Interoperation plugins allow using bzr directly on a foreign repository.

Mergeability and integrity

Conversion tools can also be, or not be, deterministic. Bazaar uses arbitrary textual ids to identify revisions and files. Some tools will always produce the same Bazaar ids for a given import, others will use arbitrary random ids.

Bazaar is a distributed system: version control data is effectively stored in a distributed database, each branch or repository materializes part of this database. The referential integrity of the distributed database requires that a given revision id is always associated to the same data. Although bzr tries to detect obvious integrity problems, violating referential integrity is generally a bad idea.

  • Deterministic conversion tools allow branches based on independent import of the same data to be recognized by bzr as related. So bzr will be able to merge branches based on different imports.

  • Non-deterministic conversion tools are safer because they do not have strong reproducibility requirements. Two imports from the same repository can safely produce different data, either because the conversion logic changed, or because the foreign repository was altered.

Conversion Tools

GNU Arch (baz, tla)

BazImport provides migration from the deprecated Bazaar1x. It was originally part of BzrTools, but its utility declined and extracting it reduced BzrTools' dependencies.

  • Supports: importing, mirroring
  • From: tla and baz archives

  • Ids: deterministic.

No specific limitation. However, historical GNU Arch versions were not very good at ensuring data integrity, and some imports may require substantial baby-sitting.

Problem with more modern distributions

It seems that it is very hard to get ahold of the original baz source or binaries to use with a modern distribution. The only place I (neilenmarais) could find source was from the Ubuntu 6.06 (Dapper) source archive, but I was unable to compile it. In the end, I installed a Dapper VM to do the conversion. Note that the bzr packaged with Dapper is quite old, and the repository should be upgraded with a newer bzr to prevent bad performance.

Subversion (svn)

bzr-svn

bzr-svn - Transparent read/write interoperation.

  • Supports: read/write interoperation, importing.
  • From: remote or local repositories, or dumpfiles
  • Ids: deterministic

Bzr-svn is a bzr plugin that provides support for SVN URLs and working tree. It allows use of Subversion branches and repositories as if they were native Bazaar branches or repositories.

It can be used as a conversion tool by using bzr branch to create Bazaar branch from a branch in a remote Subversion repository or using bzr svn-import to import all branches in a remote Subversion repository.

svn2bzr

svn2bzr - Import whole repositories.

  • Supports: importing
  • From: local dump files
  • Ids: non-deterministic

svn2bzr isn't actively maintained.

CVS

Since CVS has so many data consistency issues, and because it is so common to perform history-destroying surgery on a CVS repository, all CVS import tools use non-deterministic ids.

bzr-fastimport

bzr-fastimport can import fastimport streams generated by cvs2bzr

This is generally the best choice for importing from CVS.

cvsps-import

cvsps-import - Import whole repositories.

  • Supports: importing
  • From: rcs files (local repositories)
  • Ids: non-deterministic

bzrcvsserve

bzrcvsserve - Serve a bzr branch to cvs clients.

This is not a a conversion tool, but it can assist in a migration away from CVS.

bzrcvsserve allows read-only CVS users to checkout a bzr branch using "cvs co".

bzrcvsserve isn't actively maintained.

git

bzr-git

bzr-git - Transparent interoperation

Mercurial (hg)

bzr-fastimport

bzr-fastimport - Import repositories.

  • Supports: importing
  • From: a data stream
  • Ids: non-deterministic (currently)

bzr-hg

bzr-hg - Deterministic mirroring

Darcs

bzr-fastimport

bzr-fastimport - Import repositories.

  • Supports: importing
  • From: a data stream
  • Ids: non-deterministic (currently)

Perforce

bzr-fastimport

bzr-fastimport - Import repositories.

  • Supports: importing
  • From: a data stream
  • Ids: non-deterministic (currently)

SCCS

bzr-fastimport

bzr-fastimport - Import repositories.

  • Supports: importing
  • From: a data stream
  • Ids: non-deterministic (currently)

Multi-purpose

There are a couple of multi-purpose tools that can convert repositories from one format to another. Their main disadvantage is that they usually support the smallest subset of common functionality of the different formats, meaning that some metadata may be lost in the process.

bzr-fastimport

The Bazaar Fast Import plugin supports fast importing of revisions by reading a mixed command/data stream. Front-ends exist for most popular tools and custom ones are easy to throw together using whatever programming language you like. Full repositories can be imported, heads are automatically detected and branches are created for each. Mirroring of projects is not yet supported but is coming soon.

  • Supports: importing
  • From: various, but including tla/baz, Darcs, Monotone, Subversion, CVS, Mercurial, Git, Bzr

  • Ids: non-deterministic

Tailor

tailor is a child of the darcs team. This tool provides for the conversion of archives from most, if not all, of the 3rd generation RCS systems. Bazaar support is of course included. More recent releases than those found on the web page have been found on http://nautilus.homeip.net/~lele/projects/

  • Supports: importing
  • From: tla, baz, Darcs, Monotone, Subversion, CVS, Mercurial, Git.

  • Ids: Non-deterministic.

Tailor is mentioned here for completeness, but it is unlikely to be the best choice for a migration. It isn't actively maintained, and as a multi-purpose conversion tool you probably want fastimport/fastexport.