汞-查找可“覆盖"标签的标签.特定文件版本 [英] Hg - Find tags that "cover" specific file version
问题描述
我们使用hg控制大型项目的源代码.每当发布时,我们都会在hg中标记版本.
We use hg to control the sources for a large project. Whenever we do a release, we tag the version in hg.
现在说我进行了特定的修订(例如,我修复了一个错误).我想知道哪些版本包含此修复程序,即哪些标签覆盖"了该修订版.
Now say I take a specific revision (where I've fixed a bug for example). I want to know which releases contain this fix, i.e. which tags "cover" this revision.
我怎么找到这个?在hg中,标记似乎仅指标记的变更集.我记得在ClearCase中,标记版本的每个祖先也会被标记,是否有办法在hg中查看此信息?
How do I find this? In hg tags seem to refer only to the tagged changeset. I remember that in ClearCase every ancestor of the tagged revision would be marked too, is there a way to see this information in hg?
谢谢!
推荐答案
没有任何其他扩展名的Revset可以为您提供一些帮助.喜欢
Revsets without any additional extensions can give you something. like
hg log -r "id(hash):tip and tag()"
或更短更好的版本(也许)hg log -r "descendants(hash) and tag()"
hg log -r "id(hash):tip and tag()"
or shorter and nicer (maybe) version hg log -r "descendants(hash) and tag()"
只是我的回购中缩短修订集的一个示例,而该版本在有问题的修订后就合并了
Just and example of shortened revset from my repo with merges after revision in question
>hg glog -r "descendants(c9e3b41ec78f)"
@ changeset: 65:f202d72d6397
| tag: tip
| parent: 63:c778bae76563
| user: Alex Bream
| date: Wed Nov 09 21:42:50 2011 +0600
| summary: 2-9 яюыэюёЄ№■ фю 2769
|
| o changeset: 64:625d08492555
| | branch: Cleanup
| | parent: 62:eed6619dadb8
| | user: Alex Bream
| | date: Wed Nov 09 21:38:44 2011 +0600
| | summary: ╟рўшёЄър яю 1-1 155
| |
o | changeset: 63:c778bae76563
|\| parent: 61:e7ae9e5f725a
| | parent: 62:eed6619dadb8
| | user: Alex Bream
| | date: Wed Nov 09 21:33:22 2011 +0600
| | summary: Merge with Cleanup
| |
| o changeset: 62:eed6619dadb8
| | branch: Cleanup
| | parent: 59:c9e3b41ec78f
| | user: Alex Bream
| | date: Thu Mar 03 19:19:34 2011 +0500
| | summary: ╟рўшёЄър яю 1-1 131
| |
o | changeset: 61:e7ae9e5f725a
| | user: Alex Bream
| | date: Thu Mar 03 05:40:34 2011 +0500
| | summary: 2-9 яю 2745
| |
o | changeset: 60:1393fe759096
|\| parent: 57:a38258cac9b8
| | parent: 59:c9e3b41ec78f
| | user: Alexander
| | date: Thu Mar 03 04:59:22 2011 +0500
| | summary: Merge ё ўшёЄшыъющ
| |
| o changeset: 59:c9e3b41ec78f
| | branch: Cleanup
| | user: Alexander
| | date: Thu Mar 03 04:54:11 2011 +0500
| | summary: ╟рўшёЄър яЁюыюу яюыэюёЄ№■
| |
比较两种形式的revset的输出(无论如何都是相同的输出)
And comparing output of two forms of revsets (same output anyway)
后裔()
>hg log -r "descendants(c9e3b41ec78f)" --template "{rev}:{node|short}\n"
59:c9e3b41ec78f
60:1393fe759096
61:e7ae9e5f725a
62:eed6619dadb8
63:c778bae76563
64:625d08492555
65:f202d72d6397
直接范围定义
>hg log -r "id(c9e3b41ec78f):tip" --template "{rev}:{node|short}\n"
59:c9e3b41ec78f
60:1393fe759096
61:e7ae9e5f725a
62:eed6619dadb8
63:c778bae76563
64:625d08492555
65:f202d72d6397
这篇关于汞-查找可“覆盖"标签的标签.特定文件版本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!