I want to migrate CVS repositories into Gitlab. I have multiple modules under a repository. I need to migrate as a single repository in Gitlab with all directories.
CVS Repository:
Repository ---> module_1
module_2
module_3
module_4
module_5
I need to migrate the above modules into Repository.git as a single repository. How can I do this without losing the commit history of each branch and tags?
Note: I used cvs2git tool to migrate this, but it's missing few of commits from CVS.
I did the following steps to migrate as an individual module, it's getting migrated properly.
- yum install subversion
- svn --version
- svn co --username=guest --password="" http://cvs2svn.tigris.org/svn/cvs2svn/trunk cvs2svn-trunk
- cd cvs2svn-trunk
- mkdir cvs2git-tmp
- python cvs2git --blobfile=cvs2git-tmp/git-blob.dat --dumpfile=cvs2git-tmp/git-dump.dat --username=cvs2git /home/cvs/Repositories/module_1/ --fallback-encoding=UTF-8
- git init --bare /root/module_1-cvs2git.git
- cd /root/module_1-cvs2git.git/
- git fast-import --export-marks=../cvs2svn-trunk/cvs2git-tmp/git-marks.dat <../cvs2svn-trunk/cvs2git-tmp/git-blob.dat
- git fast-import --import-marks=../cvs2svn-trunk/cvs2git-tmp/git-marks.dat <../cvs2svn-trunk/cvs2git-tmp/git-dump.dat
- git gc --prune=now
- cd $HOME
- git clone /root/module_1-cvs2git.git
- cd module_1-cvs2git
I did the same steps and modified [6] step to migrate as single repo like the following and complete the migration which was missing few commits as well as added few more commits with the message "This commit was manufactured by cvs2svn to create branch".
Is this the way to migrate as a single repository? OR is there any other way or tool to migrate as a single repository?
[6]. python cvs2git --blobfile=cvs2git-tmp/git-blob.dat --dumpfile=cvs2git-tmp/git-dump.dat --username=cvs2git /home/cvs/Repositories/ --fallback-encoding=UTF-8
Any inputs here really appreciated.