diff hgext/hgk.py @ 3473:0e68608bd11d

use xrange instead of range
author Benoit Boissinot <benoit.boissinot@ens-lyon.org>
date Thu, 19 Oct 2006 14:16:51 +0200
parents eb0906ebba81
children 3b4e00cba57a
line wrap: on
line diff
--- a/hgext/hgk.py	Thu Oct 19 14:03:41 2006 +0200
+++ b/hgext/hgk.py	Thu Oct 19 14:16:51 2006 +0200
@@ -177,7 +177,7 @@
         if len(ar) == 0:
             return 1
         mask = 0
-        for i in range(len(ar)):
+        for i in xrange(len(ar)):
             if sha in reachable[i]:
                 mask |= 1 << i
 
@@ -190,7 +190,7 @@
 
     # figure out which commits they are asking for and which ones they
     # want us to stop on
-    for i in range(len(args)):
+    for i in xrange(len(args)):
         if args[i].startswith('^'):
             s = repo.lookup(args[i][1:])
             stop_sha1.append(s)
@@ -199,7 +199,7 @@
             want_sha1.append(repo.lookup(args[i]))
 
     # calculate the graph for the supplied commits
-    for i in range(len(want_sha1)):
+    for i in xrange(len(want_sha1)):
         reachable.append({});
         n = want_sha1[i];
         visit = [n];