[PATCH 06 of 11] revset: use `subset &` in `filelog`

Pierre-Yves David pierre-yves.david at ens-lyon.org
Tue Sep 23 22:47:52 UTC 2014


# HG changeset patch
# User Pierre-Yves David <pierre-yves.david at fb.com>
# Date 1410976730 25200
#      Wed Sep 17 10:58:50 2014 -0700
# Node ID b490e3c27abff630d7c5b6a69ae09d65394a4873
# Parent  f740a9975e010f8268684d08872b190fe0d59de5
revset: use `subset &` in `filelog`

This take advantage of the `fullreposet` smartness

revset #0: file(COPYING)
0) wall 3.179066 comb 3.180000 user 3.140000 sys 0.040000 (best of 3)
1) wall 2.723699 comb 2.730000 user 2.690000 sys 0.040000 (best of 4)

diff --git a/mercurial/revset.py b/mercurial/revset.py
--- a/mercurial/revset.py
+++ b/mercurial/revset.py
@@ -809,11 +809,11 @@ def filelog(repo, subset, x):
             if m(f):
                 fl = repo.file(f)
                 for fr in fl:
                     s.add(fl.linkrev(fr))
 
-    return subset.filter(s.__contains__)
+    return subset & s
 
 def first(repo, subset, x):
     """``first(set, [n])``
     An alias for limit().
     """



More information about the Mercurial-devel mailing list