Source

hg-printparents /

Filename Size Date modified Message
42 B
764 B
1.7 KB
988 B

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 http://mercurial.selenic.com/wiki/WritingExtensions

Installation

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

$ hg clone https://bitbucket.org/keimlink/hg-printparents
[extensions]
printparents = /path/to/hg-printparents/printparents.py

Usage

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
[255]