简体   繁体   English

git cvsimport缺少分支的增量更改

[英]Git cvsimport missing incremental changes to branch

We're using git-cvsimport to periodically copy changes from cvs into git 我们使用git-cvsimport定期将更改从cvs复制到git

For better or worse, we stuck with git cvsimport and not cvs2svn. 不管好坏,我们坚持使用git cvsimport而不是cvs2svn。 Initially we planned a "once-and-for-all" cvs-to-git migration, but people ended up doing more incremental work on the cvs repository. 最初,我们计划了“一次又一次”的cvs到git的迁移,但是人们最终在cvs信息库上做了更多的增量工作。 We want to bring changes over from a CVS branch into a git so developers can work on the feature in git. 我们希望将更改从CVS分支引入git,以便开发人员可以在git中使用该功能。

Context 语境

  • We have a dedicated 'fromcvs' git repository used solely for importing from cvs 我们有一个专用的'fromcvs'git存储库,仅用于从cvs导入
  • A designated "merge developer" merges from this 'fromcvs' repository into his/her local 指定的“合并开发人员”从此“ fromcvs”存储库合并到他/她的本地
  • I periodically execute this command to bring changes from CVS into git git-cvsimport -p -x -v -d $CVSROOT myProj 我定期执行此命令以将CVS中的更改引入git git-cvsimport -p -x -v -d $ CVSROOT myProj

The Question 问题

Why does the "git version" of branch FEATURE-FOO lack commits I see in the CVS version of said branch? 为什么分支FEATURE-FOO的“ git版本”缺少我在所说分支的CVS版本中看到的提交?

For example, in cvs I see, on branch FEATURE-FOO a change made to SomeDAO.java on Fri Feb 11. In the "fromcvs" git repository, I do not see that same change on the branch, 例如,在cvs中,我看到分支FEATURE-FOO在2月11日星期五对SomeDAO.java进行了更改。在“ fromcvs” git存储库中,我没有在分支上看到相同的更改,

git checkout FEATURE-FOO git log src/java/com/company/somefeature/SomeDAO.java git checkout功能-FOO git log src / java / com / company / somefeature / SomeDAO.java

  • Is this a bug in gitcvsimport? 这是gitcvsimport中的错误吗?
  • Or are we misisng a step (see below) to keep 还是我们错了一步(请参见下文)以保持
  • Any other pearls of wisdom ? 还有其他智慧之珠吗?

How do you interpret the warning on the git cvs import man page? 您如何解释git cvs import手册页上的警告?

One other thing: The git-cvsimport man page has this warning (I've broken it into bullet points for legibility). 另一件事:git-cvsimport手册页有此警告(为了清晰起见,我将其分解为项目符号)。

What specifically does this mean "After that, you need to git merge incremental imports, or any CVS branches, yourself." 这具体意味着什么:“在那之后,您需要自己自己合并增量导入或任何CVS分支。”

  1. You should never do any work of your own on the branches that are created by git cvsimport. 您永远不要在git cvsimport创建的分支上做任何自己的工作。

  2. By default initial import will create and populate a "master" branch from the CVS repository's main branch which you're free to work with; 默认情况下,初始导入会从CVS存储库的主分支创建并填充一个“主”分支,您可以自由使用它;

  3. After that, you need to git merge incremental imports, or any CVS branches, yourself. 之后,您需要自己git merge增量导入或任何CVS分支。

  4. It is advisable to specify a named remote via -r to separate and protect the incoming branches. 建议通过-r指定一个命名的远程对象,以分隔并保护传入的分支。

Git cvsimport has actually worked pretty well for us until now, despite the warnings over the internet. 尽管有互联网上的警告,但到目前为止,Git cvsimport实际上对我们来说还算不错。 (ie "...no man must travel alone in the Klondike after fifty below"). (即“……五十岁以下的人没有人可以独自在克朗代克旅行”)。 Perhaps I/we foolishly ignored the advice and were lulled into a false sense of security. 也许我/我们愚蠢地忽略了建议,却陷入了一种虚假的安全感。

Any recommendations? 有什么建议吗?

thanks 谢谢

will

You are having problems because git-cvsimport is fundamentally broken. 您遇到了问题,因为git-cvsimport从根本上被破坏了。 For example, see the "issues" section of its manpage . 例如,请参见其联机帮助页“问题”部分

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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