如何将CVS存储库实时镜像到Git中
我想设置一个只读 Git 存储库来镜像我们的 CVS 存储库(以允许使用 Gitweb 轻松浏览历史记录)。理想情况下,镜像应该实时更新。我尝试过 git-cvsimport 但更新运行大约需要两分钟,并且可能会给 CVS 服务器带来高负载。
你会用什么来完成这份工作?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您是否考虑过切换到 Git。 6 个多月前,我将我的团队从 SVN 切换到了 Git,我们并没有真正怀念 SVN。 Git 更加灵活和强大。它似乎拥有一个更大、更活跃的社区,并且兴趣不断增长而不是下降点击此处。
无论如何,学习曲线花了我们几周的时间,但现在我们的开发过程和发布过程更快、更愉快。
我们每天大约启动一个内部 Web 应用程序 10 次,并采用精选工作流程,让我能够准确选择要启动的更改。它还允许所有开发人员(包括我自己)随时提交任何可供审查或启动的内容,而几乎不会发生合并冲突。其中大部分是空白更改。
只是一些可以咀嚼的东西。
Have you considered just switching to Git. I switched my team to Git from SVN over 6 months ago, and we haven't really missed SVN. Git is more flexible and powerful. It seems to have a bigger and more active community, and growing interest instead of declining interest Click here.
Anyhow the learning curve took us a few weeks, but now our development process and launch process are much quicker and happier.
We launch an internal web app ~10 times a day with a cherry-pick workflow that allows me to pick exactly which changes to launch. It also allows all the devs, myself included, to commit anything that is ready for review or launch at any time with little chance of merge conflicts. Most of which are whitespace changes.
Just something to chew on.
就像你说的,轮询机制对于 CVS 服务器来说太繁重了。
另一种解决方案是通过 CVS“提交支持文件”触发器。
来自
commitinfo
脚本 ,您可以(如果 CVS 提交通过所述脚本验证):CVS 工作区中的 Git 存储库可以是您的只读存储库,也可以是中间存储库,然后在每次新的 Git 提交时,将所有修改推送到所述只读 Git 存储库。
Like you say, a polling mechanism is too taxing for a CVS server.
The other solution would be to initiate that mechanism from the CVS server itself, through one of the CVS "commit support files" triggers.
From a
commitinfo
script, you could (if the CVS commit is validated by said script):add -A
andcommit
.That Git repo within a CVS workspace could be your read-only repo, or it could be an intermediate repo which would then, on each new Git commit, push all modification to said read-only Git repo.