David Wolever
David Wolever

Reputation: 154464

Show heads of one branch?

Is it possible to ask Mercurial to show only the heads of one branch? For example, I often want to double-check that default only has one head, but currently I need to do that "manually" (ie, checking the output of hg heads for more than one entry which is in default).

Upvotes: 22

Views: 9010

Answers (2)

Mark Lagendijk
Mark Lagendijk

Reputation: 6883

To get the heads of the current branch you can use:

hg heads .

And to get the number of heads of the current branch (in Bash):

hg heads -q . | wc -l

Upvotes: 6

Omnifarious
Omnifarious

Reputation: 56038

hg heads <branch name> works on Mercurial 1.5.3.

Upvotes: 34

Related Questions