Bazaar

Bazaar

 




Wiki Tools

  • Login
  • Create Profile
  • FindPage
  • RecentChanges
  • 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, other 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)

baz-import, part of the BzrTools collection, provides migration from the deprecated Bazaar1x.

  • 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.

Subversion (svn)

bzr-fastimport

bzr-fastimport - Import repositories.

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

Tailor

tailor - Import individual branches.

  • Supports: importing
  • From: remote repositories
  • Ids: non-deterministic

svn2bzr

svn2bzr - Import whole repositories.

  • Supports: importing
  • From: depends
  • Ids: depends

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:

  • Gustavo's branch
    • From: dump files
    • Ids: deterministic
  • David's branch:
    • From: local or remote repositories
    • Ids: non-deterministic

bzr-svn

bzr-svn - Transparent read/write interoperation.

  • Supports: read/write interoperation, importing.
  • From: remote or local repositories
  • 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 branches from 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.

Quietly modifying bzr-svn or svn2bzr 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.

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.

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

Tailor

tailor - Import individual branches.

  • Supports: importing
  • From: remote repositories

cvsps-import

cvsps-import - Import whole repositories.

  • Supports: importing
  • From: rcs files (local 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.

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

Tailor

tailor - Import individual branches.

bzr-git

bzr-git - Transparent read-only interoperation

Mercurial (hg)

bzr-fastimport

bzr-fastimport - Import repositories.

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

Tailor

tailor - Import individual branches.

bzr-hg

bzr-hg - Deterministic mirroring

bzr-hgimport

bzr-hgimport - Fast, deterministic importing. Can be used also to mirror a branch, but this use case is not optimized.

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

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/

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

  • Non-deterministic.