Patchwork [2,of,4] revset: added lazyset implementation to converted revset

login
register
mail settings
Submitter Lucas Moscovicz
Date Feb. 12, 2014, 6:02 p.m.
Message ID <4b2319544ef21281d145.1392228153@dev1037.prn2.facebook.com>
Download mbox | patch
Permalink /patch/3614/
State Accepted
Commit ada89e5b5b0cbde0e646b0eed86813747a0d2db2
Headers show

Comments

Lucas Moscovicz - Feb. 12, 2014, 6:02 p.m.
# HG changeset patch
# User Lucas Moscovicz <lmoscovicz@fb.com>
# Date 1391704360 28800
#      Thu Feb 06 08:32:40 2014 -0800
# Node ID 4b2319544ef21281d14548b0c8303cfcd219d836
# Parent  cfebd662efcdc61deee15507d2bed238d417c519
revset: added lazyset implementation to converted revset

Patch

diff --git a/mercurial/revset.py b/mercurial/revset.py
--- a/mercurial/revset.py
+++ b/mercurial/revset.py
@@ -571,7 +571,7 @@ 
         source = repo[r].extra().get('convert_revision', None)
         return source is not None and (rev is None or source.startswith(rev))
 
-    return baseset([r for r in subset if _matchvalue(r)])
+    return lazyset(subset, lambda r: _matchvalue(r))
 
 def date(repo, subset, x):
     """``date(interval)``