In mercurial, how do you list commiters sorted by number of commits (commit count).
Using git, you can do something like this :
git shortlog -ns
What is the equivalent command for mercurial ?
Show activity on this post. This gives me an exact count of commits in the current branch having its base on master. The command in Peter's answer, git rev-list --count HEAD ^develop includes many more commits, 678 vs 97 on my current project.
It's possible to use the Awesome Graphs app which is free and visualizes the number of commits added by each developer. This Bitbucket REST API query returns the list of commits in a repo so that it's possible to count their number. Hope it helps!
The git log command displays all of the commits in a repository's history.
There is no pure Mercurial solution, but you can do something like:
hg log --template "{author|person}\n" | sort | uniq -c | sort -nr
If you want to be able to type hg shortlog
, you can add the following to your .hgrc
or mercurial.ini
:
[alias] shortlog = !hg log --template "{author|person}\n" | sort | uniq -c | sort -nr
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With