comparison mercurial/revset.py @ 22712:093df3b77f27

revert: bring back usage of `subset & ps` in `parents` Changeset 95af98616aa7 switched the order of the operand of the "&" computation to work around an issue from repo-wide spanset. The need for a workaround has been alleviated by the introduction of `fullreposet`. So we restore it to normal. The benchmark shows no significant changes as expected. We also revert the bogus test change introduced by 95af98616aa7. The order is actually important.
author Pierre-Yves David <pierre-yves.david@fb.com>
date Wed, 17 Sep 2014 04:55:55 -0700
parents 78c916f24dd9
children f5f51872883d
comparison
equal deleted inserted replaced
22711:60ac52a21512 22712:093df3b77f27
1240 ps = set() 1240 ps = set()
1241 cl = repo.changelog 1241 cl = repo.changelog
1242 for r in getset(repo, spanset(repo), x): 1242 for r in getset(repo, spanset(repo), x):
1243 ps.update(cl.parentrevs(r)) 1243 ps.update(cl.parentrevs(r))
1244 ps -= set([node.nullrev]) 1244 ps -= set([node.nullrev])
1245 return baseset(ps) & subset 1245 return subset & ps
1246 1246
1247 def parentspec(repo, subset, x, n): 1247 def parentspec(repo, subset, x, n):
1248 """``set^0`` 1248 """``set^0``
1249 The set. 1249 The set.
1250 ``set^1`` (or ``set^``), ``set^2`` 1250 ``set^1`` (or ``set^``), ``set^2``