===== Description ===== It should be possible to import the current %%FreeBSD%% CVS repository, and retain the following. * A complete history of HEAD * Every RELENG branch, mapped to the appropriate branching methodology of the target VCS * If the target VCS supports atomic commits then commits to the CVS repo that would have been considered atomic by log_accum.pl should also be atomic in the new repository It is not necessary to maintain the same per-file revision numbers. However, it is desirable that a mechanism be available to map from commits in the new repo to commits in CVS. For example, it should be possible to say that src/README, r1.23, can be found at revision N (or changeset FOO) in the new repo. ===== Current Implementation ===== N/A ===== SVN Implementation ===== There are several CVS -> Subversion repository converters. The most well known is cvs2svn, written in Python, which ships with Subversion in the contrib/ directory. I am also aware of a converter by Polarion, written in Java ([[http://www.polarion.org/index.php?page=overview&project=svnimporter]]). I am not aware of any tests that have been run to determine how well these tools handle the %%FreeBSD%% CVS repository. The head version of cvs2svn does a very good job of converting the entire freebsd cvs repository, recreating all the branch structure and vendor branches. A lot of work is required to configure it, but it does a complete job of it. -Peter ===== Hg Implementation ===== Hg's conversion tools are still a work in progress although mostly satisfying solutions do exist: === Tailor === This is a general purpose converter between several VCS including CVS, bzr, Hg and others. It is rather slow but gets the work done. I have not tried it on ''%%src%%'' or ''%%ports%%'' as they are too big IMHO. Branches and tags are not supported AFAIR. === cvs20hg === This is the most advanced solution yet. This is the converter that we use on HG repos. The original one does not support branches at all but Pierre Beyssac (''%%pb@%%'') hacked it in. It takes three days to convert ''%%src%%'' and more than 12 days to convert ''%%ports%%''. Please keep in mind that we need to do that only once per branch and fortunately, ''%%ports%%'' is not branched at all. We have CURRENT and RELENG_6 on ''%%hg.fr.freebsd.org%%''. === cvs-import === This is a new converter written by Chris Mason (who also wrote the Mercurial Queues extension). It is using cvsps to massage the CVS repository into individual changesets which are then imported to Hg. ''%%cvsps%%'' does not seems to support all the pecularities found in our repos because it dumps core on ''%%src%%''. === fromcvs (?) === This is a new converter written by Simon "corecode" Schubert who is also the author or ''%%cvs20hg%%''. It is based on his implementation of rcsparse and is written in Ruby. Not yet tested on our repos. NOTE: ''%%cvs20hg%%'' is the only one supporting (apart from fromcvs which is not finished) branches right now. === cvs2svn then svn2hg === Like git it could also be a valid way to convert our repos but I'd say only if all others fail. ===== Git Implementation ===== parsecvs is the premier tool for conversion from CVS to git. Converting src/ looks like it may have taken around 6 hours on a dual athlon with 1GB RAM. However, it can't be used for a continuing CVS to git gateway because of our use of repocopies, which alter the parsing of old history of the tree. git-cvsimport should be ignored because it uses cvsps, which mangles history. A daily updated full-history repo can be found at ''%%git://kaede.iichan.net/freebsd%%'' and the corresponding gitweb at ''%%http://kaede.iichan.net/gitweb/gitweb.cgi%%''. This would be unsuitable for development branches because of repocopies rewriting history. ===== Monotone Implementation ===== **Partially Supported** (also see [[http://venge.net/monotone/wiki/FeatureCVSImport|monotone:FeatureCVSImport]]) [[/Monotone|Monotone]] can import cvs history, including collecting together changes in multiple files into synthesised change sets. The ''%%cvs_import%%'' command provides this feature; this is just one of several ways of working with Monotone and CVS. The primary limitation the ''%%cvs_import%%'' command is that CVS branches are presently not attached to the revisions they branched off from: each is an independent linear history. Work is underway to resolve this limitation.