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

Lucas Moscovicz lmoscovicz at fb.com
Wed Feb 12 12:02:32 CST 2014


# HG changeset patch
# User Lucas Moscovicz <lmoscovicz at 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

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)``


More information about the Mercurial-devel mailing list