Importing Mozilla CVS to Bazaar

From MozillaWiki
Jump to: navigation, search

This is not quite a "procedure" yet, because it doesn't list specific versions of a lot of stuff. This is how bsmedberg performed an import.

Software to Obtain

FC6

Performed in a VM of FC6. I did not install the bazaar, cvsps, or mercurial packages (to get new enough versions you have to build from source).

Bazaar

You need a recent pull of bazaar (performance code was checked in after the 0.13 release). To obtain:

$ cd ~
$ rsync -av bazaar-vcs.org::bazaar-ng/bzr/bzr.dev .
$ cd bzr.dev
$ python setup.py install --home=~/bzr.dev-installed
$ export PATH=$PATH:~/bzr.dev-installed/bin
$ export PYTHONPATH=~/bzr.dev-installed/lib/python

Reference websites:

cvsps

$ cd ~
$ git clone http://ydirson.free.fr/soft/git/cvsps.git cvsps
$ make
$ make install prefix=~/cvsps-installed
$ export PATH=$PATH:~/cvsps-installed/bin

bzr-cvsps-import

$ cd ~
$ bzr branch https://launchpad.net/~bzr/+branch/bzr-cvsps-import/trunk bzr-cvsps-import
$ export BZR_PLUGIN_PATH=~/bzr-cvsps-import

Procedure

Obtain a copy of the CVS repository:

$ rsync -avz cvs-mirror.mozilla.org::mozilla ~/mozilla-cvs-mirror
$ perl -pi -e 's/NoLocks/#NoLocks/' ~/mozilla-cvs-mirror/CVSROOT/config

Run cvsps to divine patchsets from the CVS repository:

TZ=UTC CVSROOT=~/mozilla-cvs-mirror cvsps --root ~/mozilla-cvs-mirror mozilla -u -A > ~/mozilla.cvsps.log

Run cvsps-import in bazaar to create a new repository. This will take at least 1G of RAM and a boatload of time. 8 days might be a good guess, on a 2.8Ghz Pentium D running only one CPU.

$ bzr cvsps-import --cvsps-dump=~/mozilla.cvsps.log ~/mozilla-cvs-mirror mozilla ~/mozilla-bzr-export