changeset 1800:414e81ae971f

Removed now obsolete min/max check in walkchangerevs().
author Thomas Arendsen Hein <thomas@intevation.de>
date Thu, 23 Feb 2006 22:47:40 +0100
parents b942f5cfd326
children 38e19b1d3de8 f8f818a04f5b
files mercurial/commands.py
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/commands.py	Thu Feb 23 22:37:29 2006 +0100
+++ b/mercurial/commands.py	Thu Feb 23 22:47:40 2006 +0100
@@ -122,7 +122,7 @@
         def filerevgen(filelog):
             for i, window in increasing_windows(filelog.count()-1, -1):
                 revs = []
-                for j in xrange(max(0, i - window), i + 1):
+                for j in xrange(i - window, i + 1):
                     revs.append(filelog.linkrev(filelog.node(j)))
                 revs.reverse()
                 for rev in revs:
@@ -147,7 +147,7 @@
         # The slow path checks files modified in every changeset.
         def changerevgen():
             for i, window in increasing_windows(repo.changelog.count()-1, -1):
-                for j in xrange(max(0, i - window), i + 1):
+                for j in xrange(i - window, i + 1):
                     yield j, getchange(j)[3]
 
         for rev, changefiles in changerevgen():
@@ -159,7 +159,7 @@
     def iterate():
         for i, window in increasing_windows(0, len(revs)):
             yield 'window', revs[0] < revs[-1], revs[-1]
-            nrevs = [rev for rev in revs[i:min(i+window, len(revs))]
+            nrevs = [rev for rev in revs[i:i+window]
                      if rev in wanted]
             srevs = list(nrevs)
             srevs.sort()