简体   繁体   English

如何使用git作为CVS的代理

[英]How to use git as a proxy to CVS

We are using CVS as source repository. 我们正在使用CVS作为源存储库。 The server is far away from local working place and very slow. 服务器距离本地工作地点很远,而且速度很慢。 The repository size is also large (2GB approx.) and it takes us almost 12 hours to do a fresh checkout. 存储库的大小也很大(大约2GB),我们花了将近12个小时来进行全新的结帐。

We'd like to setup a GIT server as a proxy to CVS so that we can working with GIT server in day time and let it sync with CVS server during night. 我们希望将GIT服务器设置为CVS的代理,以便我们可以在白天使用GIT服务器,并使其在夜间与CVS服务器同步。 Is there any good practice for this? 有什么好的做法吗?

Basic requrements are: 基本要求是:

  1. Branch support 分行支持
  2. Syncing between GIT and CVS should be bi-direction, and commits to GIT by different users should be synced to CVS one-to-one with corresponding user GIT和CVS之间的同步应该是双向的,并且不同用户对GIT的提交应该与对应的用户一对一地同步到CVS。

Thanks. 谢谢。 BTW, I've read this thread How to export revision history from mercurial or git to cvs? 顺便说一句,我已经读过这个线程如何将修订历史记录从水银或git导出到cvs? but it does not help much. 但这并没有太大帮助。

You can set up a git repo that exists on the end that the CVS repo is. 您可以设置CVS存储库末尾存在的git存储库。 You don't need to import all the history. 您无需导入所有历史记录。 It's not going to be worth the pain. 痛苦是不值得的。 You should be able to push and pull to and from the remote git repo. 您应该能够从远程git repo推入和拉出。 Then just commit from the remote git repo into the cvs one. 然后只需从远程git repo提交到cvs之一即可。 This should avoid a lot of the transmission delays as git does a wonderful job on just shipping new files and having that compressed. 这应该避免很多传输延迟,因为git在仅传输新文件并将其压缩后做得很好。

Eventually everyone will see the remote git repo as the one giving true value and you'll be able to drop the cvs ball-and-chain. 最终,每个人​​都将远程git repo视为具有真正价值的仓库,您将可以丢掉cvs ball-and-chain。

Hope this helps. 希望这可以帮助。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM