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

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

Comments

Lucas Moscovicz - Feb. 12, 2014, 6:02 p.m.
# HG changeset patch
# User Lucas Moscovicz <lmoscovicz@fb.com>
# Date 1391704315 28800
#      Thu Feb 06 08:31:55 2014 -0800
# Node ID cfebd662efcdc61deee15507d2bed238d417c519
# Parent  5babcd02ce5180e2bf58b9d9e90d2af6d35bd38b
revset: added lazyset implementation to closed revset

Patch

diff --git a/mercurial/revset.py b/mercurial/revset.py
--- a/mercurial/revset.py
+++ b/mercurial/revset.py
@@ -522,7 +522,7 @@ 
     """
     # i18n: "closed" is a keyword
     getargs(x, 0, 0, _("closed takes no arguments"))
-    return baseset([r for r in subset if repo[r].closesbranch()])
+    return lazyset(subset, lambda r: repo[r].closesbranch())
 
 def contains(repo, subset, x):
     """``contains(pattern)``