use hooks in git to import and export to cvs

混江龙づ霸主 提交于 2019-12-22 08:23:09

问题


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?


回答1:


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.



来源:https://stackoverflow.com/questions/2817897/use-hooks-in-git-to-import-and-export-to-cvs

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!