Commits

Markus Zapke-Gründemann  committed 50b2249

Added README.rst.

  • Participants
  • Parent commits 06e402f

Comments (0)

Files changed (1)

+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]