如何定义回转窑/mercurial子存储库使用的变更集?

如何定义回转窑/mercurial子存储库使用的变更集?,mercurial,kiln,Mercurial,Kiln,在Kill stack exchange站点上的回复中,有一条评论提到“如果您从库的一个使用者提交,其他库使用者不会立即看到这些更改集。您必须在其他使用者中显式提取库repo上的更改。” 我已经向projects.hgsub和.hgsubstate文件中引用的存储库中添加了一些文件,但它们没有显示在projects子存储库中(因为项目正确地使用了先前分配的更改集) 我想知道如何编辑subrepo使用的变更集。我只是编辑.hgsubstate文件(似乎有点“黑客化”),还是有一个命令/网站选项可以

在Kill stack exchange站点上的回复中,有一条评论提到“如果您从库的一个使用者提交,其他库使用者不会立即看到这些更改集。您必须在其他使用者中显式提取库repo上的更改。”

我已经向projects.hgsub和.hgsubstate文件中引用的存储库中添加了一些文件,但它们没有显示在projects子存储库中(因为项目正确地使用了先前分配的更改集)


我想知道如何编辑subrepo使用的变更集。我只是编辑.hgsubstate文件(似乎有点“黑客化”),还是有一个命令/网站选项可以使用

在子存储库中,
hg更新您希望主存储库使用的变更集。然后,在主存储库中,发出
hgci
以提交子存储库更改。Mercurial将使用子存储库的当前父变更集ID自动更新
.hgsubstate
文件

示例(Windows.bat文件):
注意:我在项目和实际的子存储库文件夹中尝试了“hgpull”,但没有成功。新文件也显示在服务器上,在最新的变更集中,我只是不清楚如何告诉给定项目的子存储库使用最新(或任何特定)的变更集-除了编辑.hgsubstate文件,这似乎不是正确的做法。那么,您是说将cd放入项目下的子存储库中,然后在那里进行hg更新,然后是“cd..”,并在项目文件夹中发出“hg ci”?已解决。谢谢你的额外努力。我在osx上,然而,win批处理文件仍然很有用,因为它显示了我以前的错误。我没有做的是“hg pull-u”(我只是做了“hg pull”)。这是我第二天玩hg,所以这是一个学习曲线。谢谢你的帮助。将投票…很乐意帮忙。要记住的主要思想是在主repo中提交记录任何子存储库的当前父级,以便控制何时移动到较新的子repo内容。
REM Create main repository
hg init Example
cd Example
echo >file1
hg ci -Am file1
cd ..

REM Create another repository
hg init Library
cd Library
echo >file2
hg ci -Am file2
cd ..

REM Clone the Library into the main repository
cd Example
hg clone ..\Library

REM and configure it as a subrepository.
echo Library=Library >.hgsub

REM Commit it.
hg ci -Am "Added Library sub repository."

REM Note .hgsubstate is updated with the current subrepo changeset.
type .hgsubstate
cd ..

REM Someone updates the original Library.
cd Library
echo >file3
hg ci -Am file3
cd ..

REM Main repo isn't affected.  It has a clone of Library.
cd Example
hg status -S

REM Update to the latest library
cd Library
hg pull -u
cd ..

REM View the changes to the library in the main repo.
hg status -S

REM Commit the library update in the main repo.
hg ci -m "Updated library."

REM Note .hgsubstate is updated.
type .hgsubstate