Show More
@@ -1325,12 +1325,12 b' def maxrev(repo, subset, x):' | |||||
1325 | try: |
|
1325 | try: | |
1326 | m = os.max() |
|
1326 | m = os.max() | |
1327 | if m in subset: |
|
1327 | if m in subset: | |
1328 | return baseset([m]) |
|
1328 | return baseset([m], datarepr=('<max %r, %r>', subset, os)) | |
1329 | except ValueError: |
|
1329 | except ValueError: | |
1330 | # os.max() throws a ValueError when the collection is empty. |
|
1330 | # os.max() throws a ValueError when the collection is empty. | |
1331 | # Same as python's max(). |
|
1331 | # Same as python's max(). | |
1332 | pass |
|
1332 | pass | |
1333 | return baseset() |
|
1333 | return baseset(datarepr=('<max %r, %r>', subset, os)) | |
1334 |
|
1334 | |||
1335 | @predicate('merge()', safe=True) |
|
1335 | @predicate('merge()', safe=True) | |
1336 | def merge(repo, subset, x): |
|
1336 | def merge(repo, subset, x): | |
@@ -1370,12 +1370,12 b' def minrev(repo, subset, x):' | |||||
1370 | try: |
|
1370 | try: | |
1371 | m = os.min() |
|
1371 | m = os.min() | |
1372 | if m in subset: |
|
1372 | if m in subset: | |
1373 | return baseset([m]) |
|
1373 | return baseset([m], datarepr=('<min %r, %r>', subset, os)) | |
1374 | except ValueError: |
|
1374 | except ValueError: | |
1375 | # os.min() throws a ValueError when the collection is empty. |
|
1375 | # os.min() throws a ValueError when the collection is empty. | |
1376 | # Same as python's min(). |
|
1376 | # Same as python's min(). | |
1377 | pass |
|
1377 | pass | |
1378 | return baseset() |
|
1378 | return baseset(datarepr=('<min %r, %r>', subset, os)) | |
1379 |
|
1379 | |||
1380 | @predicate('modifies(pattern)', safe=True) |
|
1380 | @predicate('modifies(pattern)', safe=True) | |
1381 | def modifies(repo, subset, x): |
|
1381 | def modifies(repo, subset, x): |
@@ -1727,7 +1727,10 b' test nesting and variable passing' | |||||
1727 | ('symbol', '2') |
|
1727 | ('symbol', '2') | |
1728 | ('symbol', '5'))) |
|
1728 | ('symbol', '5'))) | |
1729 | * set: |
|
1729 | * set: | |
1730 |
<baseset |
|
1730 | <baseset | |
|
1731 | <max | |||
|
1732 | <fullreposet+ 0:9>, | |||
|
1733 | <spanset+ 2:5>>> | |||
1731 | 5 |
|
1734 | 5 | |
1732 |
|
1735 | |||
1733 | test chained `or` operations are flattened at parsing phase |
|
1736 | test chained `or` operations are flattened at parsing phase | |
@@ -2005,8 +2008,40 b' issue2549 - correct optimizations' | |||||
2005 | <not |
|
2008 | <not | |
2006 | <baseset [2]>>> |
|
2009 | <baseset [2]>>> | |
2007 | 1 |
|
2010 | 1 | |
2008 |
$ |
|
2011 | $ try 'max(1 or 2) and not 2' | |
2009 | $ log 'min(1 or 2) and not 1' |
|
2012 | (and | |
|
2013 | (func | |||
|
2014 | ('symbol', 'max') | |||
|
2015 | (or | |||
|
2016 | ('symbol', '1') | |||
|
2017 | ('symbol', '2'))) | |||
|
2018 | (not | |||
|
2019 | ('symbol', '2'))) | |||
|
2020 | * set: | |||
|
2021 | <filteredset | |||
|
2022 | <baseset | |||
|
2023 | <max | |||
|
2024 | <fullreposet+ 0:9>, | |||
|
2025 | <baseset [1, 2]>>>, | |||
|
2026 | <not | |||
|
2027 | <baseset [2]>>> | |||
|
2028 | $ try 'min(1 or 2) and not 1' | |||
|
2029 | (and | |||
|
2030 | (func | |||
|
2031 | ('symbol', 'min') | |||
|
2032 | (or | |||
|
2033 | ('symbol', '1') | |||
|
2034 | ('symbol', '2'))) | |||
|
2035 | (not | |||
|
2036 | ('symbol', '1'))) | |||
|
2037 | * set: | |||
|
2038 | <filteredset | |||
|
2039 | <baseset | |||
|
2040 | <min | |||
|
2041 | <fullreposet+ 0:9>, | |||
|
2042 | <baseset [1, 2]>>>, | |||
|
2043 | <not | |||
|
2044 | <baseset [1]>>> | |||
2010 | $ try 'last(1 or 2, 1) and not 2' |
|
2045 | $ try 'last(1 or 2, 1) and not 2' | |
2011 | (and |
|
2046 | (and | |
2012 | (func |
|
2047 | (func |
General Comments 0
You need to be logged in to leave comments.
Login now