我可以在Mercurial中嵌套subrepos吗?

Cra*_*ham 8 version-control mercurial dependencies build-dependencies mercurial-subrepos

我在使用subrepos在Mercurial中设置项目时遇到问题.

目标:

我想像这样设置结构:

-- Build_Repo (this repo will be used to track dependencies)
  -- Subrepo_A (this is the main source)
    -- Modules (Part of Subrepo_A)
      -- Subrepo_B 
Run Code Online (Sandbox Code Playgroud)

所以有三个存储库:Build,A和B.B嵌套在A中,A嵌套在根构建存储库中.构建仓库将用于跟踪依赖关系,subrepo A将用于跟踪主要源文件,subrepo B(和其他)将用于跟踪模块/插件开发.

问题/疑问

通过简单地将Subrepo_A路径和源添加到.hgsub文件并将其提交到构建仓库,我可以设置初始构建仓库和嵌套Subrepo_A.但是,当我将subrepo_B路径/源添加到构建存储库的.hgsub之后,然后尝试提交我收到错误消息:

abort:path'Subrepo_A/Modules/Sebrepo_B'在嵌套repo'Subrepo_A'中

Mercurial似乎不喜欢已嵌套的repo中的嵌套repo.这是真的吗,还是我错过了什么?关于如何管理构建/依赖关系的任何更好的想法?

Pau*_*han 0

在您的情况下,您必须将 subrepoB 添加到 subrepoA。

我建议尝试移动依赖项,以便您的树只有 2 个级别,但这可能是不可能的。否则,这总是不是一个非常顺利的体验。