cvs2bzr

Index


Introduction

cvs2svn/cvs2bzr is a tool that can be used to migrate CVS repositories to newer version control tools, including Bazaar. Bazaar is an adaptive version control system that supports both centralised and distributed version control. It is most famous for being used for Ubuntu and MySQL development. The program used to convert to Bazaar, called cvs2bzr, is distributed as part of the cvs2svn project.

If you are reading this documentation on the cvs2svn website, then please be aware that it describes the current trunk version of cvs2svn, which may be different than the most recent released version. Please refer to the documentation that was included with your version of cvs2svn.

Conversion to Bazaar was added in release 2.3 of cvs2svn and may have improved significantly since then. Please make sure you are using an up-to-date version of cvs2svn--perhaps even the development trunk version.

Requirements

cvs2bzr requires the following:

Development status

Most of the work of converting a repository from CVS to a more modern version control system is inferring the most likely history given the incomplete information that CVS records. cvs2svn has a long history of making sense of even the most convoluted CVS repositories, and cvs2bzr uses this same machinery. Therefore, cvs2bzr inherits the robustness and many of the features of cvs2svn. cvs2svn can convert just about every CVS repository we have ever seen, and includes a plethora of options for customizing your conversion.

The output of cvs2bzr is a "fastimport" dump file that can be imported into Bazaar using the bzr-fastimport plugin.

Although cvs2bzr is considerably newer than cvs2svn, and much less well tested, it is believed that cvs2bzr can (cautiously) be used for production conversions. If you use cvs2bzr, please let us know how it worked for you!

cvs2bzr limitations

cvs2bzr still has many limitations compared to cvs2svn. The main cvs2svn developer has limited Bazaar experience and very limited time, so help would be much appreciated! Some of these missing features would be pretty easy to program, and I'd be happy to help you get started.

Documentation

There is some documentation specific to cvs2bzr, and much of the cvs2svn documentation also applies fairly straightforwardly to cvs2bzr. See the following sources:

Usage

This section outlines the steps needed to convert a CVS repository to Bazaar using cvs2bzr.

  1. Be sure that you have the requirements, including either RCS or CVS (used to read revision contents from the CVS repository).
  2. Obtain a copy of cvs2svn/cvs2bzr version 2.3 or newer. It is recommended that you use the most recent version available, or even the development version.
    • To install cvs2svn from a tarball, simply unpack the tarball into a directory on your conversion computer (cvs2bzr can be run directly from this directory).
    • To check out the current trunk version of cvs2svn, make sure that you have Subversion installed and then run:

      svn co --username=guest --password="" http://cvs2svn.tigris.org/svn/cvs2svn/trunk cvs2svn-trunk
      cd cvs2svn-trunk
      make man # If you want to create manpages for the main programs
      make check # ...optional
      

      Please note that the test suite includes tests that are marked "XFAIL" (expected failure); these are known and are not considered serious problems.

  3. Configure cvs2bzr for your conversion. This can be done via command-line options or via an options file:
    • The command-line options for running cvs2bzr are documented in the cvs2bzr man page and in the output of cvs2bzr --help.
    • The more flexible options-file method requires you to create an options file, then start cvs2bzr with

      cvs2bzr --options=OPTIONS-FILE
      

      Use cvs2bzr-example.options in the cvs2svn source tree as your starting point; the file contains lots of documentation.

  4. Run cvs2bzr. This creates an output file in fast-import format. The name of this file is specified by your options file or a command-line argument. In the example, the file is named cvs2svn-tmp/dumpfile.fi.

  5. Load the dump file using bzr fast-import:

    bzr fast-import cvs2svn-tmp/dumpfile.fi project.bzr
    

Feedback would be much appreciated, including reports of success using cvs2bzr. Please send comments, bug reports, and patches to the cvs2svn mailing lists.