comparison mercurial/revset.py @ 25553:fa2e91d00e4c

revset: mark spot that feeds a set to a baseset Sets have non-defined order and this should break stuff, but as we are lucky fullreposet is also broken so the result is "not too bad". We should fix it anyway, but it is too much for my current plate.
author Pierre-Yves David <pierre-yves.david@fb.com>
date Thu, 11 Jun 2015 15:43:11 -0700
parents 4644e991a12a
children 94441df6206c
comparison
equal deleted inserted replaced
25552:4644e991a12a 25553:fa2e91d00e4c
625 if r <= minrev: 625 if r <= minrev:
626 continue 626 continue
627 for p in pr(r): 627 for p in pr(r):
628 if p in parentset: 628 if p in parentset:
629 cs.add(r) 629 cs.add(r)
630 # XXX using a set to feed the baseset is wrong. Sets are not ordered.
631 # This does not break because of other fullreposet misbehavior.
630 return baseset(cs) 632 return baseset(cs)
631 633
632 def children(repo, subset, x): 634 def children(repo, subset, x):
633 """``children(set)`` 635 """``children(set)``
634 Child changesets of changesets in set. 636 Child changesets of changesets in set.
1103 # i18n: "head" is a keyword 1105 # i18n: "head" is a keyword
1104 getargs(x, 0, 0, _("head takes no arguments")) 1106 getargs(x, 0, 0, _("head takes no arguments"))
1105 hs = set() 1107 hs = set()
1106 for b, ls in repo.branchmap().iteritems(): 1108 for b, ls in repo.branchmap().iteritems():
1107 hs.update(repo[h].rev() for h in ls) 1109 hs.update(repo[h].rev() for h in ls)
1110 # XXX using a set to feed the baseset is wrong. Sets are not ordered.
1111 # This does not break because of other fullreposet misbehavior.
1108 # XXX We should not be using '.filter' here, but combines subset with '&' 1112 # XXX We should not be using '.filter' here, but combines subset with '&'
1109 # XXX We should combine with subset first: 'subset & baseset(...)'. This is 1113 # XXX We should combine with subset first: 'subset & baseset(...)'. This is
1110 # necessary to ensure we preserve the order in subset. 1114 # necessary to ensure we preserve the order in subset.
1111 return baseset(hs).filter(subset.__contains__) 1115 return baseset(hs).filter(subset.__contains__)
1112 1116