Mercurial > public > mercurial-scm > hg
comparison mercurial/revset.py @ 23004:30b602b2c340
revset-only: use `subset &` instead of filtering
The & version is more likely to be optimised.
only(.)
before) wall 0.003216 comb 0.000000 user 0.000000 sys 0.000000 (best of 768)
after) wall 0.001086 comb 0.000000 user 0.000000 sys 0.000000 (best of 2231)
only(default, stable)
before) wall 0.018469 comb 0.020000 user 0.020000 sys 0.000000 (best of 138)
after) wall 0.015888 comb 0.010000 user 0.010000 sys 0.000000 (best of 156)
author | Pierre-Yves David <pierre-yves.david@fb.com> |
---|---|
date | Fri, 10 Oct 2014 17:28:18 -0700 |
parents | 62d19ce9d7b6 |
children | 9bfe68357c01 |
comparison
equal
deleted
inserted
replaced
23003:62d19ce9d7b6 | 23004:30b602b2c340 |
---|---|
406 if not rev in descendants and not rev in include] | 406 if not rev in descendants and not rev in include] |
407 else: | 407 else: |
408 exclude = getset(repo, spanset(repo), args[1]) | 408 exclude = getset(repo, spanset(repo), args[1]) |
409 | 409 |
410 results = set(ancestormod.missingancestors(include, exclude, cl.parentrevs)) | 410 results = set(ancestormod.missingancestors(include, exclude, cl.parentrevs)) |
411 return filteredset(subset, results.__contains__) | 411 return subset & results |
412 | 412 |
413 def bisect(repo, subset, x): | 413 def bisect(repo, subset, x): |
414 """``bisect(string)`` | 414 """``bisect(string)`` |
415 Changesets marked in the specified bisect status: | 415 Changesets marked in the specified bisect status: |
416 | 416 |