使用git中的hooks导入导出到cvs

发布于 2024-09-01 10:08:16 字数 303 浏览 2 评论 0原文

我想知道这是否可行:

  • 创建一个连接到 cvs 的共享 git 存储库,
  • 向其发布两个钩子:
    1. 每次有人从中提取时,它都会从 cvs 存储库导入
    2. 每次有人推送它时,它都会导出到 cvs 存储库

它对 git 用户是完全透明的

基本上会创建一个 cvs 存储库的“惰性镜像”,如果是这样的话, 不可能 创建 cvs 镜像的最佳方法是什么?

附注git-cvsserver 可以用吗?除了提交、签出和更新之外,它还能合并两个分支吗?

i would like to know if this is possible:

  • create a shared git repository that connects to cvs
  • post two hooks to it:
    1. everytime anyone pulls from it, it imports from the cvs repository
    2. everytime anyone pushes to it, it exports to the cvs repository

basically create a 'lazy mirror' of a cvs repository that is completely transparent to the git users

if this is not possible what are the best method to create a cvs mirror?

ps. is git-cvsserver usable? besides the commits, checkouts and updates, can it merge two branches?

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

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

发布评论

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

评论(1

古镇旧梦 2024-09-08 10:08:16

git-cvsserver 有局限性:

  • 目前,cvsserver 通过 SSH 连接进行读/写客户端操作,并通过 pserver 进行匿名 CVS 访问。
  • CVS 客户端无法标记、分支或执行 GIT 合并。
  • git-cvsserver 将 GIT 分支映射到 CVS 模块。这与大多数 CVS 用户的期望有很大不同,因为 CVS 模块通常代表一个或多个目录。

您可以此处找到将 Git 与 CVS 结合使用的最佳实践,其中包含完整的 git-cvs 设置< /a>.
您可以尝试向此设置添加
post-receive hook 并查看是否有 git cvsexportcommit 可以从那里开始工作。

git-cvsserver has limitations:

  • Currently cvsserver works over SSH connections for read/write clients, and over pserver for anonymous CVS access.
  • CVS clients cannot tag, branch or perform GIT merges.
  • git-cvsserver maps GIT branches to CVS modules. This is very different from what most CVS users would expect since in CVS modules usually represent one or more directories.

You can find best practices for using Git with CVS here, with a full git-cvs setup.
You can try and add to this setup a post-receive hook and see if a git cvsexportcommit can work from there.

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