Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/mercurial/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/scala/19.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Mercurial-列出一个用户';人头_Mercurial - Fatal编程技术网

Mercurial-列出一个用户';人头

Mercurial-列出一个用户';人头,mercurial,Mercurial,有没有办法列出由特定用户创建的标题 使用hg heads命令,我无法对用户进行筛选 虽然使用hglog我可以对用户进行筛选,但我无法确定如何只列出分支上的最后一个变更集 更新: 感谢Tim Henigan下面的回答。我得出了以下结论 log -r "head() and not closed() and user('<username>')" log-r“head()和not closed()和user(“”)” 在我的特殊情况下,我只希望最新的磁头按相反的顺序排列,所以我为这个

有没有办法列出由特定用户创建的标题

使用
hg heads
命令,我无法对用户进行筛选

虽然使用
hglog
我可以对用户进行筛选,但我无法确定如何只列出分支上的最后一个变更集

更新

感谢Tim Henigan下面的回答。我得出了以下结论

log -r "head() and not closed() and user('<username>')"
log-r“head()和not closed()和user(“”)”
在我的特殊情况下,我只希望最新的磁头按相反的顺序排列,所以我为这个功能做了一个别名

[alias]
myhist = log -r "reverse(head() and not closed() and user('<username>'))" --template "{rev}: {branches}\n" -l 10
[别名]
myhist=log-r“reverse(head()和not closed()和user(“”))--template“{rev}:{branchs}\n”-l10

因此,调用
hg myhist
最多可以得到十个最近的变更集,它们都是分支上的最后一个变更集。我使用
--template
选项仅查看修订号和分支机构名称,以便快速了解我最近的活动。

如果您使用的是较新版本的Mercurial,您可以使用以下方法生成此查询:


hg log-r“heads(all())and not closed()and user(“”)”

上面的建议让我很接近,但效果不太好。这个更好用

hg log -u smoosvi -r "head() and not closed()"

谢谢,那太棒了,但不是我想要的。我认为对我的问题来说,更好的措辞应该是:“给我在所有分支上创建的最后一个变更集”。你的回答让我找到了解决办法。我会用这个更新我的问题。