当在日食中做一个hg bisect时,我喜欢我能看到我过去标记的所有坏东西和货物。
有没有办法在命令行获取该信息?
答案 0 :(得分:10)
有一个revset谓词:
"bisected(string)"
Changesets marked in the specified bisect state (good, bad, skip).
为了将来参考,Mercurial 2.0将引入一个改进版本(旧版本将继续工作):
"bisect(string)"
Changesets marked in the specified bisect status:
- "good", "bad", "skip": csets explicitly marked as good/bad/skip
- "goods", "bads" : csets topologicaly good/bad
- "range" : csets taking part in the bisection
- "pruned" : csets that are goods, bads or skipped
- "untested" : csets whose fate is yet unknown
- "ignored" : csets ignored due to DAG topology
答案 1 :(得分:6)
如@adambox的评论所示,这应该有效:
var query = from d in xdoc.Descendants("PlayerSetup").Descendants()
where d.Attribute("name")?.Value == "four"
select d;
//query.Count == 2
答案 2 :(得分:1)
在Mercurial 3.8.2(可能更早)中你可以使用:
hg log --template bisect
答案 3 :(得分:0)
这是一个bash脚本(我称之为bisectstate
),现在可以使用bisected()
谓词。
(我使用colorex
对颜色进行了调整,但如果没有安装颜色,可以将其取出。)
#!/bin/bash -f
style() {
echo "{rev}$1 {author|person} {date|shortdate} {desc|firstline}\n"
}
(hg log -r 'not . and bisect(good)' --template "`style -good:`" ;
hg log -r '. and bisect(range) and not (bisect(good) or bisect(bad) or bisect(skip))' --template "`style -cur:`" ;
hg log -r "not . and bisect(bad)" --template "`style -bad:`" ;
hg log -r 'not . and bisect(skip)' --template "`style -skip:`" ;
hg log -r '. and bisect(good)' --template "`style -cur=good:`" ;
hg log -r '. and bisect(bad)' --template "`style -cur=bad:`" ;
hg log -r '. and bisect(skip)' --template "`style -cur=skip:`" ;
# Include the intermediate, unmarked changes in the bisect range.
hg log -r "bisect(range) and not (. or bisect(good) or bisect(bad) or bisect(skip))" --template "`style`"
) \
| sort | colorex -r bad: -b good: -g 'cur[=:]'
输出如下: