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

login
register
mail settings
Submitter Lucas Moscovicz
Date Feb. 12, 2014, 6:02 p.m.
Message ID <74e1958b997d3f6eb6d6.1392228155@dev1037.prn2.facebook.com>
Download mbox | patch
Permalink /patch/3616/
State Accepted
Commit a5d7081a4c3457bd2e64ceff0d19657fffa58ee9
Headers show

Comments

Lucas Moscovicz - Feb. 12, 2014, 6:02 p.m.
# HG changeset patch
# User Lucas Moscovicz <lmoscovicz@fb.com>
# Date 1391704571 28800
#      Thu Feb 06 08:36:11 2014 -0800
# Node ID 74e1958b997d3f6eb6d698b39c1256b8c4444630
# Parent  90e180dce71d252f438f9dc9405e3c69687bb48e
revset: added lazyset implementation to extra revset

Patch

diff --git a/mercurial/revset.py b/mercurial/revset.py
--- a/mercurial/revset.py
+++ b/mercurial/revset.py
@@ -708,7 +708,7 @@ 
         extra = repo[r].extra()
         return label in extra and (value is None or matcher(extra[label]))
 
-    return baseset([r for r in subset if _matchvalue(r)])
+    return lazyset(subset, lambda r: _matchvalue(r))
 
 def filelog(repo, subset, x):
     """``filelog(pattern)``