如果我有两个名为 2.0 和 2.1 的标签,我如何找到两者之间的变更集消息?我试图找到一种方法来使用 HG 制作发行说明并列出与提交相关的不同消息。
示例变更集:changeset: 263:5a4b3c2d1e
user: User Name <user.name@gmail.com>
date: Tue Nov 27 14:22:54 2018 -0500
summary: Added tag 2.0.1 for changeset 9876fghij
期望输出:Added tag 2.1 for changeset 67890pqrst
Change Info...
Added tag 2.0.1 for changeset 9876fghij
Change Info...
Added tag 2.0 for changeset klmno12345
最佳答案
前言
“任何挑战都有一个简单易懂的错误决定”。鲍里斯的回答是对这条规则最好的说明:“::”拓扑范围只有在纯单分支开发的情况下才会产生良好的结果(通常,坏主意(tm))反正)
人脸
好的解决方案必须正确处理复杂的 DAG 并回答问题“新的变更集包含在新中,旧中缺少(无论发生的性质如何)”
对我来说,它是带有两个参数的 revsets 中的“only()”函数
"only(set, [set])"
Changesets that are ancestors of the first set that are not ancestors of any other head in the repo. If a second set is specified, the result is ancestors of the first set that are not ancestors of the second set (i.e. ::set1 - ::set2).
hg log -r "only(2.1,2.0)"
也许是通过预定义的样式“更改日志”提供更好的演示
hg log -r "only(2.1,2.0)" -s changelog
或自定义样式|模板
关于version-control - 你如何在 mercurial 中找到两个标签之间的变更集?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53755061/