It was actually a lot simpler than I expected!
In a newly created directory:
- Do the initial setup:
cvs -d:pserver:firstname.lastname@example.org:/cvsroot/sahana login
- Run the migration:
git cvsimport -k -m -v -d:pserver:email@example.com:/cvsroot/sahana sahana-phase2
- Wait several hours for it to finish!
Fixing the author names
The only thing I didn't like from the above import was that all of the commit authors were missing full names and email addresses.
So I grabbed the list of Sahana project members from Sourceforge and created a mappping like this in a text file:
ajuonline=Ajay Kumar <firstname.lastname@example.org> akshits88=Akshit Sharma <email@example.com> bhyde=Ben Hyde <firstname.lastname@example.org>
Then I ran the import with the
git cvsimport -A username_map.txt -k -m -v -d:pserver:email@example.com:/cvsroot/sahana sahana-phase2
Syncing new commits
To keep the git repository in sync with CVS and collect any new commits, simply run the same
git cvsimport command again.
My next steps will be to setup an automated sync script to keep this repository up to date with the Sourceforge one.