Show More
@@ -169,8 +169,8 b' def andset(repo, subset, x, y, order):' | |||||
169 | yorder = followorder |
|
169 | yorder = followorder | |
170 | return getset(repo, getset(repo, subset, x, order), y, yorder) |
|
170 | return getset(repo, getset(repo, subset, x, order), y, yorder) | |
171 |
|
171 | |||
172 |
def |
|
172 | def andsmallyset(repo, subset, x, y, order): | |
173 |
# ' |
|
173 | # 'andsmally(x, y)' is equivalent to 'and(x, y)', but faster when y is small | |
174 | if order == anyorder: |
|
174 | if order == anyorder: | |
175 | yorder = anyorder |
|
175 | yorder = anyorder | |
176 | else: |
|
176 | else: | |
@@ -2101,7 +2101,7 b' methods = {' | |||||
2101 | "string": stringset, |
|
2101 | "string": stringset, | |
2102 | "symbol": stringset, |
|
2102 | "symbol": stringset, | |
2103 | "and": andset, |
|
2103 | "and": andset, | |
2104 | "flipand": flipandset, |
|
2104 | "andsmally": andsmallyset, | |
2105 | "or": orset, |
|
2105 | "or": orset, | |
2106 | "not": notset, |
|
2106 | "not": notset, | |
2107 | "difference": differenceset, |
|
2107 | "difference": differenceset, |
@@ -374,7 +374,7 b' def _optimize(x, small):' | |||||
374 | if tb is not None and tb[0] == 'not': |
|
374 | if tb is not None and tb[0] == 'not': | |
375 | return wa, ('difference', ta, tb[1]) |
|
375 | return wa, ('difference', ta, tb[1]) | |
376 | if wa > wb: |
|
376 | if wa > wb: | |
377 | return w, ('flipand', tb, ta) |
|
377 | op = 'andsmally' | |
378 | return w, (op, ta, tb) |
|
378 | return w, (op, ta, tb) | |
379 | elif op == 'or': |
|
379 | elif op == 'or': | |
380 | # fast path for machine-generated expression, that is likely to have |
|
380 | # fast path for machine-generated expression, that is likely to have |
@@ -714,11 +714,11 b' verify optimized tree:' | |||||
714 | None) |
|
714 | None) | |
715 | ('symbol', '2')) |
|
715 | ('symbol', '2')) | |
716 | * optimized: |
|
716 | * optimized: | |
717 | (flipand |
|
717 | (andsmally | |
718 | ('symbol', '2') |
|
|||
719 | (func |
|
718 | (func | |
720 | ('symbol', 'r3232') |
|
719 | ('symbol', 'r3232') | |
721 |
None) |
|
720 | None) | |
|
721 | ('symbol', '2')) | |||
722 | * analyzed set: |
|
722 | * analyzed set: | |
723 | <baseset [2]> |
|
723 | <baseset [2]> | |
724 | * optimized set: |
|
724 | * optimized set: | |
@@ -2056,13 +2056,13 b' ordering defined by it.' | |||||
2056 | ('symbol', '_intlist') |
|
2056 | ('symbol', '_intlist') | |
2057 | ('string', '0\x001\x002'))) |
|
2057 | ('string', '0\x001\x002'))) | |
2058 | * optimized: |
|
2058 | * optimized: | |
2059 | (flipand |
|
2059 | (andsmally | |
|
2060 | (range | |||
|
2061 | ('symbol', '2') | |||
|
2062 | ('symbol', '0')) | |||
2060 | (func |
|
2063 | (func | |
2061 | ('symbol', '_intlist') |
|
2064 | ('symbol', '_intlist') | |
2062 | ('string', '0\x001\x002')) |
|
2065 | ('string', '0\x001\x002'))) | |
2063 | (range |
|
|||
2064 | ('symbol', '2') |
|
|||
2065 | ('symbol', '0'))) |
|
|||
2066 | * set: |
|
2066 | * set: | |
2067 | <filteredset |
|
2067 | <filteredset | |
2068 | <spanset- 0:3>, |
|
2068 | <spanset- 0:3>, | |
@@ -2130,13 +2130,13 b' ordering defined by it.' | |||||
2130 | ('symbol', '2') |
|
2130 | ('symbol', '2') | |
2131 | ('symbol', '0'))) |
|
2131 | ('symbol', '0'))) | |
2132 | * optimized: |
|
2132 | * optimized: | |
2133 | (flipand |
|
2133 | (andsmally | |
|
2134 | (func | |||
|
2135 | ('symbol', '_hexlist') | |||
|
2136 | ('string', '*')) (glob) | |||
2134 | (range |
|
2137 | (range | |
2135 | ('symbol', '2') |
|
2138 | ('symbol', '2') | |
2136 | ('symbol', '0')) |
|
2139 | ('symbol', '0'))) | |
2137 | (func |
|
|||
2138 | ('symbol', '_hexlist') |
|
|||
2139 | ('string', '*'))) (glob) |
|
|||
2140 | * set: |
|
2140 | * set: | |
2141 | <baseset [0, 2, 1]> |
|
2141 | <baseset [0, 2, 1]> | |
2142 | 0 |
|
2142 | 0 | |
@@ -2415,13 +2415,13 b' ordering defined by it.' | |||||
2415 | ('symbol', '0') |
|
2415 | ('symbol', '0') | |
2416 | ('symbol', '1'))))) |
|
2416 | ('symbol', '1'))))) | |
2417 | * optimized: |
|
2417 | * optimized: | |
2418 | (flipand |
|
2418 | (andsmally | |
|
2419 | (func | |||
|
2420 | ('symbol', 'contains') | |||
|
2421 | ('string', 'glob:*')) | |||
2419 | (func |
|
2422 | (func | |
2420 | ('symbol', '_list') |
|
2423 | ('symbol', '_list') | |
2421 | ('string', '2\x000\x001')) |
|
2424 | ('string', '2\x000\x001'))) | |
2422 | (func |
|
|||
2423 | ('symbol', 'contains') |
|
|||
2424 | ('string', 'glob:*'))) |
|
|||
2425 | * set: |
|
2425 | * set: | |
2426 | <filteredset |
|
2426 | <filteredset | |
2427 | <baseset+ [0, 1, 2]>, |
|
2427 | <baseset+ [0, 1, 2]>, | |
@@ -2447,15 +2447,15 b' ordering defined by it.' | |||||
2447 | ('symbol', '2') |
|
2447 | ('symbol', '2') | |
2448 | ('symbol', '1'))))) |
|
2448 | ('symbol', '1'))))) | |
2449 | * optimized: |
|
2449 | * optimized: | |
2450 | (flipand |
|
2450 | (andsmally | |
2451 | (func |
|
|||
2452 | ('symbol', '_list') |
|
|||
2453 | ('string', '0\x002\x001')) |
|
|||
2454 | (func |
|
2451 | (func | |
2455 | ('symbol', 'reverse') |
|
2452 | ('symbol', 'reverse') | |
2456 | (func |
|
2453 | (func | |
2457 | ('symbol', 'contains') |
|
2454 | ('symbol', 'contains') | |
2458 |
('string', 'glob:*'))) |
|
2455 | ('string', 'glob:*'))) | |
|
2456 | (func | |||
|
2457 | ('symbol', '_list') | |||
|
2458 | ('string', '0\x002\x001'))) | |||
2459 | * set: |
|
2459 | * set: | |
2460 | <filteredset |
|
2460 | <filteredset | |
2461 | <baseset- [0, 1, 2]>, |
|
2461 | <baseset- [0, 1, 2]>, | |
@@ -3154,11 +3154,11 b' no crash by empty group "()" while optim' | |||||
3154 | (group |
|
3154 | (group | |
3155 | None)) |
|
3155 | None)) | |
3156 | * optimized: |
|
3156 | * optimized: | |
3157 | (flipand |
|
3157 | (andsmally | |
3158 | None |
|
|||
3159 | (func |
|
3158 | (func | |
3160 | ('symbol', 'ancestors') |
|
3159 | ('symbol', 'ancestors') | |
3161 |
('symbol', '1')) |
|
3160 | ('symbol', '1')) | |
|
3161 | None) | |||
3162 | hg: parse error: missing argument |
|
3162 | hg: parse error: missing argument | |
3163 | [255] |
|
3163 | [255] | |
3164 |
|
3164 |
General Comments 0
You need to be logged in to leave comments.
Login now