Patchwork [3,of,8] revset: added lazyset implementation to draft revset

login
register
mail settings
Submitter Lucas Moscovicz
Date Feb. 11, 2014, 8:55 p.m.
Message ID <59c42d99bcfdd22636b4.1392152118@dev1037.prn2.facebook.com>
Download mbox | patch
Permalink /patch/3575/
State Accepted
Commit ac7cebf45eb46a8da6c4ccd73cc75efb211820a1
Headers show

Comments

Lucas Moscovicz - Feb. 11, 2014, 8:55 p.m.
# HG changeset patch
# User Lucas Moscovicz <lmoscovicz@fb.com>
# Date 1391472925 28800
#      Mon Feb 03 16:15:25 2014 -0800
# Node ID 59c42d99bcfdd22636b43dd6beced0e194bf8bf8
# Parent  61bc268f1a6de48f034b049f75f276d7ad67226c
revset: added lazyset implementation to draft revset

Patch

diff --git a/mercurial/revset.py b/mercurial/revset.py
--- a/mercurial/revset.py
+++ b/mercurial/revset.py
@@ -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()``