This is an old revision of the document!
This page describes the FreeBSD Subversion to CVS exporter AKA svn2cvs.
Currently the page is work in progress and should not be relied on to be accurate!
svn2cvs overview
The basic purpose of the FreeBSD svn2cvs system is to replicate commits in the FreeBSD Subversion repository to the old CVS repository. svn2cvs preserves full commit information (as much as CVS allows) by exporting:
- commit actualy change content
- commit comment
- commit date / time
- commit author
svn2cvs exporter basically works by examining each subversion commit and then replicating it as good as possible into CVS.
svn2cvs parts
svn2cvs consists of the following parts:
- The main svn2cvs python script
export.py - A counter stored as a SVN property telling the exporter the last SVN revision exported
- Modified version of cvs
- Local FreeBSD svn mirror updated every 5 seconds
- Checked out version of each active CVS branch
The counter with the last exported revision is storted as a revision
property stored on revision 0 called fbsd:lastexp. It can be
retried using:
svn pg fbsd:lastexp --revprop -r 0 file:///tank/files/mirror/FreeBSD/svn/base/
Modified CVS
The modified version of CVS is changed from stock CVS as follows:
- If the environment variable
CVS_TIMESTAMPis set, use that as the commit timestamp instead of the current 'wall clock'.
- If the environment variable
CVS_AUTHORis set, use that to set author in CVS commit instead if the actual user which are perfomring the commit action (svn2cvs)
- Do not allow 'cvs imports' to be run on the 'ncvs' repository.
How svn2cvs works per commit
TODO
Problems
It doesn't like when a file is 'replaced' in Subversion.
The following files in the FreeBSD repoisotry suffers from this, as of this writing:
src/tools/build/options/WITH_BIND_LIBSsrc/contrib/file/magic2mime