Converting data using cvs2git

Let's take a look at converting data using cvs2git:

  1. The first step is to migrate the CVS data structure to something that could be imported with git fast-import:
$ ./cvs2git --blobfile=/tmp/git-blob.dat  
--dumpfile=/tmp/git-dump.dat "--username=Firstname Lastname" ~/cvsroot

Writing temporary files to '/var/folders/sf/rdjwj43j4kx63xxng1gkgd040000gn/T/cvs2git-ElawtZ
...
  1. The first pass (CollectRevsPass) went through all the version files and analyzed them for revisions. The next 14 passes will transform all kinds of data from CVS and convert it:
----- pass 2 (CleanMetadataPass) -----
Converting metadata to UTF8...
Done
...
  1. Now the tool is will display statistics about the import:
 cvs2svn Statistics:
------------------
Total CVS Files: 50
Total CVS Revisions: 50
Total CVS Branches: 0
.....
  1. The next step is to create a skeleton Git repository, where we could import the converted data:
$ mkdir itwasmyparty
$ cd itwasmyparty/
$ git init
Initialized empty Git repository in /Users/joostevertse/git/itwasmyparty/.git/
  1. Then, we start the import, with the blobs being imported first (git-blob.dat):
$ git fast-import --export-marks=/tmp/git-marks.dat < /tmp/git-blob.dat

Unpacking objects: 100% (48/48), done.
git-fast-import statistics:
....
  1. Then, we import the Git metadata (git-dump.dat):
$ git fast-import --import-marks=/tmp/git-marks.dat < /tmp/git-dump.dat

Unpacking objects: 100% (23/23), done.
git-fast-import statistics:
....
  1. Now, all we need to do is checkout the data:
$ git checkout
$ git status
On branch master
nothing to commit, working tree clean

Now you have a migrated CVS repository.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.23.127.197