##// END OF EJS Templates
revset: special case commonancestors(none()) to be empty set...
Yuya Nishihara -
r38727:e4b270a3 default
parent child Browse files
Show More
@@ -632,7 +632,10 b' def commonancestors(repo, subset, x):'
632
632
633 """
633 """
634 # only wants the heads of the set passed in
634 # only wants the heads of the set passed in
635 for r in heads(repo, fullreposet(repo), x, anyorder):
635 h = heads(repo, fullreposet(repo), x, anyorder)
636 if not h:
637 return baseset()
638 for r in h:
636 subset &= dagop.revancestors(repo, baseset([r]))
639 subset &= dagop.revancestors(repo, baseset([r]))
637
640
638 return subset
641 return subset
@@ -1063,6 +1063,12 b' test common ancestors'
1063 8
1063 8
1064 9
1064 9
1065
1065
1066 test ancestor variants of empty revision
1067
1068 $ log 'ancestor(none())'
1069 $ log 'ancestors(none())'
1070 $ log 'commonancestors(none())'
1071
1066 test ancestors with depth limit
1072 test ancestors with depth limit
1067
1073
1068 (depth=0 selects the node itself)
1074 (depth=0 selects the node itself)
General Comments 0
You need to be logged in to leave comments. Login now