diff hgext/fastannotate/context.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 e586a7eb380a
line wrap: on
line diff
--- a/hgext/fastannotate/context.py	Sun May 29 12:38:54 2022 +0200
+++ b/hgext/fastannotate/context.py	Sun May 29 15:17:27 2022 +0200
@@ -75,7 +75,7 @@
     linecount = text.count(b'\n')
     if text and not text.endswith(b'\n'):
         linecount += 1
-    return ([(fctx, i) for i in pycompat.xrange(linecount)], text)
+    return ([(fctx, i) for i in range(linecount)], text)
 
 
 # extracted from mercurial.context.basefilectx.annotate. slightly modified
@@ -577,7 +577,7 @@
         result = [None] * len(annotateresult)
         # {(rev, linenum): [lineindex]}
         key2idxs = collections.defaultdict(list)
-        for i in pycompat.xrange(len(result)):
+        for i in range(len(result)):
             key2idxs[(revs[i], annotateresult[i][1])].append(i)
         while key2idxs:
             # find an unresolved line and its linelog rev to annotate