如何将CVS存储库实时镜像到Git中

发布于 2024-10-03 14:04:52 字数 150 浏览 3 评论 0 原文

我想设置一个只读 Git 存储库来镜像我们的 CVS 存储库(以允许使用 Gitweb 轻松浏览历史记录)。理想情况下,镜像应该实时更新。我尝试过 git-cvsimport 但更新运行大约需要两分钟,并且可能会给 CVS 服务器带来高负载。

你会用什么来完成这份工作?

I'd like to set up a read-only Git repository mirroring our CVS repo (to allow easy history browsing with Gitweb). The mirror should ideally be updated in realtime. I've tried git-cvsimport but it takes about two minutes for an update run and probably puts high load on the CVS server.

What would you use for this job?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

2024-10-10 14:04:52

您是否考虑过切换到 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.

昵称有卵用 2024-10-10 14:04:52

就像你说的,轮询机制对于 CVS 服务器来说太繁重了。

另一种解决方案是通过 CVS“提交支持文件”触发器

来自 commitinfo 脚本 ,您可以(如果 CVS 提交通过所述脚本验证):

  • 将 CVS 工作区(内部有 git 存储库)与新内容同步,
  • 在该 CVS 工作区上运行一个程序,要求 git 存储库添加 -A代码> 和<代码>提交

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):

  • synchronize a CVS workspace (with a git repo inside) with the new content
  • run a program on that CVS workspace asking the git repo to add -A and commit.

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文