changeset 20450:4f1aed2c7a7e

revset: added lazyset implementation bookmark revset
author Lucas Moscovicz <lmoscovicz@fb.com>
date Wed, 29 Jan 2014 15:23:16 -0800
parents ad2f1512eaa6
children ac7cebf45eb4
files mercurial/revset.py
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/revset.py	Mon Feb 03 16:02:48 2014 -0800
+++ b/mercurial/revset.py	Wed Jan 29 15:23:16 2014 -0800
@@ -391,7 +391,7 @@
             if not bmrev:
                 raise util.Abort(_("bookmark '%s' does not exist") % bm)
             bmrev = repo[bmrev].rev()
-            return baseset([r for r in subset if r == bmrev])
+            return lazyset(subset, lambda r: r == bmrev)
         else:
             matchrevs = set()
             for name, bmrev in repo._bookmarks.iteritems():
@@ -407,7 +407,7 @@
 
     bms = set([repo[r].rev()
                for r in repo._bookmarks.values()])
-    return baseset([r for r in subset if r in bms])
+    return lazyset(subset, lambda r: r in bms)
 
 def branch(repo, subset, x):
     """``branch(string or set)``