0

I am trying to convert a CVS repositorys to GIT. But I only want to convert module by module because otherwise i get fals commits and file differences. The repository contains 1 CVSROOT and 4 modules.

All commands are from this cvs2git documentation. When i do it with the command-line options:

python path\to\cvs2git --blobfile=cvs2svn-tmp\git-blob.dat --dumpfile=cvs2svn-tmp\git-dump.dat "--username=cvs2git" \\remoteServer\path\to\myrepo\module

the migration works.

The repository lies on a remote server and the git-blob.dat and git-dump.dat are created on my pc.

To be more fexlible and to convert CVS-authors to git authors I want to use the options-file method but i get an error when doing so.

The steps

  1. pass1 (CollectRevsPass)
  2. pass2 (CleanMetadataPass)
  3. pass3 (CollateSymbolsPass)

working fine but in pass4 (FilterSymbolsPass) i get an error: The path to the module i want to convert is \\remoteServer\path\to\myrepo\module.

Filtering out excluded symbols and summarizing items... ERROR: The command 'cvs -Q -R -f -d :local:\\remoteServer\path\to\myrepo K co -r1.1 -p -kb module/.cvsignore' failed with exit status=1 and the following output: cvs [checkout aborted]: Local access to network share not supported (Use -N to o verride this error).

I dont know why this is because I used the same path to the repository in both the options-file and the command- line method.

So how do I solve this problem?

ueberBrot
  • 431
  • 3
  • 10

1 Answers1

2

If you run cvs2git from the command line, the default is to read data out of CVS using internal code. But if you run it using the options file method, the default is to use CVSRevisionReader, which uses the cvs command to get information out of your CVS repository.

One option would be to tell the options method to use ExternalBlobGenerator rather than GitRevisionCollector. But if your repository was in fact written by CVSNT (as opposed to standard CVS), then it is recommended that you use CVSRevisionReader.

The problem with "Local access to network share is not supported" is a CVSNT peculiarity. The error message also suggests the solution: add -N to the options. You can do that by following the instructions here and adjusting the parameters passed to the CVSRevisionReader constructor:

CVSRevisionReader(cvs_executable=r'cvs', global_options=['-q', '-N', '-f']),

Hope that helps!

mhagger
  • 2,687
  • 18
  • 13
  • thank you for your fast response. I copied the `global_options=['-q', '-N', '-f']` and added it following the instructions. Got this error: `ERROR: The command 'cvs -q -N -f -d :local:\\\\remoteServer\\path\\to\\myrepo K co -r1.1 -p -kb module/.cvsignore' failed with exit status=1 and the following output: cvs checkout: connect to XXX.X.X.X(XXX.X.X.X:abcd):abcd failed: No connection could be made because the target machine actively refused it. cvs [checkout aborted]: Couldn't connect to lock server` But if it is a server problem why does it work when i dont use the options-file? – ueberBrot Nov 14 '17 at 09:08
  • There's a lock server involved? I don't know anything about that; it must be CVSNT hocus-pocus. The first paragraph of my answer explained why it worked when using the command-line method. – mhagger Nov 15 '17 at 17:03