##// END OF EJS Templates
revsets: passing a set to baseset() is not wrong...
Martin von Zweigbergk -
r29406:c2193e59 default
parent child Browse files
Show More
@@ -692,20 +692,18 b' def checkstatus(repo, subset, pat, field'
692
692
693 return subset.filter(matches, condrepr=('<status[%r] %r>', field, pat))
693 return subset.filter(matches, condrepr=('<status[%r] %r>', field, pat))
694
694
695 def _children(repo, narrow, parentset):
695 def _children(repo, subset, parentset):
696 if not parentset:
696 if not parentset:
697 return baseset()
697 return baseset()
698 cs = set()
698 cs = set()
699 pr = repo.changelog.parentrevs
699 pr = repo.changelog.parentrevs
700 minrev = parentset.min()
700 minrev = parentset.min()
701 for r in narrow:
701 for r in subset:
702 if r <= minrev:
702 if r <= minrev:
703 continue
703 continue
704 for p in pr(r):
704 for p in pr(r):
705 if p in parentset:
705 if p in parentset:
706 cs.add(r)
706 cs.add(r)
707 # XXX using a set to feed the baseset is wrong. Sets are not ordered.
708 # This does not break because of other fullreposet misbehavior.
709 return baseset(cs)
707 return baseset(cs)
710
708
711 @predicate('children(set)', safe=True)
709 @predicate('children(set)', safe=True)
@@ -1149,8 +1147,6 b' def head(repo, subset, x):'
1149 cl = repo.changelog
1147 cl = repo.changelog
1150 for b, ls in repo.branchmap().iteritems():
1148 for b, ls in repo.branchmap().iteritems():
1151 hs.update(cl.rev(h) for h in ls)
1149 hs.update(cl.rev(h) for h in ls)
1152 # XXX using a set to feed the baseset is wrong. Sets are not ordered.
1153 # This does not break because of other fullreposet misbehavior.
1154 # XXX We should combine with subset first: 'subset & baseset(...)'. This is
1150 # XXX We should combine with subset first: 'subset & baseset(...)'. This is
1155 # necessary to ensure we preserve the order in subset.
1151 # necessary to ensure we preserve the order in subset.
1156 return baseset(hs) & subset
1152 return baseset(hs) & subset
General Comments 0
You need to be logged in to leave comments. Login now