##// END OF EJS Templates
revset: improve documentation about ordering handling...
Jun Wu -
r34014:dcfdf4d0 default
parent child Browse files
Show More
@@ -260,9 +260,10 b' def _matchnamedfunc(x, funcname):'
260
260
261 # Constants for ordering requirement, used in getset():
261 # Constants for ordering requirement, used in getset():
262 #
262 #
263 # If 'define', any nested functions and operations can change the ordering of
263 # If 'define', any nested functions and operations MAY change the ordering of
264 # the entries in the set. If 'follow', any nested functions and operations
264 # the entries in the set (but if changes the ordering, it MUST ALWAYS change
265 # should take the ordering specified by the first operand to the '&' operator.
265 # it). If 'follow', any nested functions and operations MUST take the ordering
266 # specified by the first operand to the '&' operator.
266 #
267 #
267 # For instance,
268 # For instance,
268 #
269 #
@@ -276,15 +277,28 b' def _matchnamedfunc(x, funcname):'
276 #
277 #
277 # 'any' means the order doesn't matter. For instance,
278 # 'any' means the order doesn't matter. For instance,
278 #
279 #
279 # X & !Y
280 # (X & Y) | ancestors(Z)
280 # ^
281 # ^ ^
281 # any
282 # any any
283 #
284 # For 'X & Y', 'X' decides order so the order of 'Y' does not matter. For
285 # 'ancestors(Z)', Z's order does not matter since 'ancestors' does not care
286 # about the order of its argument.
282 #
287 #
283 # 'y()' can either enforce its ordering requirement or take the ordering
288 # Currently, most revsets do not care about the order, so 'define' is
284 # specified by 'x()' because 'not()' doesn't care the order.
289 # equivalent to 'follow' for them, and the resulting order is based on the
285 anyorder = 'any' # don't care the order
290 # 'subset' parameter passed down to them:
286 defineorder = 'define' # should define the order
291 #
287 followorder = 'follow' # must follow the current order
292 # m = revset.match(..., order=defineorder)
293 # m(repo, subset)
294 # ^^^^^^
295 # For most revsets, 'define' means using the order this subset provides
296 #
297 # There are a few revsets that always redefine the order if 'define' is
298 # specified: 'sort(X)', 'reverse(X)', 'x:y'.
299 anyorder = 'any' # don't care the order, could be even random-shuffled
300 defineorder = 'define' # ALWAYS redefine, or ALWAYS follow the current order
301 followorder = 'follow' # MUST follow the current order
288
302
289 def _matchonly(revs, bases):
303 def _matchonly(revs, bases):
290 """
304 """
General Comments 0
You need to be logged in to leave comments. Login now