Bazaar Migration Guide
Bzr plugins and external programs for interoperation with other version control systems.
Contents
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.
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-fastimport
bzr-fastimport - Import repositories.
Tailor
tailor - Import individual branches.
svn2bzr
svn2bzr - Import whole repositories.
There are two divergent branches of svn2bzr:
Gustavo Niemeyer's: https://code.launchpad.net/~niemeyer/svn2bzr/trunk David Allouche's: https://code.launchpad.net/~ddaa/svn2bzr/devel
They have different feature sets. In particular:
Quietly modifying svn2bzr (the deterministic version) to recognize the structure of your repository is discouraged as it can lead to referential integrity violations when you use your modified code with repositories that are usable using the official version.
bzr-svn
bzr-svn - Transparent read/write interoperation.
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 by using bzr svn-import to import all branches in a remote Subversion repository.
But it is mainly intended to be used with the following workflow:
bzr co from a Subversion repository to produce Bazaar branch.
Work on this branch normally, maybe merging from other Bazaar or Subversion branches.bzr commit in this branch now works normally.
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 - Import repositories.
Tailor
tailor - Import individual branches.
cvsps-import
cvsps-import - Import whole repositories.
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".
git
bzr-fastimport
bzr-fastimport - Import repositories.
Tailor
tailor - Import individual branches.
bzr-git
bzr-git - Transparent read-only interoperation
Mercurial (hg)
bzr-fastimport
bzr-fastimport - Import repositories.
Tailor
tailor - Import individual branches.
bzr-hg
bzr-hg - Deterministic mirroring
Darcs
bzr-fastimport
bzr-fastimport - Import repositories.
Perforce
bzr-fastimport
bzr-fastimport - Import repositories.
SCCS
bzr-fastimport
bzr-fastimport - Import repositories.
Multi-purpose
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.
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/
From: tla, baz, Darcs, Monotone, Subversion, CVS, Mercurial, Git.
Non-deterministic.