replace xrange(0, n) with xrange(n)
authorMartin Geisler <mg@lazybytes.net>
Mon, 25 May 2009 23:06:11 +0200
changeset 8624 2b3dec0ef3ae
parent 8623 0c159aa7b329
child 8625 34754aa62cd8
replace xrange(0, n) with xrange(n)
hgext/color.py
hgext/hgk.py
hgext/mq.py
mercurial/repair.py
mercurial/revlog.py
--- a/hgext/color.py	Mon May 25 22:54:16 2009 +0200
+++ b/hgext/color.py	Mon May 25 23:06:11 2009 +0200
@@ -116,7 +116,7 @@
         lines = lines_with_status
 
     # apply color to output and display it
-    for i in xrange(0, len(lines)):
+    for i in xrange(len(lines)):
         status = _status_abbreviations[lines_with_status[i][0]]
         effects = _status_effects[status]
         if effects:
--- a/hgext/hgk.py	Mon May 25 22:54:16 2009 +0200
+++ b/hgext/hgk.py	Mon May 25 23:06:11 2009 +0200
@@ -188,7 +188,7 @@
             else:
                 i -= chunk
 
-            for x in xrange(0, chunk):
+            for x in xrange(chunk):
                 if i + x >= count:
                     l[chunk - x:] = [0] * (chunk - x)
                     break
--- a/hgext/mq.py	Mon May 25 22:54:16 2009 +0200
+++ b/hgext/mq.py	Mon May 25 23:06:11 2009 +0200
@@ -1407,7 +1407,7 @@
         series = []
         applied = []
         qpp = None
-        for i in xrange(0, len(lines)):
+        for i in xrange(len(lines)):
             if lines[i] == 'Patch Data:':
                 datastart = i + 1
             elif lines[i].startswith('Dirstate:'):
--- a/mercurial/repair.py	Mon May 25 22:54:16 2009 +0200
+++ b/mercurial/repair.py	Mon May 25 23:06:11 2009 +0200
@@ -36,7 +36,7 @@
         extra = []
         startrev = count = len(revlog)
         # find the truncation point of the revlog
-        for i in xrange(0, count):
+        for i in xrange(count):
             lrev = revlog.linkrev(i)
             if lrev >= link:
                 startrev = i + 1
--- a/mercurial/revlog.py	Mon May 25 22:54:16 2009 +0200
+++ b/mercurial/revlog.py	Mon May 25 23:06:11 2009 +0200
@@ -1162,7 +1162,7 @@
         revs.insert(0, p)
 
         # build deltas
-        for d in xrange(0, len(revs) - 1):
+        for d in xrange(len(revs) - 1):
             a, b = revs[d], revs[d + 1]
             nb = self.node(b)