changeset 17992:c95210b82c0e

clfilter: remove usage of `range` and `xrange` in scmutil.revrange For changelog level filtering to take effect it need to be used for any iteration. This changeset removes usage of `range` and `xrange` that survived the first pass.
author Pierre-Yves David <pierre-yves.david@ens-lyon.org>
date Tue, 20 Nov 2012 19:05:46 +0100
parents d605a82cf189
children 1a6f8820eb71
files mercurial/scmutil.py
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/scmutil.py	Mon Nov 12 14:05:39 2012 -0800
+++ b/mercurial/scmutil.py	Tue Nov 20 19:05:46 2012 +0100
@@ -634,13 +634,13 @@
                 start, end = spec.split(_revrangesep, 1)
                 start = revfix(repo, start, 0)
                 end = revfix(repo, end, len(repo) - 1)
-                step = start > end and -1 or 1
+                rangeiter = repo.changelog.revs(start, end)
                 if not seen and not l:
                     # by far the most common case: revs = ["-1:0"]
-                    l = range(start, end + step, step)
+                    l = list(rangeiter)
                     # defer syncing seen until next iteration
                     continue
-                newrevs = set(xrange(start, end + step, step))
+                newrevs = set(rangeiter)
                 if seen:
                     newrevs.difference_update(seen)
                     seen.update(newrevs)