多个 Mercurial 存储库或带有克隆的单个存储库
我们正在开发一个由 4 个团队(网站、服务器、小程序、部署)组成的大型项目。有时,每个团队的成员必须对另一个团队的代码进行微小的更改(例如:小程序团队的成员必须在网站中添加一个字段,或者服务器团队的成员必须更改部署脚本)。
目前,每个团队都有自己的 Mercurial 存储库,我们使用版本号来组织团队之间的依赖关系。 (小程序版本3.4需要网站版本1.7)
我认为我们的mercurial组织不是最优的,我的想法是拥有一个大的mercurial存储库MASTER,它将被克隆在网站、服务器、APPLET和部署中。每个团队的每个成员都可以访问其他团队的代码,并且不会因为克隆不同而受到其他团队提交的影响。
SO 社区对此有何看法?
We are working on a big project organized in 4 teams (website, server, applet, deployment). Sometimes members of each teams have to make minor changes in the code of the other team (for instance: a member from the applet team has to add a field in the website, or a member of the server team has to change a deployment script).
For the moment every team has its own mercurial repository, and we are using version number to organize dependencies between teams. (The applet version 3.4 needs the website version 1.7)
I think that our mercurial organisation is not optimal, my idea is to have one big mercurial repository MASTER, which will be cloned in WEBSITE, SERVER, APPLET and DEPLOYMENT. Each member of each team can have access to the code of others and they are not impacted by the commit of other teams because of the different clones.
What the SO community think about that ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您应该为单独的组件维护单独的存储库,并为组件之间共享的任何部分维护其他单独的存储库(如果愿意,可以是库)。然后使用 子存储库 功能让组件存储库包含共享内容。
将所有内容合并到一个大型存储库中在 svn 中效果很好,但在 Mercurial 或任何 DVCS 中,最好将较小的存储库组合在一起。
You should maintain separate repositories for separate components, and other separate repos for any pieces shared between components (libraries if you will). Then use the subrepository feature to have the component repos include the shared stuff.
Merging everything into one large repo works well in svn, but in Mercurial, or any DVCS, you're better off with a composition of smaller repos.