简体   繁体   中英

cvs2git checkout aborted with options-file (Windows)

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?

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!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM