changeset 20451:ac7cebf45eb4

revset: added lazyset implementation to draft revset
author Lucas Moscovicz <lmoscovicz@fb.com>
date Mon, 03 Feb 2014 16:15:25 -0800
parents 4f1aed2c7a7e
children a685d9870eb5
files mercurial/revset.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/revset.py	Wed Jan 29 15:23:16 2014 -0800
+++ b/mercurial/revset.py	Mon Feb 03 16:15:25 2014 -0800
@@ -674,7 +674,7 @@
     # i18n: "draft" is a keyword
     getargs(x, 0, 0, _("draft takes no arguments"))
     pc = repo._phasecache
-    return baseset([r for r in subset if pc.phase(repo, r) == phases.draft])
+    return lazyset(subset, lambda r: pc.phase(repo, r) == phases.draft)
 
 def extinct(repo, subset, x):
     """``extinct()``