[PATCH 8 of 8] revset: added lazyset implementation to ancestorspec revset

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


# HG changeset patch
# User Lucas Moscovicz <lmoscovicz at fb.com>
# Date 1391704146 28800
#      Thu Feb 06 08:29:06 2014 -0800
# Node ID bb1982623c024de93176abdc948cf0f406b81290
# Parent  a3511bebf9907e660721a370bda20c1a8b6aacae
revset: added lazyset implementation to ancestorspec revset

diff --git a/mercurial/revset.py b/mercurial/revset.py
--- a/mercurial/revset.py
+++ b/mercurial/revset.py
@@ -338,7 +338,7 @@
         for i in range(n):
             r = cl.parentrevs(r)[0]
         ps.add(r)
-    return baseset([r for r in subset if r in ps])
+    return lazyset(subset, lambda r: r in ps)
 
 def author(repo, subset, x):
     """``author(string)``


More information about the Mercurial-devel mailing list