comparison mercurial/revset.py @ 25552:4644e991a12a

revset: mark the fact we should use '&' instead of 'filter' in 'head' I do not have time to fix all this now, let's mark it for later.
author Pierre-Yves David <pierre-yves.david@fb.com>
date Thu, 11 Jun 2015 15:37:17 -0700
parents c1d163ce7394
children fa2e91d00e4c
comparison
equal deleted inserted replaced
25551:c1d163ce7394 25552:4644e991a12a
1103 # i18n: "head" is a keyword 1103 # i18n: "head" is a keyword
1104 getargs(x, 0, 0, _("head takes no arguments")) 1104 getargs(x, 0, 0, _("head takes no arguments"))
1105 hs = set() 1105 hs = set()
1106 for b, ls in repo.branchmap().iteritems(): 1106 for b, ls in repo.branchmap().iteritems():
1107 hs.update(repo[h].rev() for h in ls) 1107 hs.update(repo[h].rev() for h in ls)
1108 # XXX We should not be using '.filter' here, but combines subset with '&'
1108 # XXX We should combine with subset first: 'subset & baseset(...)'. This is 1109 # XXX We should combine with subset first: 'subset & baseset(...)'. This is
1109 # necessary to ensure we preserve the order in subset. 1110 # necessary to ensure we preserve the order in subset.
1110 return baseset(hs).filter(subset.__contains__) 1111 return baseset(hs).filter(subset.__contains__)
1111 1112
1112 def heads(repo, subset, x): 1113 def heads(repo, subset, x):