0

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.

xlembouras
  • 8,215
  • 4
  • 33
  • 42
niharr7
  • 41
  • 1
  • 11
  • HEllo xlembouras.Have u editted anything? – niharr7 Feb 24 '15 at 11:01
  • First test sanity of your CVSROOT and such by doing a cvs checkout ("cvs -d $CVSROOT co"). – chrisinmtown Feb 24 '15 at 11:02
  • while running cvs co -d $CVSROOT gives the error must specify 1 module or directory.I have given one of my projects name which is in cvs still the error is coming. – niharr7 Feb 24 '15 at 11:12
  • Hello I can check out the projects. – niharr7 Feb 24 '15 at 11:56
  • possible duplicate of [What is the best way to import a CVS repository in GIT and use it locally?](http://stackoverflow.com/questions/11362676/what-is-the-best-way-to-import-a-cvs-repository-in-git-and-use-it-locally) – kenorb Mar 17 '15 at 23:56

3 Answers3

2

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 anonymous@cvs.savannah.gnu.org:/sources/groff groff
find groff | cvs-fast-export >groff.fi
Roland Smith
  • 42,427
  • 3
  • 64
  • 94
0

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
Community
  • 1
  • 1
chrisinmtown
  • 3,571
  • 3
  • 34
  • 43
  • But I guess to use cvs2git the cvs repository has to be in your local machine.I only have apserver access to my CVS repository. – niharr7 Feb 25 '15 at 06:55
  • I am trying to migrate my project from cvs to git. I have tries git-cvsimport and cvs2git command line tools but not succedded. For cvs2git I have run below command. $ cvs2git --blobfile=c:\blobData.dat --dumpfile=c:\dumpData.dat --username=NiharRanjan.Behera C:\MigrationCVS\LocalRepoCVS\CVSROOT; But it does nothing.It simply goes to a new kine without doing anything.Means I guess the command did not run.I am using windows for this. Any help would be appreciated. – niharr7 Mar 05 '15 at 13:19
0

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.

user3710044
  • 2,261
  • 15
  • 15