我已经阅读了有关 Mercurial 子存储库的所有问题,但我仍然不确定它是如何工作的。我们在 IIS 上使用 hgweb.cgi,所以我们所有的存储库都有 http:// 路径。
这是基本布局:
/Libraries - http://server/Libraries
/Project1 - http://server/Project1
/Project1/LibrariesSubrepo - http://server/Project1/LibrariesSubrepo (clone of libraries)
/Project2 - http://server/Project1
/Project2/LibrariesSubrepo - http://server/Project2/LibrariesSubrepo (clone of libraries)
在 .hgsub 文件中,我将路径设置为:
LibrariesSubrepo = LibrariesSubrepo
如果我想处理这些项目,我会将它们从服务器克隆到我的工作站,这样我就有了 Project1 和 Project2 的克隆,它也会自动提取子存储库。
在本地工作站的 project1 中,我对 /Project1/LibrariesSubrepo 中的文件进行了一些更改。如何确保这些更改返回到服务器上库的源代码库?我是否必须手动将更改从子存储库推送到子存储库的源存储库?
我希望能够在本地对 Project1 存储库进行更改,然后提交/推送这些更改,然后在 Project2 中,我应该能够从应该将 Project2/LibrariesSubrepo 更新到最新版本的服务器中提取更改。