How to import CVS to git scm?

落爺英雄遲暮 提交于 2019-11-29 08:01:40
reza

Gave up on this approach and have used cvs2git.

The cvs2git is a tool that can be used to migrate CVS repositories to newer version control tools, including git.

Sample usage:

cvs2git \
    --blobfile=cvs2git-tmp/git-blob.dat \
    --dumpfile=cvs2git-tmp/git-dump.dat \
    --username=cvs2git \
    /path/to/cvs/repo

From http://git-scm.com/docs/git-cvsimport

WARNING: git cvsimport uses cvsps version 2, which is considered deprecated; it does not work with cvsps version 3 and later. If you are performing a one-shot import of a CVS repository consider using cvs2git or parsecvs.

Check if you have a cvsps version 3 or later

$ cvsps --version

If you can downgrade it to cvsps version 2 you are done.

Main difference is cvs2git is not incremental (except using this workaround), so it's targeted to one-shot checkout. With cvsimport you can do incremental updates, and stay up to date to cvs repo.

You may downgrade it to cvsps-2.1 and re-test, as git cvsimport doesn't work properly with cvsps-3.x, because it has different syntax.

On OSX you can (having brew):

brew tap homebrew/versions
brew install cvsps2
brew unlink cvsps
brew link --overwrite cvsps2
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!