Created
May 8, 2012 15:14
-
-
Save nowlinuxing/2636145 to your computer and use it in GitHub Desktop.
Converting RCS to Git
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# http://xrtc.net/f/projects/rcs-to-git.shtml | |
$ mkdir repos.cvs repos.source | |
$ cvs -d /path/to/repos.cvs/ init | |
$ (cd repos && find . -type d -exec mkdir /path/to/repos.cvs/{} \;) | |
$ (cd repos.source && CVSROOT=/path/to/repos.cvs/ cvs import -m "Initial CVS import" repos.source TICALC start) | |
$ (cd repos && find . -type f -exec cp {} /path/to/repos.cvs/{} \;) | |
$ CVSROOT=/path/to/repos.cvs git cvsimport -C . repos.source | |
# If there are any commit message written in multi-byte character, use cvs2svn | |
# http://cvs2svn.tigris.org/cvs2git.html | |
$ svn co --username=guest --password="" http://cvs2svn.tigris.org/svn/cvs2svn/trunk cvs2svn-trunk | |
$ cd cvs2svn-trunk | |
$ mkdir cvs2svn-tmp | |
$ ./cvs2git --blobfile=cvs2svn-tmp/git-blob.dat --dumpfile=cvs2svn-tmp/git-dump.dat --fallback-encoding=utf_8 --username=[username] --use-rcs /path/to/rcs/repos | |
$ mkdir myproject.git | |
$ cd myproject.git | |
$ git init --bare | |
$ git fast-import --export-marks=../cvs2svn-tmp/git-marks.dat < ../cvs2svn-tmp/git-blob.dat | |
$ git fast-import --import-marks=../cvs2svn-tmp/git-marks.dat < ../cvs2svn-tmp/git-dump.dat |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment