Bazaar

Bazaar

 




Wiki Tools

  • Find Page
  • Recent Changes
  • Page History
  • Attachments

Differences between revisions 17 and 23 (spanning 6 versions)
Revision 17 as of 2007-03-08 21:25:39
Size: 4174
Comment:
Revision 23 as of 2009-05-14 18:26:53
Size: 4164
Editor: localhost
Comment: converted to 1.6 markup
Deletions are marked like this. Additions are marked like this.
Line 3: Line 3:
[[TableOfContents]] <<TableOfContents>>
Line 8: Line 8:
'''svn2bzr''' is a tool to convert [http://subversion.tigris.org Subversion]
repositories into [http://bazaar-vcs.org Bazaar] repositories.
'''svn2bzr''' is a tool to convert [[http://subversion.tigris.org|Subversion]]
repositories into [[http://bazaar-vcs.org|Bazaar]] repositories.
Line 53: Line 53:
 [[BR]][[BR]]  <<BR>><<BR>>
Line 60: Line 60:
 [[BR]][[BR]]  <<BR>><<BR>>
Line 67: Line 67:
 [[BR]][[BR]]  <<BR>><<BR>>
Line 72: Line 72:
 (the default) will convert everything into a single Bazaar 2.0  (the default) will convert everything into a single Bazaar
Line 76: Line 76:
 Bazaar 2.0 branch.  Bazaar branch.
Line 86: Line 86:
Bazaar 2.0 branch: Bazaar branch:
Line 90: Line 90:
[[BR]] <<BR>>
Line 93: Line 93:
into multiple Bazaar 2.0 branches: into multiple Bazaar branches:
Line 97: Line 97:
[[BR]] <<BR>>
Line 100: Line 100:
`trunk`/`tags`/`branches` scheme into a Bazaar 2.0 branch: `trunk`/`tags`/`branches` scheme into a Bazaar branch:
Line 104: Line 104:
[[BR]][[BR]] <<BR>><<BR>>
Line 108: Line 108:
multiple Bazaar 2.0 branches: multiple Bazaar branches:
Line 120: Line 120:
The current development version may be found in the following Bazaar branch: The current development version may be obtained using the following Bazaar branch command:
Line 122: Line 122:
  http://bzr.labix.org/svn2bzr/   `bzr branch lp:svn2bzr`
Line 124: Line 124:
Check the [http://code.launchpad.net/svn2bzr/ Launchpad code tab] to see Check the [[http://code.launchpad.net/svn2bzr/|Launchpad code tab]] to see
Line 130: Line 130:
Copyright (c) 2005-2007 Canonical Ltd. Copyright (c) 2005-2009 Canonical Ltd.

Contents

Introduction

svn2bzr is a tool to convert Subversion repositories into Bazaar repositories.

It does that by reading a dump file with the history of a given Subversion repository, and creating the Bazaar repository according to the given parameters.

Features

  • Support for branches and tags - svn2bzr is able to convert all branches and tags of the subversion repository, splitting them into separate Bazaar branches, using a unique shared repository.

  • Flexible branch description - it is possible to fine tune what will be migrated and how the process will be done by using regular expressions to include/exclude paths, a provided prefix for consideration, and one of the predefined branch schemas.

  • Stable file and revision IDs - svn2bzr produces stable file and revision IDs, meaning that if the same subversion repository is converted twice, the resulting bzr branches will interoperate.

  • Metadata migration - data like committer, timestamp, and log message is automatically migrated to the Bazaar repository.

  • No external dependencies - svn2bzr doesn't depend on anything else besides a recent Python interpreter and Bazaar itself.

Basic usage

The basic command usage is:

svn2bzr.py [options] <dump file> <output dir>

Accepted options

The following options are accepted:

  • --prefix PATH

    • Will build the new repository as if the Subversion repository

      started at its PATH subdirectory.

    --include REGEXP

    • Add REGEXP to the ordered list of filtering expressions. If a path matches that expression before matching an exclude expression, the path will be converted. If no expressions match in the filtering list, the path is also considered.

    --exclude REGEXP

    • Add REGEXP to the ordered list of filtering expressions. If a path matches that expression before matching an include expression, the path won't be converted. If no expressions match in the filtering list, the path is considered.

    --scheme SCHEME

    • Define the conversion mechanism used. Currently there are two

      schemes: single, and trunk. The single scheme (the default) will convert everything into a single Bazaar branch. The trunk scheme expects the Subversion repository to be in the trunk/tags/branches format, and will split the trunk, each tag, and each branch into a different Bazaar branch.

    --log LEVEL

    • Define the logging level to LEVEL, which may be debug, info, warning, or error.

Examples

Convert everything inside a Subversion repository into a Bazaar branch:

svn2bzr.py svn.dump bzr/


Convert a repository using the trunk/tags/branches scheme into multiple Bazaar branches:

svn2bzr.py --scheme=trunk svn.dump bzr/


Convert just the trunk of a Subversion repository using the trunk/tags/branches scheme into a Bazaar branch:

svn2bzr.py --prefix=trunk svn.dump bzr/



Convert the trunk and the branches directories of a Subversion repository using the trunk/tags/branches scheme into multiple Bazaar branches:

svn2bzr.py --scheme=trunk --exclude=tags svn.dump bzr/

Another way to do the same thing:

svn2bzr.py --scheme=trunk --include=trunk --include=branches --exclude='.*' svn.dump bzr/

Download

The current development version may be obtained using the following Bazaar branch command:

  • bzr branch lp:svn2bzr

Check the Launchpad code tab to see how people have been working on the project.

Copyright (c) 2005-2009 Canonical Ltd.

License

svn2bzr is available under the GPL.

Author

svn2bzr was written by Gustavo Niemeyer <gustavo@niemeyer.net>