如何列出按提交次数提交计数排序的提交者?

问题描述

| 在Mercurial中,您如何列出按提交次数(提交计数)排序的提交者。 使用git,您可以执行以下操作:
git shortlog -ns
Mercurial的等效命令是什么?     

解决方法

没有纯粹的Mercurial解决方案,但是您可以执行以下操作:
hg log --template \"{author|person}\\n\" | sort | uniq -c | sort -nr
如果要键入
hg shortlog
,可以将以下内容添加到
.hgrc
mercurial.ini
中:
[alias]
shortlog = !hg log --template \"{author|person}\\n\" | sort | uniq -c | sort -nr
    ,流失扩展可以根据信息绘制出不错的直方图。加
[extensions]
churn =
到您的Mercurial配置文件并运行
$ hg churn -c
得到这样的直方图:
mpm@selenic.com                           3234 *************************    
thomas@intevation.de                       974 ********
pmezard@gmail.com                          939 *******
该历史图来自Mercurial存储库本身。     ,我已经为Roundup编写了一个脚本,以基于Mercurial历史按年份构建项目贡献者列表。它是跨平台的公共领域,应该易于根据自己的目的进行自定义。     

相关问答

错误1:Request method ‘DELETE‘ not supported 错误还原:...
错误1:启动docker镜像时报错:Error response from daemon:...
错误1:private field ‘xxx‘ is never assigned 按Alt...
报错如下,通过源不能下载,最后警告pip需升级版本 Requirem...