Removed now obsolete min/max check in walkchangerevs().
authorThomas Arendsen Hein <thomas@intevation.de>
Thu, 23 Feb 2006 22:47:40 +0100
changeset 1800 414e81ae971f
parent 1799 b942f5cfd326
child 1801 38e19b1d3de8
child 1896 f8f818a04f5b
Removed now obsolete min/max check in walkchangerevs().
mercurial/commands.py
--- 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()