comparison tests/test-revset.t @ 25024:263bbed1833c

revset: test current behavior of addset class The addset class isn't simple and it has a hidden bug that will be fixed by future patches. So let's test the current behavior.
author Yuya Nishihara <yuya@tcha.org>
date Mon, 30 Mar 2015 19:51:40 +0900
parents 6b54f749659b
children bb2f543b48b5
comparison
equal deleted inserted replaced
25023:405cb38448ad 25024:263bbed1833c
831 2 831 2
832 3 832 3
833 4 833 4
834 5 834 5
835 835
836 test that `or` operation skips duplicated revisions from right-hand side
837
838 $ try 'reverse(1::5) or ancestors(4)'
839 (or
840 (func
841 ('symbol', 'reverse')
842 (dagrange
843 ('symbol', '1')
844 ('symbol', '5')))
845 (func
846 ('symbol', 'ancestors')
847 ('symbol', '4')))
848 * set:
849 <addset
850 <baseset [5, 3, 1]>,
851 <filteredset
852 <filteredset
853 <fullreposet+ 0:9>>>>
854 5
855 3
856 1
857 0
858 2
859 4
860 $ try 'sort(ancestors(4) or reverse(1::5))'
861 (func
862 ('symbol', 'sort')
863 (or
864 (func
865 ('symbol', 'ancestors')
866 ('symbol', '4'))
867 (func
868 ('symbol', 'reverse')
869 (dagrange
870 ('symbol', '1')
871 ('symbol', '5')))))
872 * set:
873 <addset+
874 <generatorset+>,
875 <filteredset
876 <baseset [5, 3, 1]>>>
877 0
878 1
879 2
880 3
881 4
882 5
883
836 check that conversion to only works 884 check that conversion to only works
837 $ try --optimize '::3 - ::1' 885 $ try --optimize '::3 - ::1'
838 (minus 886 (minus
839 (dagrangepre 887 (dagrangepre
840 ('symbol', '3')) 888 ('symbol', '3'))