Show More
@@ -360,7 +360,7 b' def stringset(repo, subset, x):' | |||||
360 | return baseset([x]) |
|
360 | return baseset([x]) | |
361 | return baseset() |
|
361 | return baseset() | |
362 |
|
362 | |||
363 | def rangeset(repo, subset, x, y): |
|
363 | def rangeset(repo, subset, x, y, order): | |
364 | m = getset(repo, fullreposet(repo), x) |
|
364 | m = getset(repo, fullreposet(repo), x) | |
365 | n = getset(repo, fullreposet(repo), y) |
|
365 | n = getset(repo, fullreposet(repo), y) | |
366 |
|
366 | |||
@@ -385,16 +385,16 b' def rangeset(repo, subset, x, y):' | |||||
385 | # would be more efficient. |
|
385 | # would be more efficient. | |
386 | return r & subset |
|
386 | return r & subset | |
387 |
|
387 | |||
388 | def dagrange(repo, subset, x, y): |
|
388 | def dagrange(repo, subset, x, y, order): | |
389 | r = fullreposet(repo) |
|
389 | r = fullreposet(repo) | |
390 | xs = reachableroots(repo, getset(repo, r, x), getset(repo, r, y), |
|
390 | xs = reachableroots(repo, getset(repo, r, x), getset(repo, r, y), | |
391 | includepath=True) |
|
391 | includepath=True) | |
392 | return subset & xs |
|
392 | return subset & xs | |
393 |
|
393 | |||
394 | def andset(repo, subset, x, y): |
|
394 | def andset(repo, subset, x, y, order): | |
395 | return getset(repo, getset(repo, subset, x), y) |
|
395 | return getset(repo, getset(repo, subset, x), y) | |
396 |
|
396 | |||
397 | def differenceset(repo, subset, x, y): |
|
397 | def differenceset(repo, subset, x, y, order): | |
398 | return getset(repo, subset, x) - getset(repo, subset, y) |
|
398 | return getset(repo, subset, x) - getset(repo, subset, y) | |
399 |
|
399 | |||
400 | def _orsetlist(repo, subset, xs): |
|
400 | def _orsetlist(repo, subset, xs): | |
@@ -406,10 +406,10 b' def _orsetlist(repo, subset, xs):' | |||||
406 | b = _orsetlist(repo, subset, xs[p:]) |
|
406 | b = _orsetlist(repo, subset, xs[p:]) | |
407 | return a + b |
|
407 | return a + b | |
408 |
|
408 | |||
409 | def orset(repo, subset, x): |
|
409 | def orset(repo, subset, x, order): | |
410 | return _orsetlist(repo, subset, getlist(x)) |
|
410 | return _orsetlist(repo, subset, getlist(x)) | |
411 |
|
411 | |||
412 | def notset(repo, subset, x): |
|
412 | def notset(repo, subset, x, order): | |
413 | return subset - getset(repo, subset, x) |
|
413 | return subset - getset(repo, subset, x) | |
414 |
|
414 | |||
415 | def listset(repo, subset, *xs): |
|
415 | def listset(repo, subset, *xs): | |
@@ -419,7 +419,7 b' def listset(repo, subset, *xs):' | |||||
419 | def keyvaluepair(repo, subset, k, v): |
|
419 | def keyvaluepair(repo, subset, k, v): | |
420 | raise error.ParseError(_("can't use a key-value pair in this context")) |
|
420 | raise error.ParseError(_("can't use a key-value pair in this context")) | |
421 |
|
421 | |||
422 | def func(repo, subset, a, b): |
|
422 | def func(repo, subset, a, b, order): | |
423 | f = getsymbol(a) |
|
423 | f = getsymbol(a) | |
424 | if f in symbols: |
|
424 | if f in symbols: | |
425 | return symbols[f](repo, subset, b) |
|
425 | return symbols[f](repo, subset, b) | |
@@ -516,7 +516,7 b' def _firstancestors(repo, subset, x):' | |||||
516 | # Like ``ancestors(set)`` but follows only the first parents. |
|
516 | # Like ``ancestors(set)`` but follows only the first parents. | |
517 | return _ancestors(repo, subset, x, followfirst=True) |
|
517 | return _ancestors(repo, subset, x, followfirst=True) | |
518 |
|
518 | |||
519 | def ancestorspec(repo, subset, x, n): |
|
519 | def ancestorspec(repo, subset, x, n, order): | |
520 | """``set~n`` |
|
520 | """``set~n`` | |
521 | Changesets that are the Nth ancestor (first parents only) of a changeset |
|
521 | Changesets that are the Nth ancestor (first parents only) of a changeset | |
522 | in set. |
|
522 | in set. | |
@@ -1528,7 +1528,7 b' def p2(repo, subset, x):' | |||||
1528 | # some optimisations from the fact this is a baseset. |
|
1528 | # some optimisations from the fact this is a baseset. | |
1529 | return subset & ps |
|
1529 | return subset & ps | |
1530 |
|
1530 | |||
1531 | def parentpost(repo, subset, x): |
|
1531 | def parentpost(repo, subset, x, order): | |
1532 | return p1(repo, subset, x) |
|
1532 | return p1(repo, subset, x) | |
1533 |
|
1533 | |||
1534 | @predicate('parents([set])', safe=True) |
|
1534 | @predicate('parents([set])', safe=True) | |
@@ -1581,7 +1581,7 b' def secret(repo, subset, x):' | |||||
1581 | target = phases.secret |
|
1581 | target = phases.secret | |
1582 | return _phase(repo, subset, target) |
|
1582 | return _phase(repo, subset, target) | |
1583 |
|
1583 | |||
1584 | def parentspec(repo, subset, x, n): |
|
1584 | def parentspec(repo, subset, x, n, order): | |
1585 | """``set^0`` |
|
1585 | """``set^0`` | |
1586 | The set. |
|
1586 | The set. | |
1587 | ``set^1`` (or ``set^``), ``set^2`` |
|
1587 | ``set^1`` (or ``set^``), ``set^2`` | |
@@ -2426,25 +2426,25 b' def _analyze(x, order):' | |||||
2426 | elif op == 'and': |
|
2426 | elif op == 'and': | |
2427 | ta = _analyze(x[1], order) |
|
2427 | ta = _analyze(x[1], order) | |
2428 | tb = _analyze(x[2], _tofolloworder[order]) |
|
2428 | tb = _analyze(x[2], _tofolloworder[order]) | |
2429 | return (op, ta, tb) |
|
2429 | return (op, ta, tb, order) | |
2430 | elif op == 'or': |
|
2430 | elif op == 'or': | |
2431 | return (op, _analyze(x[1], order)) |
|
2431 | return (op, _analyze(x[1], order), order) | |
2432 | elif op == 'not': |
|
2432 | elif op == 'not': | |
2433 | return (op, _analyze(x[1], anyorder)) |
|
2433 | return (op, _analyze(x[1], anyorder), order) | |
2434 | elif op == 'parentpost': |
|
2434 | elif op == 'parentpost': | |
2435 | return (op, _analyze(x[1], defineorder)) |
|
2435 | return (op, _analyze(x[1], defineorder), order) | |
2436 | elif op == 'group': |
|
2436 | elif op == 'group': | |
2437 | return _analyze(x[1], order) |
|
2437 | return _analyze(x[1], order) | |
2438 | elif op in ('dagrange', 'range', 'parent', 'ancestor'): |
|
2438 | elif op in ('dagrange', 'range', 'parent', 'ancestor'): | |
2439 | ta = _analyze(x[1], defineorder) |
|
2439 | ta = _analyze(x[1], defineorder) | |
2440 | tb = _analyze(x[2], defineorder) |
|
2440 | tb = _analyze(x[2], defineorder) | |
2441 | return (op, ta, tb) |
|
2441 | return (op, ta, tb, order) | |
2442 | elif op == 'list': |
|
2442 | elif op == 'list': | |
2443 | return (op,) + tuple(_analyze(y, order) for y in x[1:]) |
|
2443 | return (op,) + tuple(_analyze(y, order) for y in x[1:]) | |
2444 | elif op == 'keyvalue': |
|
2444 | elif op == 'keyvalue': | |
2445 | return (op, x[1], _analyze(x[2], order)) |
|
2445 | return (op, x[1], _analyze(x[2], order)) | |
2446 | elif op == 'func': |
|
2446 | elif op == 'func': | |
2447 | return (op, x[1], _analyze(x[2], defineorder)) |
|
2447 | return (op, x[1], _analyze(x[2], defineorder), order) | |
2448 | raise ValueError('invalid operator %r' % op) |
|
2448 | raise ValueError('invalid operator %r' % op) | |
2449 |
|
2449 | |||
2450 | def analyze(x, order=defineorder): |
|
2450 | def analyze(x, order=defineorder): | |
@@ -2473,22 +2473,24 b' def _optimize(x, small):' | |||||
2473 | elif op == 'and': |
|
2473 | elif op == 'and': | |
2474 | wa, ta = _optimize(x[1], True) |
|
2474 | wa, ta = _optimize(x[1], True) | |
2475 | wb, tb = _optimize(x[2], True) |
|
2475 | wb, tb = _optimize(x[2], True) | |
|
2476 | order = x[3] | |||
2476 | w = min(wa, wb) |
|
2477 | w = min(wa, wb) | |
2477 |
|
2478 | |||
2478 | # (::x and not ::y)/(not ::y and ::x) have a fast path |
|
2479 | # (::x and not ::y)/(not ::y and ::x) have a fast path | |
2479 | tm = _matchonly(ta, tb) or _matchonly(tb, ta) |
|
2480 | tm = _matchonly(ta, tb) or _matchonly(tb, ta) | |
2480 | if tm: |
|
2481 | if tm: | |
2481 | return w, ('func', ('symbol', 'only'), tm) |
|
2482 | return w, ('func', ('symbol', 'only'), tm, order) | |
2482 |
|
2483 | |||
2483 | if tb is not None and tb[0] == 'not': |
|
2484 | if tb is not None and tb[0] == 'not': | |
2484 | return wa, ('difference', ta, tb[1]) |
|
2485 | return wa, ('difference', ta, tb[1], order) | |
2485 |
|
2486 | |||
2486 | if wa > wb: |
|
2487 | if wa > wb: | |
2487 | return w, (op, tb, ta) |
|
2488 | return w, (op, tb, ta, order) | |
2488 | return w, (op, ta, tb) |
|
2489 | return w, (op, ta, tb, order) | |
2489 | elif op == 'or': |
|
2490 | elif op == 'or': | |
2490 | # fast path for machine-generated expression, that is likely to have |
|
2491 | # fast path for machine-generated expression, that is likely to have | |
2491 | # lots of trivial revisions: 'a + b + c()' to '_list(a b) + c()' |
|
2492 | # lots of trivial revisions: 'a + b + c()' to '_list(a b) + c()' | |
|
2493 | order = x[2] | |||
2492 | ws, ts, ss = [], [], [] |
|
2494 | ws, ts, ss = [], [], [] | |
2493 | def flushss(): |
|
2495 | def flushss(): | |
2494 | if not ss: |
|
2496 | if not ss: | |
@@ -2497,7 +2499,7 b' def _optimize(x, small):' | |||||
2497 | w, t = ss[0] |
|
2499 | w, t = ss[0] | |
2498 | else: |
|
2500 | else: | |
2499 | s = '\0'.join(t[1] for w, t in ss) |
|
2501 | s = '\0'.join(t[1] for w, t in ss) | |
2500 | y = ('func', ('symbol', '_list'), ('string', s)) |
|
2502 | y = ('func', ('symbol', '_list'), ('string', s), order) | |
2501 | w, t = _optimize(y, False) |
|
2503 | w, t = _optimize(y, False) | |
2502 | ws.append(w) |
|
2504 | ws.append(w) | |
2503 | ts.append(t) |
|
2505 | ts.append(t) | |
@@ -2516,23 +2518,27 b' def _optimize(x, small):' | |||||
2516 | # we can't reorder trees by weight because it would change the order. |
|
2518 | # we can't reorder trees by weight because it would change the order. | |
2517 | # ("sort(a + b)" == "sort(b + a)", but "a + b" != "b + a") |
|
2519 | # ("sort(a + b)" == "sort(b + a)", but "a + b" != "b + a") | |
2518 | # ts = tuple(t for w, t in sorted(zip(ws, ts), key=lambda wt: wt[0])) |
|
2520 | # ts = tuple(t for w, t in sorted(zip(ws, ts), key=lambda wt: wt[0])) | |
2519 | return max(ws), (op, ('list',) + tuple(ts)) |
|
2521 | return max(ws), (op, ('list',) + tuple(ts), order) | |
2520 | elif op == 'not': |
|
2522 | elif op == 'not': | |
2521 | # Optimize not public() to _notpublic() because we have a fast version |
|
2523 | # Optimize not public() to _notpublic() because we have a fast version | |
2522 | if x[1] == ('func', ('symbol', 'public'), None): |
|
2524 | if x[1][:3] == ('func', ('symbol', 'public'), None): | |
2523 | newsym = ('func', ('symbol', '_notpublic'), None) |
|
2525 | order = x[1][3] | |
|
2526 | newsym = ('func', ('symbol', '_notpublic'), None, order) | |||
2524 | o = _optimize(newsym, not small) |
|
2527 | o = _optimize(newsym, not small) | |
2525 | return o[0], o[1] |
|
2528 | return o[0], o[1] | |
2526 | else: |
|
2529 | else: | |
2527 | o = _optimize(x[1], not small) |
|
2530 | o = _optimize(x[1], not small) | |
2528 |
re |
|
2531 | order = x[2] | |
|
2532 | return o[0], (op, o[1], order) | |||
2529 | elif op == 'parentpost': |
|
2533 | elif op == 'parentpost': | |
2530 | o = _optimize(x[1], small) |
|
2534 | o = _optimize(x[1], small) | |
2531 | return o[0], (op, o[1]) |
|
2535 | order = x[2] | |
|
2536 | return o[0], (op, o[1], order) | |||
2532 | elif op in ('dagrange', 'range', 'parent', 'ancestor'): |
|
2537 | elif op in ('dagrange', 'range', 'parent', 'ancestor'): | |
2533 | wa, ta = _optimize(x[1], small) |
|
2538 | wa, ta = _optimize(x[1], small) | |
2534 | wb, tb = _optimize(x[2], small) |
|
2539 | wb, tb = _optimize(x[2], small) | |
2535 | return wa + wb, (op, ta, tb) |
|
2540 | order = x[3] | |
|
2541 | return wa + wb, (op, ta, tb, order) | |||
2536 | elif op == 'list': |
|
2542 | elif op == 'list': | |
2537 | ws, ts = zip(*(_optimize(y, small) for y in x[1:])) |
|
2543 | ws, ts = zip(*(_optimize(y, small) for y in x[1:])) | |
2538 | return sum(ws), (op,) + ts |
|
2544 | return sum(ws), (op,) + ts | |
@@ -2557,7 +2563,8 b' def _optimize(x, small):' | |||||
2557 | w = 10 # assume most sorts look at changelog |
|
2563 | w = 10 # assume most sorts look at changelog | |
2558 | else: |
|
2564 | else: | |
2559 | w = 1 |
|
2565 | w = 1 | |
2560 | return w + wa, (op, x[1], ta) |
|
2566 | order = x[3] | |
|
2567 | return w + wa, (op, x[1], ta, order) | |||
2561 | raise ValueError('invalid operator %r' % op) |
|
2568 | raise ValueError('invalid operator %r' % op) | |
2562 |
|
2569 | |||
2563 | def optimize(tree): |
|
2570 | def optimize(tree): |
@@ -163,7 +163,8 b' trivial' | |||||
163 | * optimized: |
|
163 | * optimized: | |
164 | (range |
|
164 | (range | |
165 | ('string', '0') |
|
165 | ('string', '0') | |
166 |
('string', 'tip') |
|
166 | ('string', 'tip') | |
|
167 | define) | |||
167 | * set: |
|
168 | * set: | |
168 | <spanset+ 0:9> |
|
169 | <spanset+ 0:9> | |
169 | 0 |
|
170 | 0 | |
@@ -491,7 +492,8 b' keyword arguments' | |||||
491 | ('symbol', 'foo') |
|
492 | ('symbol', 'foo') | |
492 | (func |
|
493 | (func | |
493 | ('symbol', '_notpublic') |
|
494 | ('symbol', '_notpublic') | |
494 |
None |
|
495 | None | |
|
496 | any)) | |||
495 | hg: parse error: can't use a key-value pair in this context |
|
497 | hg: parse error: can't use a key-value pair in this context | |
496 | [255] |
|
498 | [255] | |
497 |
|
499 | |||
@@ -543,15 +545,20 b' parsed tree at stages:' | |||||
543 | (or |
|
545 | (or | |
544 | (list |
|
546 | (list | |
545 | ('symbol', '0') |
|
547 | ('symbol', '0') | |
546 |
('symbol', '1')) |
|
548 | ('symbol', '1')) | |
|
549 | define) | |||
547 | (not |
|
550 | (not | |
548 |
('symbol', '1') |
|
551 | ('symbol', '1') | |
|
552 | follow) | |||
|
553 | define) | |||
549 | * optimized: |
|
554 | * optimized: | |
550 | (difference |
|
555 | (difference | |
551 | (func |
|
556 | (func | |
552 | ('symbol', '_list') |
|
557 | ('symbol', '_list') | |
553 |
('string', '0\x001') |
|
558 | ('string', '0\x001') | |
554 | ('symbol', '1')) |
|
559 | define) | |
|
560 | ('symbol', '1') | |||
|
561 | define) | |||
555 | 0 |
|
562 | 0 | |
556 |
|
563 | |||
557 | $ hg debugrevspec -p unknown '0' |
|
564 | $ hg debugrevspec -p unknown '0' | |
@@ -571,14 +578,18 b' verify optimized tree:' | |||||
571 | (and |
|
578 | (and | |
572 | (func |
|
579 | (func | |
573 | ('symbol', 'r3232') |
|
580 | ('symbol', 'r3232') | |
574 |
None |
|
581 | None | |
575 | ('symbol', '2')) |
|
582 | define) | |
|
583 | ('symbol', '2') | |||
|
584 | define) | |||
576 | * optimized: |
|
585 | * optimized: | |
577 | (and |
|
586 | (and | |
578 | ('symbol', '2') |
|
587 | ('symbol', '2') | |
579 | (func |
|
588 | (func | |
580 | ('symbol', 'r3232') |
|
589 | ('symbol', 'r3232') | |
581 |
None |
|
590 | None | |
|
591 | define) | |||
|
592 | define) | |||
582 | * analyzed set: |
|
593 | * analyzed set: | |
583 | <baseset [2]> |
|
594 | <baseset [2]> | |
584 | * optimized set: |
|
595 | * optimized set: | |
@@ -1027,8 +1038,11 b" Test opreand of '%' is optimized recursi" | |||||
1027 | (difference |
|
1038 | (difference | |
1028 | (range |
|
1039 | (range | |
1029 | ('symbol', '8') |
|
1040 | ('symbol', '8') | |
1030 |
('symbol', '9') |
|
1041 | ('symbol', '9') | |
1031 | ('symbol', '8'))) |
|
1042 | define) | |
|
1043 | ('symbol', '8') | |||
|
1044 | define) | |||
|
1045 | define) | |||
1032 | * set: |
|
1046 | * set: | |
1033 | <baseset+ [8, 9]> |
|
1047 | <baseset+ [8, 9]> | |
1034 | 8 |
|
1048 | 8 | |
@@ -1044,7 +1058,8 b" Test opreand of '%' is optimized recursi" | |||||
1044 | ('symbol', 'only') |
|
1058 | ('symbol', 'only') | |
1045 | (list |
|
1059 | (list | |
1046 | ('symbol', '9') |
|
1060 | ('symbol', '9') | |
1047 |
('symbol', '5')) |
|
1061 | ('symbol', '5')) | |
|
1062 | define) | |||
1048 | * set: |
|
1063 | * set: | |
1049 | <baseset+ [2, 4, 8, 9]> |
|
1064 | <baseset+ [2, 4, 8, 9]> | |
1050 | 2 |
|
1065 | 2 | |
@@ -1258,10 +1273,13 b' ordering defined by it.' | |||||
1258 | (and |
|
1273 | (and | |
1259 | (range |
|
1274 | (range | |
1260 | ('symbol', '2') |
|
1275 | ('symbol', '2') | |
1261 |
('symbol', '0') |
|
1276 | ('symbol', '0') | |
|
1277 | define) | |||
1262 | (func |
|
1278 | (func | |
1263 | ('symbol', '_list') |
|
1279 | ('symbol', '_list') | |
1264 |
('string', '0\x001\x002') |
|
1280 | ('string', '0\x001\x002') | |
|
1281 | follow) | |||
|
1282 | define) | |||
1265 | * set: |
|
1283 | * set: | |
1266 | <baseset [0, 1, 2]> |
|
1284 | <baseset [0, 1, 2]> | |
1267 | 0 |
|
1285 | 0 | |
@@ -1287,13 +1305,17 b' ordering defined by it.' | |||||
1287 | (and |
|
1305 | (and | |
1288 | (range |
|
1306 | (range | |
1289 | ('symbol', '2') |
|
1307 | ('symbol', '2') | |
1290 |
('symbol', '0') |
|
1308 | ('symbol', '0') | |
|
1309 | define) | |||
1291 | (or |
|
1310 | (or | |
1292 | (list |
|
1311 | (list | |
1293 | (range |
|
1312 | (range | |
1294 | ('symbol', '0') |
|
1313 | ('symbol', '0') | |
1295 |
('symbol', '1') |
|
1314 | ('symbol', '1') | |
1296 | ('symbol', '2')))) |
|
1315 | follow) | |
|
1316 | ('symbol', '2')) | |||
|
1317 | follow) | |||
|
1318 | define) | |||
1297 | * set: |
|
1319 | * set: | |
1298 | <addset |
|
1320 | <addset | |
1299 | <filteredset |
|
1321 | <filteredset | |
@@ -1319,10 +1341,13 b' ordering defined by it.' | |||||
1319 | (and |
|
1341 | (and | |
1320 | (func |
|
1342 | (func | |
1321 | ('symbol', '_intlist') |
|
1343 | ('symbol', '_intlist') | |
1322 |
('string', '0\x001\x002') |
|
1344 | ('string', '0\x001\x002') | |
|
1345 | follow) | |||
1323 | (range |
|
1346 | (range | |
1324 | ('symbol', '2') |
|
1347 | ('symbol', '2') | |
1325 |
('symbol', '0') |
|
1348 | ('symbol', '0') | |
|
1349 | define) | |||
|
1350 | define) | |||
1326 | * set: |
|
1351 | * set: | |
1327 | <filteredset |
|
1352 | <filteredset | |
1328 | <spanset- 0:2>, |
|
1353 | <spanset- 0:2>, | |
@@ -1343,10 +1368,13 b' ordering defined by it.' | |||||
1343 | (and |
|
1368 | (and | |
1344 | (func |
|
1369 | (func | |
1345 | ('symbol', '_intlist') |
|
1370 | ('symbol', '_intlist') | |
1346 |
('string', '0\x002\x001') |
|
1371 | ('string', '0\x002\x001') | |
|
1372 | define) | |||
1347 | (range |
|
1373 | (range | |
1348 | ('symbol', '2') |
|
1374 | ('symbol', '2') | |
1349 |
('symbol', '0') |
|
1375 | ('symbol', '0') | |
|
1376 | follow) | |||
|
1377 | define) | |||
1350 | * set: |
|
1378 | * set: | |
1351 | <filteredset |
|
1379 | <filteredset | |
1352 | <spanset- 0:2>, |
|
1380 | <spanset- 0:2>, | |
@@ -1370,10 +1398,13 b' ordering defined by it.' | |||||
1370 | (and |
|
1398 | (and | |
1371 | (range |
|
1399 | (range | |
1372 | ('symbol', '2') |
|
1400 | ('symbol', '2') | |
1373 |
('symbol', '0') |
|
1401 | ('symbol', '0') | |
|
1402 | define) | |||
1374 | (func |
|
1403 | (func | |
1375 | ('symbol', '_hexlist') |
|
1404 | ('symbol', '_hexlist') | |
1376 |
('string', '*') |
|
1405 | ('string', '*') (glob) | |
|
1406 | follow) | |||
|
1407 | define) | |||
1377 | * set: |
|
1408 | * set: | |
1378 | <baseset [0, 1, 2]> |
|
1409 | <baseset [0, 1, 2]> | |
1379 | 0 |
|
1410 | 0 | |
@@ -1393,10 +1424,13 b' ordering defined by it.' | |||||
1393 | (and |
|
1424 | (and | |
1394 | (range |
|
1425 | (range | |
1395 | ('symbol', '2') |
|
1426 | ('symbol', '2') | |
1396 |
('symbol', '0') |
|
1427 | ('symbol', '0') | |
|
1428 | follow) | |||
1397 | (func |
|
1429 | (func | |
1398 | ('symbol', '_hexlist') |
|
1430 | ('symbol', '_hexlist') | |
1399 |
('string', '*') |
|
1431 | ('string', '*') (glob) | |
|
1432 | define) | |||
|
1433 | define) | |||
1400 | * set: |
|
1434 | * set: | |
1401 | <baseset [0, 2, 1]> |
|
1435 | <baseset [0, 2, 1]> | |
1402 | 0 |
|
1436 | 0 | |
@@ -1421,12 +1455,16 b' ordering defined by it.' | |||||
1421 | (and |
|
1455 | (and | |
1422 | (range |
|
1456 | (range | |
1423 | ('symbol', '2') |
|
1457 | ('symbol', '2') | |
1424 |
('symbol', '0') |
|
1458 | ('symbol', '0') | |
|
1459 | define) | |||
1425 | (func |
|
1460 | (func | |
1426 | ('symbol', 'present') |
|
1461 | ('symbol', 'present') | |
1427 | (func |
|
1462 | (func | |
1428 | ('symbol', '_list') |
|
1463 | ('symbol', '_list') | |
1429 |
('string', '0\x001\x002') |
|
1464 | ('string', '0\x001\x002') | |
|
1465 | define) | |||
|
1466 | follow) | |||
|
1467 | define) | |||
1430 | * set: |
|
1468 | * set: | |
1431 | <baseset [0, 1, 2]> |
|
1469 | <baseset [0, 1, 2]> | |
1432 | 0 |
|
1470 | 0 | |
@@ -1450,12 +1488,16 b' ordering defined by it.' | |||||
1450 | (and |
|
1488 | (and | |
1451 | (range |
|
1489 | (range | |
1452 | ('symbol', '0') |
|
1490 | ('symbol', '0') | |
1453 |
('symbol', '2') |
|
1491 | ('symbol', '2') | |
|
1492 | define) | |||
1454 | (func |
|
1493 | (func | |
1455 | ('symbol', 'reverse') |
|
1494 | ('symbol', 'reverse') | |
1456 | (func |
|
1495 | (func | |
1457 | ('symbol', 'all') |
|
1496 | ('symbol', 'all') | |
1458 |
None |
|
1497 | None | |
|
1498 | define) | |||
|
1499 | follow) | |||
|
1500 | define) | |||
1459 | * set: |
|
1501 | * set: | |
1460 | <filteredset |
|
1502 | <filteredset | |
1461 | <spanset- 0:2>, |
|
1503 | <spanset- 0:2>, | |
@@ -1484,14 +1526,18 b' ordering defined by it.' | |||||
1484 | (and |
|
1526 | (and | |
1485 | (range |
|
1527 | (range | |
1486 | ('symbol', '0') |
|
1528 | ('symbol', '0') | |
1487 |
('symbol', '2') |
|
1529 | ('symbol', '2') | |
|
1530 | define) | |||
1488 | (func |
|
1531 | (func | |
1489 | ('symbol', 'sort') |
|
1532 | ('symbol', 'sort') | |
1490 | (list |
|
1533 | (list | |
1491 | (func |
|
1534 | (func | |
1492 | ('symbol', 'all') |
|
1535 | ('symbol', 'all') | |
1493 |
None |
|
1536 | None | |
1494 | ('string', '-rev')))) |
|
1537 | define) | |
|
1538 | ('string', '-rev')) | |||
|
1539 | follow) | |||
|
1540 | define) | |||
1495 | * set: |
|
1541 | * set: | |
1496 | <filteredset |
|
1542 | <filteredset | |
1497 | <spanset- 0:2>, |
|
1543 | <spanset- 0:2>, | |
@@ -1519,12 +1565,16 b' ordering defined by it.' | |||||
1519 | (and |
|
1565 | (and | |
1520 | (range |
|
1566 | (range | |
1521 | ('symbol', '2') |
|
1567 | ('symbol', '2') | |
1522 |
('symbol', '0') |
|
1568 | ('symbol', '0') | |
|
1569 | define) | |||
1523 | (func |
|
1570 | (func | |
1524 | ('symbol', 'first') |
|
1571 | ('symbol', 'first') | |
1525 | (func |
|
1572 | (func | |
1526 | ('symbol', '_list') |
|
1573 | ('symbol', '_list') | |
1527 |
('string', '1\x000\x002') |
|
1574 | ('string', '1\x000\x002') | |
|
1575 | define) | |||
|
1576 | follow) | |||
|
1577 | define) | |||
1528 | * set: |
|
1578 | * set: | |
1529 | <baseset |
|
1579 | <baseset | |
1530 | <limit n=1, offset=0, |
|
1580 | <limit n=1, offset=0, | |
@@ -1549,12 +1599,16 b' ordering defined by it.' | |||||
1549 | (difference |
|
1599 | (difference | |
1550 | (range |
|
1600 | (range | |
1551 | ('symbol', '2') |
|
1601 | ('symbol', '2') | |
1552 |
('symbol', '0') |
|
1602 | ('symbol', '0') | |
|
1603 | define) | |||
1553 | (func |
|
1604 | (func | |
1554 | ('symbol', 'last') |
|
1605 | ('symbol', 'last') | |
1555 | (func |
|
1606 | (func | |
1556 | ('symbol', '_list') |
|
1607 | ('symbol', '_list') | |
1557 |
('string', '0\x002\x001') |
|
1608 | ('string', '0\x002\x001') | |
|
1609 | define) | |||
|
1610 | any) | |||
|
1611 | define) | |||
1558 | * set: |
|
1612 | * set: | |
1559 | <filteredset |
|
1613 | <filteredset | |
1560 | <spanset- 0:2>, |
|
1614 | <spanset- 0:2>, | |
@@ -1590,14 +1644,19 b' ordering defined by it.' | |||||
1590 | (and |
|
1644 | (and | |
1591 | (range |
|
1645 | (range | |
1592 | ('symbol', '2') |
|
1646 | ('symbol', '2') | |
1593 |
('symbol', '0') |
|
1647 | ('symbol', '0') | |
|
1648 | define) | |||
1594 | (range |
|
1649 | (range | |
1595 | (func |
|
1650 | (func | |
1596 | ('symbol', '_list') |
|
1651 | ('symbol', '_list') | |
1597 |
('string', '1\x000\x002') |
|
1652 | ('string', '1\x000\x002') | |
|
1653 | define) | |||
1598 | (func |
|
1654 | (func | |
1599 | ('symbol', '_list') |
|
1655 | ('symbol', '_list') | |
1600 |
('string', '0\x002\x001') |
|
1656 | ('string', '0\x002\x001') | |
|
1657 | define) | |||
|
1658 | follow) | |||
|
1659 | define) | |||
1601 | * set: |
|
1660 | * set: | |
1602 | <filteredset |
|
1661 | <filteredset | |
1603 | <baseset [1]>, |
|
1662 | <baseset [1]>, | |
@@ -1623,10 +1682,13 b' ordering defined by it.' | |||||
1623 | (and |
|
1682 | (and | |
1624 | (func |
|
1683 | (func | |
1625 | ('symbol', '_list') |
|
1684 | ('symbol', '_list') | |
1626 |
('string', '2\x000\x001') |
|
1685 | ('string', '2\x000\x001') | |
|
1686 | follow) | |||
1627 | (func |
|
1687 | (func | |
1628 | ('symbol', 'contains') |
|
1688 | ('symbol', 'contains') | |
1629 |
('string', 'glob:*') |
|
1689 | ('string', 'glob:*') | |
|
1690 | define) | |||
|
1691 | define) | |||
1630 | * set: |
|
1692 | * set: | |
1631 | <filteredset |
|
1693 | <filteredset | |
1632 | <baseset [2, 0, 1]>, |
|
1694 | <baseset [2, 0, 1]>, | |
@@ -1653,12 +1715,16 b' ordering defined by it.' | |||||
1653 | (and |
|
1715 | (and | |
1654 | (func |
|
1716 | (func | |
1655 | ('symbol', '_list') |
|
1717 | ('symbol', '_list') | |
1656 |
('string', '0\x002\x001') |
|
1718 | ('string', '0\x002\x001') | |
|
1719 | follow) | |||
1657 | (func |
|
1720 | (func | |
1658 | ('symbol', 'reverse') |
|
1721 | ('symbol', 'reverse') | |
1659 | (func |
|
1722 | (func | |
1660 | ('symbol', 'contains') |
|
1723 | ('symbol', 'contains') | |
1661 |
('string', 'glob:*') |
|
1724 | ('string', 'glob:*') | |
|
1725 | define) | |||
|
1726 | define) | |||
|
1727 | define) | |||
1662 | * set: |
|
1728 | * set: | |
1663 | <filteredset |
|
1729 | <filteredset | |
1664 | <baseset [1, 2, 0]>, |
|
1730 | <baseset [1, 2, 0]>, | |
@@ -2052,7 +2118,8 b' test optimization of trivial `or` operat' | |||||
2052 | * optimized: |
|
2118 | * optimized: | |
2053 | (func |
|
2119 | (func | |
2054 | ('symbol', '_list') |
|
2120 | ('symbol', '_list') | |
2055 |
('string', '0\x001\x002\x00-2\x00tip\x00null') |
|
2121 | ('string', '0\x001\x002\x00-2\x00tip\x00null') | |
|
2122 | define) | |||
2056 | * set: |
|
2123 | * set: | |
2057 | <baseset [0, 1, 2, 8, 9, -1]> |
|
2124 | <baseset [0, 1, 2, 8, 9, -1]> | |
2058 | 0 |
|
2125 | 0 | |
@@ -2075,10 +2142,13 b' test optimization of trivial `or` operat' | |||||
2075 | (list |
|
2142 | (list | |
2076 | (func |
|
2143 | (func | |
2077 | ('symbol', '_list') |
|
2144 | ('symbol', '_list') | |
2078 |
('string', '0\x001') |
|
2145 | ('string', '0\x001') | |
|
2146 | define) | |||
2079 | (range |
|
2147 | (range | |
2080 | ('symbol', '2') |
|
2148 | ('symbol', '2') | |
2081 |
('symbol', '3') |
|
2149 | ('symbol', '3') | |
|
2150 | define)) | |||
|
2151 | define) | |||
2082 | * set: |
|
2152 | * set: | |
2083 | <addset |
|
2153 | <addset | |
2084 | <baseset [0, 1]>, |
|
2154 | <baseset [0, 1]>, | |
@@ -2105,14 +2175,18 b' test optimization of trivial `or` operat' | |||||
2105 | (list |
|
2175 | (list | |
2106 | (range |
|
2176 | (range | |
2107 | ('symbol', '0') |
|
2177 | ('symbol', '0') | |
2108 |
('symbol', '1') |
|
2178 | ('symbol', '1') | |
|
2179 | define) | |||
2109 | ('symbol', '2') |
|
2180 | ('symbol', '2') | |
2110 | (range |
|
2181 | (range | |
2111 | ('symbol', '3') |
|
2182 | ('symbol', '3') | |
2112 |
('symbol', '4') |
|
2183 | ('symbol', '4') | |
|
2184 | define) | |||
2113 | (func |
|
2185 | (func | |
2114 | ('symbol', '_list') |
|
2186 | ('symbol', '_list') | |
2115 |
('string', '5\x006') |
|
2187 | ('string', '5\x006') | |
|
2188 | define)) | |||
|
2189 | define) | |||
2116 | * set: |
|
2190 | * set: | |
2117 | <addset |
|
2191 | <addset | |
2118 | <addset |
|
2192 | <addset | |
@@ -2139,7 +2213,8 b' unoptimized `or` looks like this' | |||||
2139 | ('symbol', '1') |
|
2213 | ('symbol', '1') | |
2140 | ('symbol', '2') |
|
2214 | ('symbol', '2') | |
2141 | ('symbol', '3') |
|
2215 | ('symbol', '3') | |
2142 |
('symbol', '4')) |
|
2216 | ('symbol', '4')) | |
|
2217 | define) | |||
2143 | * set: |
|
2218 | * set: | |
2144 | <addset |
|
2219 | <addset | |
2145 | <addset |
|
2220 | <addset | |
@@ -2259,7 +2334,8 b' no crash by empty group "()" while optim' | |||||
2259 | (or |
|
2334 | (or | |
2260 | (list |
|
2335 | (list | |
2261 | ('symbol', '0') |
|
2336 | ('symbol', '0') | |
2262 |
None) |
|
2337 | None) | |
|
2338 | define) | |||
2263 | hg: parse error: missing argument |
|
2339 | hg: parse error: missing argument | |
2264 | [255] |
|
2340 | [255] | |
2265 |
|
2341 | |||
@@ -2289,7 +2365,8 b' check that conversion to only works' | |||||
2289 | ('symbol', 'only') |
|
2365 | ('symbol', 'only') | |
2290 | (list |
|
2366 | (list | |
2291 | ('symbol', '3') |
|
2367 | ('symbol', '3') | |
2292 |
('symbol', '1')) |
|
2368 | ('symbol', '1')) | |
|
2369 | define) | |||
2293 | * set: |
|
2370 | * set: | |
2294 | <baseset+ [3]> |
|
2371 | <baseset+ [3]> | |
2295 | 3 |
|
2372 | 3 | |
@@ -2306,7 +2383,8 b' check that conversion to only works' | |||||
2306 | ('symbol', 'only') |
|
2383 | ('symbol', 'only') | |
2307 | (list |
|
2384 | (list | |
2308 | ('symbol', '1') |
|
2385 | ('symbol', '1') | |
2309 |
('symbol', '3')) |
|
2386 | ('symbol', '3')) | |
|
2387 | define) | |||
2310 | * set: |
|
2388 | * set: | |
2311 | <baseset+ []> |
|
2389 | <baseset+ []> | |
2312 | $ try --optimize 'not ::2 and ::6' |
|
2390 | $ try --optimize 'not ::2 and ::6' | |
@@ -2321,7 +2399,8 b' check that conversion to only works' | |||||
2321 | ('symbol', 'only') |
|
2399 | ('symbol', 'only') | |
2322 | (list |
|
2400 | (list | |
2323 | ('symbol', '6') |
|
2401 | ('symbol', '6') | |
2324 |
('symbol', '2')) |
|
2402 | ('symbol', '2')) | |
|
2403 | define) | |||
2325 | * set: |
|
2404 | * set: | |
2326 | <baseset+ [3, 4, 5, 6]> |
|
2405 | <baseset+ [3, 4, 5, 6]> | |
2327 | 3 |
|
2406 | 3 | |
@@ -2342,7 +2421,8 b' check that conversion to only works' | |||||
2342 | ('symbol', 'only') |
|
2421 | ('symbol', 'only') | |
2343 | (list |
|
2422 | (list | |
2344 | ('symbol', '6') |
|
2423 | ('symbol', '6') | |
2345 |
('symbol', '4')) |
|
2424 | ('symbol', '4')) | |
|
2425 | define) | |||
2346 | * set: |
|
2426 | * set: | |
2347 | <baseset+ [3, 5, 6]> |
|
2427 | <baseset+ [3, 5, 6]> | |
2348 | 3 |
|
2428 | 3 | |
@@ -2362,7 +2442,9 b' no crash by empty group "()" while optim' | |||||
2362 | None |
|
2442 | None | |
2363 | (func |
|
2443 | (func | |
2364 | ('symbol', 'ancestors') |
|
2444 | ('symbol', 'ancestors') | |
2365 |
('symbol', '1') |
|
2445 | ('symbol', '1') | |
|
2446 | define) | |||
|
2447 | define) | |||
2366 | hg: parse error: missing argument |
|
2448 | hg: parse error: missing argument | |
2367 | [255] |
|
2449 | [255] | |
2368 |
|
2450 |
General Comments 0
You need to be logged in to leave comments.
Login now