How to get the total number of commits in a specific branch in hg?

Viewed 52

How to get the total number of commits in a specific branch in Mercurial(hg)?

2 Answers

Here's a Windows version. The template just generates a generic line containing the word node for each node found, and find counts lines containing that word:

C:\demo>hg log -b default -T node\n | find /c "node"
526

Working on a Mac or a Linux machine, I would say:

hg log -b a-specific-branch -T "{node}\n" | wc -l

On Windows I don't know …

Related