cvsps-import is a plugin for bzr, which is able to convert a cvs repository into a bzr repository, preserving the project history.
Comparison with other converters
Tailor is a program which is designed to convert between many different formats, while cvsps-import is only able to convert from a cvs project into a bzr project. By focusing on just those two formats it is able to achieve a much faster conversion rate, and is also able to convert all branches of a cvs project.
There are a few ways to use cvsps-import depending on the complexity of the project.
Most project can be simply imported with:
bzr cvsps-import path/to/cvsroot module output
Obviously this has 3 portions
- This can be a relative or absolute path, but at the moment must be a local path. (:pserver: and :ext: are not yet supported). Underneath this directory should be the cvs control files. Most notably CVSROOT which is how cvs tells that it is a repository. You should be able to cvs -d /absolute/path/to/cvsroot rlog module.
- The cvs module to converted. This can be "." to convert the entire repository. It can be any path inside the repository (ie it can be a sub-module with "path/to/module").
- An output directory to store the conversion, and any intermediate information.
When things get tricky
Usually bzr cvsps-import runs cvsps itself with appropriate flags to generate the changeset file. cvsps has some limited support for extracting the log of all revisions. However, sometimes that is insufficient and you need to generate a dump file manually. To do so, create a cvs checkout of the base module (you can checkout just the top-level directory with -l). And then run cvsps from there to generate the dump file.
cvs -d /path/to/cvsroot co -l module cd module cvsps -A -q -u > ../module.dump cd .. bzr cvsps-import --cvsps-dump module.dump /path/to/cvsroot module out
There are a few options which can be used to change how the conversion will be done.
- When extracting texts from the control files, use the rcs command "co". This is slightly faster than --use-cvs.
- Use cvs co -p to extract the texts from the control files. This is useful when you don't have the rcs tools installed. It seems to be slightly slower than --use-rcs.
- Set the encoding to use when reading author names and commit logs. The default encoding is iso-8859-1 (latin-1).
The bug tracker for cvsps-import is hosted on launchpad at https://launchpad.net/bzr-cvsps-import/+bugs