changeset 17804:5a511d255301

clfilter: remove use of xrange in revset For changelog level filtering to take effect it need to be used for any iteration. Some remaining use of `xrange` in revset code is replace by proper use of `changelog.revs` or direct iteration over changelog.
author Pierre-Yves David <pierre-yves.david@ens-lyon.org>
date Mon, 08 Oct 2012 15:54:53 +0200
parents 1479572db256
children 21c93988ca70
files mercurial/revset.py
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/revset.py	Mon Oct 08 15:41:58 2012 +0200
+++ b/mercurial/revset.py	Mon Oct 08 15:54:53 2012 +0200
@@ -41,7 +41,7 @@
         return
 
     seen = set(revs)
-    for i in xrange(first + 1, len(cl)):
+    for i in cl.revs(first + 1):
         for x in cl.parentrevs(i)[:cut]:
             if x != nullrev and x in seen:
                 seen.add(i)
@@ -1209,7 +1209,7 @@
     # i18n: "matching" is a keyword
     l = getargs(x, 1, 2, _("matching takes 1 or 2 arguments"))
 
-    revs = getset(repo, xrange(len(repo)), l[0])
+    revs = getset(repo, repo.changelog, l[0])
 
     fieldlist = ['metadata']
     if len(l) > 1:
@@ -1307,7 +1307,7 @@
     """``roots(set)``
     Changesets in set with no parent changeset in set.
     """
-    s = set(getset(repo, xrange(len(repo)), x))
+    s = set(getset(repo, repo.changelog, x))
     subset = [r for r in subset if r in s]
     cs = _children(repo, subset, s)
     return [r for r in subset if r not in cs]