Bazaar

Bazaar

 




Wiki Tools

  • Find Page
  • Recent Changes
  • Page History
  • Attachments

Differences between revisions 4 and 5
Revision 4 as of 2008-02-22 06:52:12
Size: 2649
Comment: nicer link titles
Revision 5 as of 2008-02-27 08:56:48
Size: 3651
Comment: added information on new features
Deletions are marked like this. Additions are marked like this.
Line 34: Line 34:
After installing the plugin, see the online help and the bundled documentation. After installing the plugin, see the online help and the bundled documentation. A summary of the main features is given below.
Line 36: Line 36:
== Front-ends == == Feature Notes ==

=== Performance ===

The numbers are very dependent on the number of files and number of revisions. As a rough guide, around 1000 revisions per minute can be imported for projects of several hundred files on a typical desktop. For example, the 6000+ revisions of Wordpress (500 files) can be imported from a Subversion export in just over 2 minutes on my Dell Dimension 9200. Other benchmarking suggests import performance 5-20 times that of bzr-git, for example.

=== Front-ends ===
Line 40: Line 46:
== Performance ==

The numbers are very dependent on the number of files and number of revisions. As a rough guide, around 1000 revisions per minute can be imported for projects of several hundred files on a typical desktop. For example, the 6000+ revisions of Wordpress (500 files) can be imported from a Subversion export in just over 2 minutes on my Dell Dimension 9200. Other benchmarking suggests import performance 5-20 times that of bzr-git, for example.

== Stream Format ==
=== Custom Exporters ===
Line 48: Line 50:
== Main Issues == === Import Restarts ===
Line 50: Line 52:
'''bzr-fastimport''' does not yet support incremental migration as required by users wishing to mirror projects maintained in foreign tools. That's coming soon. If an import is interrupted or unexpectedly crashes, it can be restarted. Technically, inside the destination repository's control directory a file named ''fastimport-id-map'' is kept that holds the mapping from import stream commit-ids to Bazaar revision-ids. That file is saved at each checkpoint and on completion. When fast-import runs, the repository is checked for consistency against that file (if present) and revisions already loaded are skipped in the import stream accordingly.

=== Mirroring of Foreign Repositories ===

As long as the ''fastimport-id-map'' file is not deleted and the front-end generates an export which begins with the same content as the previous import, '''bzr-fastimport''' can be used to maintain a Bazaar mirror of a foreign repository.

=== Whole Repository Imports ===

If run inside a shared repository, branches will be created or updated as required.

If run inside a standalone tree, all revisions from the repository will be imported, the current branch will be made the trunk and information is output about the lost heads.

Bazaar Fast Import

TableOfContents()

Overview

bzr-fastimport provides a back-end for fast data importing into Bazaar. The usual recipe is:

bzr init-repo .
front-end | bzr fast-import -

Key features include:

  • Fast data importing from most popular VCS tools
  • Easy to develop custom exporters
  • Import whole repositories: branches are created for each head detected.

Note: [https://launchpad.net/bzr-fastimport bzr-fastimport] was inspired by Shawn Peace's [http://www.kernel.org/pub/software/scm/git/docs/git-fast-import.html git-fast-import] and uses a stream format that is upwardly compatible with it. Thanks go to Shawn and the Git community for developing that tool and a range of matching front-ends.

Downloads, Bugs, etc.

This plugin is hosted on Launchpad here: https://launchpad.net/bzr-fastimport. After installing Bazaar, grab the latest source like this:

bzr branch lp:bzr-fastimport fastimport

Bugs can be raised and tracked via Launchpad's bug tracker: https://bugs.launchpad.net/bzr-fastimport/. If you have questions or ideas for discussion, please use the main Bazaar mailing list, <bazaar@lists.canonical.com>.

Documentation

After installing the plugin, see the online help and the bundled documentation. A summary of the main features is given below.

Feature Notes

Performance

The numbers are very dependent on the number of files and number of revisions. As a rough guide, around 1000 revisions per minute can be imported for projects of several hundred files on a typical desktop. For example, the 6000+ revisions of Wordpress (500 files) can be imported from a Subversion export in just over 2 minutes on my Dell Dimension 9200. Other benchmarking suggests import performance 5-20 times that of bzr-git, for example.

Front-ends

See [:/FrontEnds: Bazaar Fast Import Front-Ends] for a list of recommended exporters from other tools. Front-ends are available for Subversion, CVS, Git, Mercurial, Darcs and Perforce among others.

Custom Exporters

Many projects take the opportunity to clean up cruft when migrating from an older VCS tool to a new one. Rolling your own exporter is often a good way of doing that. If you want to do this, see [:/StreamFormat: Bazaar Fast Import Stream Format] for the detailed format specification. Exporters can easily be developed in most scripting languages (Python, Perl, Ruby, etc.) and are typically just a few hundred lines long.

Import Restarts

If an import is interrupted or unexpectedly crashes, it can be restarted. Technically, inside the destination repository's control directory a file named fastimport-id-map is kept that holds the mapping from import stream commit-ids to Bazaar revision-ids. That file is saved at each checkpoint and on completion. When fast-import runs, the repository is checked for consistency against that file (if present) and revisions already loaded are skipped in the import stream accordingly.

Mirroring of Foreign Repositories

As long as the fastimport-id-map file is not deleted and the front-end generates an export which begins with the same content as the previous import, bzr-fastimport can be used to maintain a Bazaar mirror of a foreign repository.

Whole Repository Imports

If run inside a shared repository, branches will be created or updated as required.

If run inside a standalone tree, all revisions from the repository will be imported, the current branch will be made the trunk and information is output about the lost heads.