Mercurial - .hgtags 应该合并吗?
如果您要将存储库 B 中的更改合并到存储库 A 中,是否应该合并 .hgtags 中的更改?
存储库 B 可能具有 A 中没有的标签 1.01、1.02、1.03。为什么要将这些合并到存储库 A 的 .hgtags 文件中?如果我们合并然后尝试通过查看标签 1.01 来查看存储库 A,我认为这是行不通的。
If you are merging changes from repository B into repository A should you merge changes in .hgtags?
Repository B could have had tags 1.01, 1.02, 1.03 which are not in A. Why would you ever merge those into repository A's .hgtags file? If we merged and then tried to view repository A by looking at tag 1.01, I would think this wouldn't work.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
简短回答:这确实可以正常工作,您应该合并
.hgtags
为什么您实际上应该合并
.hgtags
以及为什么它有意义?因此,您有
上面列出的是变更集编号 (长唯一的十六进制 id) 标签
因此,您将存储库 B 合并到存储库 A 中并得到如下所示的内容。
如果您将存储库更新为标签 1.01,您将获得与存储库 B 中的代码在该时间点完全相同的外观,正如 Mercurial 所承诺的那样。
您应该合并它们,因为存储库 B 中标记的变更集现在是存储库 A 中变更集树的一部分,因此您在存储库 B 中标记的变更集现在标记在存储库 A 中。不合并它们只会导致您丢失您为变更集创建的标签。
Short Answer: This does work properly and you should merge
.hgtags
Why should you actually merge
.hgtags
and why does it make sense?So you have
The above is listed as the Changeset Number (long unique hex id) tag
So you merge repo B into Repo A and get something that looks like.
If you update the repo to tag 1.01 you will get exactly what the code looked like at that point in time When it was in Repo B just as mercurial promises.
You should merge them as the changesets from Repo B that were tagged are now part of the changeset tree in Repo A, so therefore the changesets you tagged in Repo B are now tagged in Repo A. Not merging them would just cause you to lose the tags that you created for the changesets.
一件有趣的事情需要了解(来自 mercurial wiki)
因此,当您合并(合并两个头)时,您需要合并
.hgtags
,否则某些标签将会消失。An interesting thing to know (from the mercurial wiki)
So when you merge (combine two heads), you need to merge the
.hgtags
or some tags will disappear.