##// END OF EJS Templates
revset: fix order of nested 'range' expression (BC)...
Yuya Nishihara -
r29944:5f56a3b9 default
parent child Browse files
Show More
@@ -378,12 +378,12 b' def rangeset(repo, subset, x, y, order):'
378 378 r = spanset(repo, m, n + 1)
379 379 else:
380 380 r = spanset(repo, m, n - 1)
381 # XXX We should combine with subset first: 'subset & baseset(...)'. This is
382 # necessary to ensure we preserve the order in subset.
383 #
384 # This has performance implication, carrying the sorting over when possible
385 # would be more efficient.
386 return r & subset
381
382 if order == defineorder:
383 return r & subset
384 else:
385 # carrying the sorting over when possible would be more efficient
386 return subset & r
387 387
388 388 def dagrange(repo, subset, x, y, order):
389 389 r = fullreposet(repo)
@@ -1255,6 +1255,36 b' ordering defined by it.'
1255 1255 1
1256 1256 0
1257 1257
1258 'x:y' takes ordering parameter into account:
1259
1260 $ try -p optimized '3:0 & 0:3 & not 2:1'
1261 * optimized:
1262 (difference
1263 (and
1264 (range
1265 ('symbol', '3')
1266 ('symbol', '0')
1267 define)
1268 (range
1269 ('symbol', '0')
1270 ('symbol', '3')
1271 follow)
1272 define)
1273 (range
1274 ('symbol', '2')
1275 ('symbol', '1')
1276 any)
1277 define)
1278 * set:
1279 <filteredset
1280 <filteredset
1281 <spanset- 0:3>,
1282 <spanset+ 0:3>>,
1283 <not
1284 <spanset+ 1:2>>>
1285 3
1286 0
1287
1258 1288 'a + b', which is optimized to '_list(a b)', should take the ordering of
1259 1289 the left expression:
1260 1290
@@ -1377,12 +1407,11 b' ordering defined by it.'
1377 1407 define)
1378 1408 * set:
1379 1409 <filteredset
1380 <spanset- 0:2>,
1381 <baseset [0, 2, 1]>>
1410 <baseset [0, 2, 1]>,
1411 <spanset- 0:2>>
1412 0
1382 1413 2
1383 1414 1
1384 0
1385 BROKEN: should be '0 2 1'
1386 1415
1387 1416 '_hexlist(a b)' should behave like 'a + b':
1388 1417
@@ -1724,8 +1753,8 b' ordering defined by it.'
1724 1753 define)
1725 1754 * set:
1726 1755 <filteredset
1727 <baseset [1]>,
1728 <spanset- 0:2>>
1756 <spanset- 0:2>,
1757 <baseset [1]>>
1729 1758 1
1730 1759
1731 1760 'A & B' can be rewritten as 'B & A' by weight, but that's fine as long as
General Comments 0
You need to be logged in to leave comments. Login now