comparison tests/test-revset.t @ 39804:84c61c1593c4 stable

revset: add tests of heads(commonancestors(..)) The second-to-last one shows the same bug as commonancestors(..): the result should be 8, not 9. Differential Revision: https://phab.mercurial-scm.org/D4741
author Valentin Gatien-Baron <vgatien-baron@janestreet.com>
date Tue, 25 Sep 2018 16:29:39 -0400
parents cb5134f2318a
children 823f34acfd46
comparison
equal deleted inserted replaced
39803:0561e69ed9f1 39804:84c61c1593c4
1068 1 1068 1
1069 2 1069 2
1070 4 1070 4
1071 8 1071 8
1072 1072
1073 test the specialized implementation of heads(commonancestors(..))
1074 (2 gcas is tested in test-merge-criss-cross.t)
1075
1076 $ hg log -T '{rev}\n' -r 'heads(commonancestors(7 + 9))'
1077 4
1078 $ hg log -T '{rev}\n' -r 'heads(commonancestors(heads(all())))'
1079 4
1080 $ hg log -T '{rev}\n' -r 'heads(commonancestors(9))'
1081 9
1082 $ hg log -T '{rev}\n' -r 'heads(commonancestors(8 + 9))'
1083 9
1084
1073 test ancestor variants of empty revision 1085 test ancestor variants of empty revision
1074 1086
1075 $ log 'ancestor(none())' 1087 $ log 'ancestor(none())'
1076 $ log 'ancestors(none())' 1088 $ log 'ancestors(none())'
1077 $ log 'commonancestors(none())' 1089 $ log 'commonancestors(none())'
1090 $ log 'heads(commonancestors(none()))'
1078 1091
1079 test ancestors with depth limit 1092 test ancestors with depth limit
1080 1093
1081 (depth=0 selects the node itself) 1094 (depth=0 selects the node itself)
1082 1095