我试过
hg log --rev "branch([changeset])"
但我得到的是这个分支中所有变更集的集合。
我想要得到的是目标分支的名称(例如默认)而不是整个集合。
有没有办法实现这一目标?
那是
...不是 revset 的用途。 你想做一些完全不同的事情:
hg log --rev [changeset] --template "{branch}n"
请参阅hg help templates
。