##// END OF EJS Templates
help: move revsets.## documentation into infix section
timeless -
r29988:96358865 default
parent child Browse files
Show More
@@ -55,6 +55,22 b' These are the supported infix operators:'
55 ``x~n``
55 ``x~n``
56 The nth first ancestor of x; ``x~0`` is x; ``x~3`` is ``x^^^``.
56 The nth first ancestor of x; ``x~0`` is x; ``x~3`` is ``x^^^``.
57
57
58 ``x ## y``
59 Concatenate strings and identifiers into one string.
60
61 All other prefix, infix and postfix operators have lower priority than
62 ``##``. For example, ``a1 ## a2~2`` is equivalent to ``(a1 ## a2)~2``.
63
64 For example::
65
66 [revsetalias]
67 issue(a1) = grep(r'\bissue[ :]?' ## a1 ## r'\b|\bbug\(' ## a1 ## r'\)')
68
69 ``issue(1234)`` is equivalent to
70 ``grep(r'\bissue[ :]?1234\b|\bbug\(1234\)')``
71 in this case. This matches against all of "issue 1234", "issue:1234",
72 "issue1234" and "bug(1234)".
73
58 There is a single postfix operator:
74 There is a single postfix operator:
59
75
60 ``x^``
76 ``x^``
@@ -86,18 +102,6 b' For example,'
86 defines three aliases, ``h``, ``d``, and ``rs``. ``rs(0:tip, author)`` is
102 defines three aliases, ``h``, ``d``, and ``rs``. ``rs(0:tip, author)`` is
87 exactly equivalent to ``reverse(sort(0:tip, author))``.
103 exactly equivalent to ``reverse(sort(0:tip, author))``.
88
104
89 An infix operator ``##`` can concatenate strings and identifiers into
90 one string. For example::
91
92 [revsetalias]
93 issue(a1) = grep(r'\bissue[ :]?' ## a1 ## r'\b|\bbug\(' ## a1 ## r'\)')
94
95 ``issue(1234)`` is equivalent to ``grep(r'\bissue[ :]?1234\b|\bbug\(1234\)')``
96 in this case. This matches against all of "issue 1234", "issue:1234",
97 "issue1234" and "bug(1234)".
98
99 All other prefix, infix and postfix operators have lower priority than
100 ``##``. For example, ``a1 ## a2~2`` is equivalent to ``(a1 ## a2)~2``.
101
105
102 Command line equivalents for :hg:`log`::
106 Command line equivalents for :hg:`log`::
103
107
General Comments 0
You need to be logged in to leave comments. Login now