Reputation: 41
I am trying to migrate from CVS to git. while running the git cvsimport command I am getting following error.
c:\Users\cvsps-2.1.tar\cvsps-2.1\cvsps-2.1>git cvsimport -C -d $CVSROOT
cvs_direct: cvs server too old for cvs_direct
WARNING: Your CVS client version:
[Client: Concurrent Versions System (CVS) 1.11.17 (client/server)]
and/or server version:
[Server: Concurrent Versions System (CVS) 1.11 (client/server)]
are too old to properly support the rlog command.
This command was introduced in 1.11.1. Cvsps
will use log instead, but PatchSet numbering
may become unstable due to pruned empty
directories.
cvs log: in directory .:
cvs [log aborted]: there is no version here; run 'cvs checkout' first
can't open cvsps.cache for write: No such file or directory
fatal: refs/heads/origin: not a valid SHA1
fatal: master: not a valid SHA1
warning: You do not appear to currently be on a branch.
warning: Forcing checkout of HEAD.
fatal: just how do you expect me to merge 0 trees?
checkout failed: 256
The CVSROOT I have already set. Since the server is having cvs version 1.11 and client having 1.11.17 so the error is coming.
Any help would be highly appreciated.
Upvotes: 0
Views: 2129
Reputation: 43533
Have a look at cvs-fast-export. (See also the manual page.) Make a copy of the repository (just to be sure) and let cvs-fast-export
work on that.
It doesn't require a the CVS server but works directly on the RCS files in the repository, like this;
cp -Rp repo/ test
cd test
echo RCS >.gitignore
git init
find . | cvs-fast-export -A ~/authormap | git fast-import
git add .
git commit -m "Imported into git."
If you need to fetch data from a remote repository, use cvssync
. Example from the cvs-fast-import manpage:
cvssync [email protected]:/sources/groff groff
find groff | cvs-fast-export >groff.fi
Upvotes: 2
Reputation: 2334
The version of CVS on your server was released last century. This is the problem!
About 14 years ago the first version of CVS with the cvs rlog
command was released. This version should work correctly, an upgrade is long overdue.
As you want to break from CVS I suggest you get a proper backup of your CVS repository any way you can, angry phone calls included, and convert that using any of the many tools available.
If no one is listening you might try cvssucks, but it's very slow.
The cvsps
command that git cvsimport
uses should be able to get a collection of patches from your repository even if it's that old; it's going to be tedious to put them back together though.
Upvotes: 0
Reputation: 4364
I can offer an answer to the question "how to migrate CVS to git once and done" (but cannot explain the error you report).
See this SO article How to import CVS to git scm? and the Git doc for the cvsimport command. Both strongly recommend using cvs2git or parsecvs (instead of git cvsimport) for a one-time migration.
I tried cvs2git - download from http://cvs2svn.tigris.org/cvs2git.html. The commands were a bit hairy but it worked. QuickStart:
% cvs2svn-2.4.0/cvs2git --blobfile=blob.dat --dumpfile=dump.dat --username=cvs2git /path/to/cvsroot/project/
% git init --bare project.git
% cd project.git
% cat ../blob.dat ../dump.dat | git fast-import
Upvotes: 0