在git中使用钩子导入和导出到cvs [英] use hooks in git to import and export to cvs

查看:84
本文介绍了在git中使用钩子导入和导出到cvs的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道是否可行:




  • 创建一个连接到cvs的共享git存储库

  • 向它发布两个钩子:


    1. 每当有人从它中拉出时,它都会从cvs存储库中导入

    2. 每次有人推送它时,它都会导出到cvs存储库中




创建一个对git用户完全透明的cvs存储库的懒惰镜像



如果不可能的话,创建cvs镜像的最佳方法是什么? / p>

ps。 git-cvsserver是否可用?除了提交,签出和更新之外,它还可以合并两个分支吗?

解决方案

git-cvsserver 有局限性:



  • 当前,cvsserver通过SSH连接(用于读/写客户端)和pserver(用于匿名CVS访问)工作。 / li>
  • CVS客户端无法标记,分支或执行GIT合并。

  • git-cvsserver 映射GIT分支到CVS模块。这与大多数CVS用户所期望的完全不同,因为在CVS模块中通常代表一个或多个目录。


您可以在此处找到在CVS中使用Git的最佳做法 ,并带有完整git- cvs设置

您可以尝试将发布到此设置-接收钩子,然后查看 git cvsexportcommit 是否可以从那里开始。


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?

解决方案

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.

这篇关于在git中使用钩子导入和导出到cvs的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆