diff mercurial/help/revsets.txt @ 14070:305c97670d7a

revset: add ^ and ~ operators from parentrevspec extension ^ (Nth parent) and ~ (Nth first ancestor) are infix operators that match certain ancestors of the set: set^0 the set set^1 (also available as set^) the first parent of every changeset in set set^2 the second parent of every changeset in set set~0 the set set~1 the first ancestor (i.e. the first parent) of every changeset in set set~2 the second ancestor (i.e. first parent of first parent) of every changeset in set set~N the Nth ancestor (following first parents only) of every changeset in set; set~N is equivalent to set^1^1..., with ^1 repeated N times.
author Kevin Gessner <kevin@kevingessner.com>
date Sat, 30 Apr 2011 17:43:04 +0200
parents 5f126c01ebfa
children 9f5a0acb0056
line wrap: on
line diff
--- a/mercurial/help/revsets.txt	Sat Apr 30 10:57:13 2011 -0500
+++ b/mercurial/help/revsets.txt	Sat Apr 30 17:43:04 2011 +0200
@@ -42,6 +42,20 @@
 
 ``x - y``
   Changesets in x but not in y.
+  
+``x^n``
+  The nth parent of x, n == 0, 1, or 2.
+  For n == 0, x; for n == 1, the first parent of each changeset in x;
+  for n == 2, the second parent of changeset in x.
+
+``x~n``
+  The nth first ancestor of x; ``x~0`` is x; ``x~3`` is ``x^^^``.
+
+There is a single postfix operator:
+
+``x^``
+  Equivalent to ``x^1``, the first parent of each changeset in x.
+
 
 The following predicates are supported: