仅标记子存储库
我有一个 Mercurial 主存储库和一个子存储库,如下所示:
Main
.hg
.hgsub
.hgsubstate
<some_regular_files_and_subdirs>
Sub
.hg
<some_regular_files_and_subdirs>
我希望仅标记 Sub
,同时保持 Main/.hgsubstate
最新(即指向标记过程产生的 Sub
变更集)。
我不想标记主存储库。
是否可以在不从 Sub
内部进行标记并执行一些魔法来使 Main/.hgsubstate
保持最新状态的情况下实现这一点?
I have a Mercurial main-repository with one sub-repository, like this:
Main
.hg
.hgsub
.hgsubstate
<some_regular_files_and_subdirs>
Sub
.hg
<some_regular_files_and_subdirs>
And I wish to tag Sub
, only, while keeping Main/.hgsubstate
up-to-date (i.e. point to the changeset of Sub
resulting from the tagging process).
I don't want to tag the main-repository.
Is that possible without tagging from within Sub
and do some magic to get Main/.hgsubstate
up to date?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
更新子存储库时,您始终需要在主存储库上执行提交才能开始使用该子存储库修订版。因此,您无法完全从子存储库本身执行您想要的操作,您必须进入主存储库并在那里执行单个命令。
从命令行:
创建子存储库标签并将子存储库更新为该标签后,从顶层(即:
Main
)执行提交应该更新.hgsubstate
并且不需要您标记Main
存储库。事实上,更改任何子存储库的修订版本都应该触发 .hgsubstate 文件中的更改,该文件可以在不带标签的情况下在主存储库中提交。When updating a subrepo, you always need to perform a commit on the main repo to begin using that subrepo revision. Therefore, you can't exactly do what you want from the subrepo itself, you will have to enter the main repo and execute a single command there.
from the command line:
After you have created the subrepo tag and updated the subrepo to that tag, performing a commit from the top level (ie:
Main
) should update.hgsubstate
and does not require you to tag theMain
repo. In fact, changing the revision of any subrepo should trigger a change in the .hgsubstate file, which can be committed in the main repo without a tag.像下面这样的东西?
Something like below?