Mercurial > hg
changeset 22537:bbf4f3dfd700
revset: use `subset &` in `rev`
This takes advantage of the `fullreposet` smartness and yields a nice
speedup.
revset #0: rev(25)
0) wall 0.005480 comb 0.000000 user 0.000000 sys 0.000000 (best of 305)
1) wall 0.000052 comb 0.000000 user 0.000000 sys 0.000000 (best of 21891)
author | Pierre-Yves David <pierre-yves.david@fb.com> |
---|---|
date | Wed, 17 Sep 2014 11:00:09 -0700 |
parents | 8040a44aab1c |
children | a428db9ab61d |
files | mercurial/revset.py |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/revset.py Wed Sep 17 19:52:34 2014 -0700 +++ b/mercurial/revset.py Wed Sep 17 11:00:09 2014 -0700 @@ -1346,7 +1346,7 @@ except (TypeError, ValueError): # i18n: "rev" is a keyword raise error.ParseError(_("rev expects a number")) - return subset.filter(lambda r: r == l) + return subset & baseset([l]) def matching(repo, subset, x): """``matching(revision [, field])``