Mercurial > hg
comparison 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 |
comparison
equal
deleted
inserted
replaced
14069:e38846a79a23 | 14070:305c97670d7a |
---|---|
40 The union of changesets in x and y. There are two alternative short | 40 The union of changesets in x and y. There are two alternative short |
41 forms: ``x | y`` and ``x + y``. | 41 forms: ``x | y`` and ``x + y``. |
42 | 42 |
43 ``x - y`` | 43 ``x - y`` |
44 Changesets in x but not in y. | 44 Changesets in x but not in y. |
45 | |
46 ``x^n`` | |
47 The nth parent of x, n == 0, 1, or 2. | |
48 For n == 0, x; for n == 1, the first parent of each changeset in x; | |
49 for n == 2, the second parent of changeset in x. | |
50 | |
51 ``x~n`` | |
52 The nth first ancestor of x; ``x~0`` is x; ``x~3`` is ``x^^^``. | |
53 | |
54 There is a single postfix operator: | |
55 | |
56 ``x^`` | |
57 Equivalent to ``x^1``, the first parent of each changeset in x. | |
58 | |
45 | 59 |
46 The following predicates are supported: | 60 The following predicates are supported: |
47 | 61 |
48 .. predicatesmarker | 62 .. predicatesmarker |
49 | 63 |