[PATCH 6 of 8] revset: added lazyset implementation to secret revset

Lucas Moscovicz lmoscovicz at fb.com
Tue Feb 11 15:54:44 CST 2014


# HG changeset patch
# User Lucas Moscovicz <lmoscovicz at fb.com>
# Date 1391534959 28800
#      Tue Feb 04 09:29:19 2014 -0800
# Node ID af218c860f211d0854f682fa6a728cd9debccee4
# Parent  a8a52182a974dbc41acb911ffd8feb7b1c77077b
revset: added lazyset implementation to secret revset

diff --git a/mercurial/revset.py b/mercurial/revset.py
--- a/mercurial/revset.py
+++ b/mercurial/revset.py
@@ -1401,7 +1401,7 @@
     # i18n: "secret" is a keyword
     getargs(x, 0, 0, _("secret takes no arguments"))
     pc = repo._phasecache
-    return baseset([r for r in subset if pc.phase(repo, r) == phases.secret])
+    return lazyset(subset, lambda x: pc.phase(repo, x) == phases.secret)
 
 def sort(repo, subset, x):
     """``sort(set[, [-]key...])``


More information about the Mercurial-devel mailing list