(Inspired from Sourceforge' CVS convertion documentation)
We are using pearpc as example:
- List all CVS module by going to the CVS page (ie: pearpc,utils,www) : http://pearpc.cvs.sourceforge.net/
- Install the required software:
dnf install coreutils sed cvs rcs rsync curl git git-cvs
- Get the whole CVSroot:
rsync -a a.cvs.sourceforge.net::cvsroot/pearpc/ pearpc_cvs
- Export the list of every authors:
for vfile in `find pearpc_cvs -name '*,v'`; do rlog $vfile | sed -nr 's/^date:.* author: ([^;]+).*/\1/p'; done | sort -u >cvs-author-names
- Cleanup cvs-author-names by removing root
- Generate the mapping file:
for uname in `cat cvs-author-names`; do json=`curl https://sourceforge.net/rest/u/$uname/profile`; fname=`echo "$json" | sed -nr 's/\{"username": "[^"]+", "name": "([^"]+)".*/\1/p'`; echo "$uname = $fname <[email protected]>"; done >authors.txt
- Fix the mapping file authors.txt (correct corrupted charset, set the correct email, ...)
- For every module (here for pearpc):
- Convert the cvs module to a new git repositery:
git cvsimport -v -a -k -d `pwd`/pearpc_cvs -C pearpc_git_pearpc -A authors.txt pearpc
- Move into your newly create git repositery:
cd pearpc_git_pearpc
- Add a new remote called origin:
git remote add origin https://scm.byme.at/Converted/pearpc_cvs_pearpc.git
- Push the master branch:
git push -u origin master
- Push everything else (tags, other branch):
git push --all origin
- Convert the cvs module to a new git repositery: