如何防止 git cvsimport 跳过补丁集?
我正在尝试将 cvs 模块导入现有的 git 存储库。如果我导入到一个新的存储库中,我可以让它正常工作,但是当我尝试导入到现有的存储库中时,它似乎决定跳过上次提交到我指定的分支之前的所有补丁集 - o。这就是我当前正在尝试的:
git cvsimport -v -p -x -o cvs -d <cvsroot> -k -u <module>
输出的末尾由如下行组成:
skip patchset 26: 1258578534 before 1259081502
如果我删除“-o cvs”,它会失败并显示:
Branch 'origin' does not exist.
Either use the correct '-o branch' option,
or import to a new repository.
那么,如何让 git cvsimport 导入 所有内容?
I'm trying to import a cvs module into an existing git repo. I can get it to work properly if I import into a fresh repo, but when I try to import into the existing repo it seems determined to skip all the patchsets that are dated before the last commit to the branch that I've specified with -o. This is what I'm currently trying:
git cvsimport -v -p -x -o cvs -d <cvsroot> -k -u <module>
The end of the output consists of lines like this:
skip patchset 26: 1258578534 before 1259081502
If I drop the "-o cvs", it fails with:
Branch 'origin' does not exist.
Either use the correct '-o branch' option,
or import to a new repository.
So, how can I get git cvsimport to import everything?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
导入到新的存储库中,将新分支复制到当前存储库中,然后重新编写分支以位于您已经拥有的分支之后(如果这就是您想要的)。
或者,如果您尝试通过一次转换一个模块来复制多模块 CVS 签出,您可能想尝试一次转换所有模块...
将每个模块转换为 git,拉取每个分支可能会起作用到单个存储库中,然后以每个分支头作为父级创建一个提交,将每个模块放在树中的正确位置。这并不能很好地保留各个模块历史记录中的并发性。
Import into a new repository, duplicate the new branch into your current repository then re-write the branch to sit after what you've already got, if that's what you're after.
Alternatively, if you're trying to replicate a multi-module CVS checkout by converting a module at a time, you may want to try to convert it all at once...
It may work to convert each module to git, pull each branch into a single repository then create a commit with each branch head as a parent, putting each module in the correct place in the tree. This doesn't do a good job of preserving concurrency in the individual modules' history.
技巧很简单:
因此:
现在运行 git cvsimport,其中 -C 标志指向您的git 存储库文件夹。 git cvsimport 将跳过分支头部之前带有时间戳的补丁(请参阅 -o 标志)。
The trick is simple:
Hence:
Now run git cvsimport with the -C flag pointing to your git repository folder. git cvsimport will skip patches with timestamps before the head of your branch (see -o flag).