Mercurial > hg-stable
changeset 20449:ad2f1512eaa6
revset: added lazyset implementation to date revset
Performance Benchmarking:
$ time hg log -qr "first(date(05/03/2005))"
0:9117c6561b0b
real 0m3.157s
user 0m2.994s
sys 0m0.087s
$ time ./hg log -qr "first(date(05/03/2005))"
0:9117c6561b0b
real 0m0.509s
user 0m0.289s
sys 0m0.070s
author | Lucas Moscovicz <lmoscovicz@fb.com> |
---|---|
date | Mon, 03 Feb 2014 16:02:48 -0800 |
parents | 92f6f2db3cf4 |
children | 4f1aed2c7a7e |
files | mercurial/revset.py |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/revset.py Wed Jan 29 09:22:31 2014 -0800 +++ b/mercurial/revset.py Mon Feb 03 16:02:48 2014 -0800 @@ -582,7 +582,7 @@ # i18n: "date" is a keyword ds = getstring(x, _("date requires a string")) dm = util.matchdate(ds) - return baseset([r for r in subset if dm(repo[r].date()[0])]) + return lazyset(subset, lambda x: dm(repo[x].date()[0])) def desc(repo, subset, x): """``desc(string)``