comparison mercurial/help/revsets.txt @ 12821:165079e564f0 stable

revsets: generate predicate help dynamically
author Patrick Mezard <pmezard@gmail.com>
date Sat, 23 Oct 2010 19:21:51 +0200
parents 74f6531581e8
children 5f126c01ebfa
comparison
equal deleted inserted replaced
12820:0edc0aa7432d 12821:165079e564f0
43 ``x - y`` 43 ``x - y``
44 Changesets in x but not in y. 44 Changesets in x but not in y.
45 45
46 The following predicates are supported: 46 The following predicates are supported:
47 47
48 ``adds(pattern)`` 48 .. predicatesmarker
49 Changesets that add a file matching pattern.
50
51 ``all()``
52 All changesets, the same as ``0:tip``.
53
54 ``ancestor(single, single)``
55 Greatest common ancestor of the two changesets.
56
57 ``ancestors(set)``
58 Changesets that are ancestors of a changeset in set.
59
60 ``author(string)``
61 Alias for ``user(string)``.
62
63 ``branch(set)``
64 All changesets belonging to the branches of changesets in set.
65
66 ``children(set)``
67 Child changesets of changesets in set.
68
69 ``closed()``
70 Changeset is closed.
71
72 ``contains(pattern)``
73 Revision contains pattern.
74
75 ``date(interval)``
76 Changesets within the interval, see :hg:`help dates`.
77
78 ``descendants(set)``
79 Changesets which are descendants of changesets in set.
80
81 ``file(pattern)``
82 Changesets affecting files matched by pattern.
83
84 ``follow()``
85 An alias for ``::.`` (ancestors of the working copy's first parent).
86
87 ``grep(regex)``
88 Like ``keyword(string)`` but accepts a regex. Use ``grep(r'...')``
89 to ensure special escape characters are handled correctly.
90
91 ``head()``
92 Changeset is a named branch head.
93
94 ``heads(set)``
95 Members of set with no children in set.
96
97 ``id(string)``
98 Revision non-ambiguously specified by the given hex string prefix
99
100 ``keyword(string)``
101 Search commit message, user name, and names of changed files for
102 string.
103
104 ``limit(set, n)``
105 First n members of set.
106
107 ``max(set)``
108 Changeset with highest revision number in set.
109
110 ``min(set)``
111 Changeset with lowest revision number in set.
112
113 ``merge()``
114 Changeset is a merge changeset.
115
116 ``modifies(pattern)``
117 Changesets modifying files matched by pattern.
118
119 ``outgoing([path])``
120 Changesets not found in the specified destination repository, or the
121 default push location.
122
123 ``p1(set)``
124 First parent of changesets in set.
125
126 ``p2(set)``
127 Second parent of changesets in set.
128
129 ``parents(set)``
130 The set of all parents for all changesets in set.
131
132 ``present(set)``
133 An empty set, if any revision in set isn't found; otherwise,
134 all revisions in set.
135
136 ``removes(pattern)``
137 Changesets which remove files matching pattern.
138
139 ``rev(number)``
140 Revision with the given numeric identifier.
141
142 ``reverse(set)``
143 Reverse order of set.
144
145 ``roots(set)``
146 Changesets with no parent changeset in set.
147
148 ``sort(set[, [-]key...])``
149 Sort set by keys. The default sort order is ascending, specify a key
150 as ``-key`` to sort in descending order.
151
152 The keys can be:
153
154 - ``rev`` for the revision number,
155 - ``branch`` for the branch name,
156 - ``desc`` for the commit message (description),
157 - ``user`` for user name (``author`` can be used as an alias),
158 - ``date`` for the commit date
159
160 ``tag(name)``
161 The specified tag by name, or all tagged revisions if no name is given.
162
163 ``user(string)``
164 User name is string.
165 49
166 Command line equivalents for :hg:`log`:: 50 Command line equivalents for :hg:`log`::
167 51
168 -f -> ::. 52 -f -> ::.
169 -d x -> date(x) 53 -d x -> date(x)