Mercurial > hg-stable
changeset 23003:62d19ce9d7b6
revset-_ancestor: use & instead of filter
The & operation is more likely optimised.
::10
before) wall 0.028189 comb 0.030000 user 0.030000 sys 0.000000 (best of 100)
after) wall 0.001050 comb 0.000000 user 0.000000 sys 0.000000 (best of 2326)
::tip
before) wall 0.081132 comb 0.080000 user 0.080000 sys 0.000000 (best of 100)
after) wall 0.055418 comb 0.050000 user 0.050000 sys 0.000000 (best of 100)
author | Pierre-Yves David <pierre-yves.david@fb.com> |
---|---|
date | Tue, 30 Sep 2014 15:03:54 -0500 |
parents | 2920a96f5839 |
children | 30b602b2c340 |
files | mercurial/revset.py |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/revset.py Thu Oct 16 14:46:37 2014 -0700 +++ b/mercurial/revset.py Tue Sep 30 15:03:54 2014 -0500 @@ -347,7 +347,7 @@ if not heads: return baseset() s = _revancestors(repo, heads, followfirst) - return subset.filter(s.__contains__) + return subset & s def ancestors(repo, subset, x): """``ancestors(set)``