[PATCH 7 of 8] revset: added lazyset implementation to branchpoint revset

Lucas Moscovicz lmoscovicz at fb.com
Tue Feb 11 14:55:22 CST 2014


# HG changeset patch
# User Lucas Moscovicz <lmoscovicz at fb.com>
# Date 1391131291 28800
#      Thu Jan 30 17:21:31 2014 -0800
# Node ID d066984274ccaaabbc324a5ed18972ca08df9aec
# Parent  bd6b1d895339c2dfe98051653bc17fc23a0bb8c3
revset: added lazyset implementation to branchpoint revset

diff --git a/mercurial/revset.py b/mercurial/revset.py
--- a/mercurial/revset.py
+++ b/mercurial/revset.py
@@ -1009,7 +1009,7 @@
         for p in cl.parentrevs(r):
             if p >= baserev:
                 parentscount[p - baserev] += 1
-    return baseset([r for r in subset if (parentscount[r - baserev] > 1)])
+    return lazyset(subset, lambda r: parentscount[r - baserev] > 1)
 
 def minrev(repo, subset, x):
     """``min(set)``


More information about the Mercurial-devel mailing list