Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to list commiters sorted by number of commits (commit count)?

Tags:

mercurial

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 ?

like image 451
Jérôme Radix Avatar asked May 25 '11 15:05

Jérôme Radix


People also ask

How can I see how many commits I have in git?

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.

How do I see total commits in bitbucket?

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!

What is the command to view all the commits made by a specific person in git?

The git log command displays all of the commits in a repository's history.


1 Answers

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 
like image 185
Tim Henigan Avatar answered Sep 28 '22 00:09

Tim Henigan