comparison tests/test-glog.t @ 29929:b3845cab4ddc

revset: wrap arguments of 'or' by 'list' node This makes the number of 'or' arguments deterministic so we can attach additional ordering flag to all operator nodes. See the next patch. We rewrite the tree immediately after chained 'or' operations are flattened by simplifyinfixops(), so we don't need to care if arguments are stored in x[1] or x[1:].
author Yuya Nishihara <yuya@tcha.org>
date Sun, 07 Aug 2016 17:04:05 +0900
parents 09d0022cad83
children 0b8356705de6
comparison
equal deleted inserted replaced
29928:e5a97ec6ebb8 29929:b3845cab4ddc
1453 $ testlog -u test -u not-a-user 1453 $ testlog -u test -u not-a-user
1454 [] 1454 []
1455 (group 1455 (group
1456 (group 1456 (group
1457 (or 1457 (or
1458 (func 1458 (list
1459 ('symbol', 'user') 1459 (func
1460 ('string', 'test')) 1460 ('symbol', 'user')
1461 (func 1461 ('string', 'test'))
1462 ('symbol', 'user') 1462 (func
1463 ('string', 'not-a-user'))))) 1463 ('symbol', 'user')
1464 ('string', 'not-a-user'))))))
1464 $ testlog -b not-a-branch 1465 $ testlog -b not-a-branch
1465 abort: unknown revision 'not-a-branch'! 1466 abort: unknown revision 'not-a-branch'!
1466 abort: unknown revision 'not-a-branch'! 1467 abort: unknown revision 'not-a-branch'!
1467 abort: unknown revision 'not-a-branch'! 1468 abort: unknown revision 'not-a-branch'!
1468 $ testlog -b 35 -b 36 --only-branch branch 1469 $ testlog -b 35 -b 36 --only-branch branch
1469 [] 1470 []
1470 (group 1471 (group
1471 (group 1472 (group
1472 (or 1473 (or
1473 (func 1474 (list
1474 ('symbol', 'branch') 1475 (func
1475 ('string', 'default')) 1476 ('symbol', 'branch')
1476 (func 1477 ('string', 'default'))
1477 ('symbol', 'branch') 1478 (func
1478 ('string', 'branch')) 1479 ('symbol', 'branch')
1479 (func 1480 ('string', 'branch'))
1480 ('symbol', 'branch') 1481 (func
1481 ('string', 'branch'))))) 1482 ('symbol', 'branch')
1483 ('string', 'branch'))))))
1482 $ testlog -k expand -k merge 1484 $ testlog -k expand -k merge
1483 [] 1485 []
1484 (group 1486 (group
1485 (group 1487 (group
1486 (or 1488 (or
1487 (func 1489 (list
1488 ('symbol', 'keyword') 1490 (func
1489 ('string', 'expand')) 1491 ('symbol', 'keyword')
1490 (func 1492 ('string', 'expand'))
1491 ('symbol', 'keyword') 1493 (func
1492 ('string', 'merge'))))) 1494 ('symbol', 'keyword')
1495 ('string', 'merge'))))))
1493 $ testlog --only-merges 1496 $ testlog --only-merges
1494 [] 1497 []
1495 (group 1498 (group
1496 (func 1499 (func
1497 ('symbol', 'merge') 1500 ('symbol', 'merge')
1518 (group 1521 (group
1519 (and 1522 (and
1520 (not 1523 (not
1521 (group 1524 (group
1522 (or 1525 (or
1523 ('string', '31') 1526 (list
1524 (func 1527 ('string', '31')
1525 ('symbol', 'ancestors') 1528 (func
1526 ('string', '31'))))) 1529 ('symbol', 'ancestors')
1530 ('string', '31'))))))
1527 (not 1531 (not
1528 (group 1532 (group
1529 (or 1533 (or
1530 ('string', '32') 1534 (list
1531 (func 1535 ('string', '32')
1532 ('symbol', 'ancestors') 1536 (func
1533 ('string', '32')))))))) 1537 ('symbol', 'ancestors')
1538 ('string', '32')))))))))
1534 1539
1535 Dedicated repo for --follow and paths filtering. The g is crafted to 1540 Dedicated repo for --follow and paths filtering. The g is crafted to
1536 have 2 filelog topological heads in a linear changeset graph. 1541 have 2 filelog topological heads in a linear changeset graph.
1537 1542
1538 $ cd .. 1543 $ cd ..
1585 $ testlog a b 1590 $ testlog a b
1586 [] 1591 []
1587 (group 1592 (group
1588 (group 1593 (group
1589 (or 1594 (or
1590 (func 1595 (list
1591 ('symbol', 'filelog') 1596 (func
1592 ('string', 'a')) 1597 ('symbol', 'filelog')
1593 (func 1598 ('string', 'a'))
1594 ('symbol', 'filelog') 1599 (func
1595 ('string', 'b'))))) 1600 ('symbol', 'filelog')
1601 ('string', 'b'))))))
1596 1602
1597 Test falling back to slow path for non-existing files 1603 Test falling back to slow path for non-existing files
1598 1604
1599 $ testlog a c 1605 $ testlog a c
1600 [] 1606 []
1742 $ testlog -f g e 1748 $ testlog -f g e
1743 [] 1749 []
1744 (group 1750 (group
1745 (group 1751 (group
1746 (or 1752 (or
1747 (func 1753 (list
1748 ('symbol', 'follow') 1754 (func
1749 ('string', 'g')) 1755 ('symbol', 'follow')
1750 (func 1756 ('string', 'g'))
1751 ('symbol', 'follow') 1757 (func
1752 ('string', 'e'))))) 1758 ('symbol', 'follow')
1759 ('string', 'e'))))))
1753 $ cat log.nodes 1760 $ cat log.nodes
1754 nodetag 4 1761 nodetag 4
1755 nodetag 3 1762 nodetag 3
1756 nodetag 2 1763 nodetag 2
1757 nodetag 1 1764 nodetag 1