How to migrate CVS repository with multiple modules as a single repository into Gitlab

444 Views Asked by At

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.

  1. yum install subversion
  2. svn --version
  3. svn co --username=guest --password="" http://cvs2svn.tigris.org/svn/cvs2svn/trunk cvs2svn-trunk
  4. cd cvs2svn-trunk
  5. mkdir cvs2git-tmp
  6. 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
  7. git init --bare /root/module_1-cvs2git.git
  8. cd /root/module_1-cvs2git.git/
  9. git fast-import --export-marks=../cvs2svn-trunk/cvs2git-tmp/git-marks.dat <../cvs2svn-trunk/cvs2git-tmp/git-blob.dat
  10. git fast-import --import-marks=../cvs2svn-trunk/cvs2git-tmp/git-marks.dat <../cvs2svn-trunk/cvs2git-tmp/git-dump.dat
  11. git gc --prune=now
  12. cd $HOME
  13. git clone /root/module_1-cvs2git.git
  14. 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.

0

There are 0 best solutions below