TortoiseHg 4.4 是否适用于在 subrepos 中提交新项目?

TortoiseHg 4.4 does it work for commiting new items in subrepos?

使用:Windows,TortoiseHg 4.4

我刚刚开始将 Mercurial 视为版本控制的途径,而不是我们(并非如此)出色的 TFS 2010 系统。这个想法是允许使用我们当前的项目架构进行更灵活的分支,并使合并更容易。

我创建了一个类似于下面的子回购结构:

+Main
  ++SharedProjects
  ++Country1
  ++Country2

(+=repo, ++=subrepo)

这在 Main 中创建了 .hgsub,其中包含:

SharedProjects = SharedProjects
Country1 = Country1
Country2 = Country2

查看 hg Workbench 我可以在 Main 下看到正确的项目文件夹层次结构。

问题:

当我将文件添加到 Country1 文件夹并提交 Main 文件夹时,没有提交任何内容。但是,如果我提交 Country1(子)回购协议,它就可以正常提交。

显然,这会导致存在子库下的多个子库的问题,并且提交更改将非常危险。

不确定我是否正在尝试做一些我不应该做的事情,或者它是否不起作用并且有一个技巧?已搜索并发现了很多较旧的问题,但 none 这些修复程序有效:

我试过:

The Problem:

When i add a file to the Country1 folder and commit the Main folder, nothing is commited. But if I commit the Country1 (sub) repo it commits just fine.

Obviously this is going to cause problems where multiple subrepos under subrepos exist and it will get very risky commiting changes will be missed.

Not sure if I am trying to do something i shouldn't be or if it just doesn't work and there is a trick to it?

这是它的工作方式。

Country1.file 是存储库 Country1 的职责。

Main 存储库只是一组子存储库版本,其中 Main 中的提交是 link 到子存储库中的提交。

例如,您可以:

  • Main 1.0 只是 link 到 SharedProjects 1.1、Country1 1.2 和 Country2 1.5.
  • 然后,您可以进行另一个提交,其中 Main 2.0 是 SharedProjects 1.99,Country1 1.22 和 Country2 2.111。

现在,如果您的 文件不在子存储库 下,提交将在存储库 Main.

我不建议使用多级子存储库。 也许子存储库不是您项目的最佳方式。

您可以拥有 一个存储库 ,并将 Country1 存储在名为 Country1 分支 中,然后将 Country2 存储在 分支命名为Country2,依此类推。每个文件夹一个分支。然后你可以将它们全部合并到分支default(主分支)。