diff mercurial/pvec.py @ 49284:d44e3c45f0e4

py3: replace `pycompat.xrange` by `range`
author Manuel Jacob <me@manueljacob.de>
date Sun, 29 May 2022 15:17:27 +0200
parents 642e31cb55f0
children d718eddf01d9
line wrap: on
line diff
--- a/mercurial/pvec.py	Sun May 29 12:38:54 2022 +0200
+++ b/mercurial/pvec.py	Sun May 29 15:17:27 2022 +0200
@@ -75,7 +75,7 @@
 def _str(v, l):
     # type: (int, int) -> bytes
     bs = b""
-    for p in pycompat.xrange(l):
+    for p in range(l):
         bs = pycompat.bytechr(v & 255) + bs
         v >>= 8
     return bs
@@ -99,7 +99,7 @@
     return c
 
 
-_htab = [_hweight(x) for x in pycompat.xrange(256)]
+_htab = [_hweight(x) for x in range(256)]
 
 
 def _hamming(a, b):
@@ -164,7 +164,7 @@
     pvc = r._pveccache
     if ctx.rev() not in pvc:
         cl = r.changelog
-        for n in pycompat.xrange(ctx.rev() + 1):
+        for n in range(ctx.rev() + 1):
             if n not in pvc:
                 node = cl.node(n)
                 p1, p2 = cl.parentrevs(n)