svn2cvs - save subversion commits to (read-only) cvs repository
./svn2cvs.pl SVN_URL CVSROOT CVSREPOSITORY
Usage example (used to self-host this script):
./svn2cvs.pl file:///home/dpavlin/private/svn/svn2cvs/trunk/ \ :pserver:dpavlin@cvs.tigris.org:/cvs svn2cvs/src
This script will allows you to commit changes made to Subversion repository to
(read-only) CVS repository manually or from Subversion's post-commit
hook.
It's using .svnrev file (which will be created on first run) in CVSROOT/CVSREPOSITORY to store last Subversion revision which was committed into CVS.
One run will do following things:
If checkout fails for some reason (e.g. flaky ssh connection), you will still have valid CVS repository, so all you have to do is run svn2cvs.pl again.
``Cheap'' copy operations in Subversion are not at all cheap in CVS. They will create multiple copies of files in CVS repository!
This script assume that you want to sync your trunk
(or any other
directory for that matter) directory with CVS, not root of your subversion.
This might be considered bug, but since common practise is to have
directories trunk
and branches
in svn and source code in them, it's
not serious limitation.
Subversion http://subversion.tigris.org/ version control system that is a compelling replacement for CVS in the open source community.
cvs2svn http://cvs2svn.tigris.org/ converts a CVS repository to a Subversion repository. It is designed for one-time conversions, not for repeated synchronizations between CVS and Subversion.
Versions of this utility are actually Subversion repository revisions, so they might not be in sequence.
update -d
instead of checkout after import.
Added fixes by Paul Egan <paulegan@mail.com> for XMLin and fixing working
directory.
Dobrica Pavlinusic <dpavlin@rot13.org>
http://www.rot13.org/~dpavlin/
This product is licensed under GNU Public License (GPL) v2 or later.