printparents extension

printparents is a Mercurial extension and prints the parents of a given revision. It's primarily purpose is to show how a simple extension can look like.

The code is used at


Clone the repository and add printparents to your .hgrc or mercurial.ini:

$ hg clone
printparents = /path/to/hg-printparents/


Show the parents of a revision:

$ hg print-parents tip
default 33960aadc16f c3adabd1a5f4

Fails if the revision has only one parent:

$ hg print-parents 2
abort: revision 2 has only one parent