diff hgext/histedit.py @ 38783:e7aa113b14f7

global: use pycompat.xrange() On Python 3, our module importer automatically rewrites xrange() to pycompat.xrange(). We want to move away from the custom importer on Python 3. This commit converts all instances of xrange() to use pycompat.xrange(). Differential Revision: https://phab.mercurial-scm.org/D4032
author Gregory Szorc <gregory.szorc@gmail.com>
date Wed, 01 Aug 2018 13:00:45 -0700
parents faea9b1980d9
children 28d8b5f49b4d
line wrap: on
line diff
--- a/hgext/histedit.py	Wed Aug 01 12:57:15 2018 -0700
+++ b/hgext/histedit.py	Wed Aug 01 13:00:45 2018 -0700
@@ -386,7 +386,7 @@
         rules = []
         rulelen = int(lines[index])
         index += 1
-        for i in xrange(rulelen):
+        for i in pycompat.xrange(rulelen):
             ruleaction = lines[index]
             index += 1
             rule = lines[index]
@@ -397,7 +397,7 @@
         replacements = []
         replacementlen = int(lines[index])
         index += 1
-        for i in xrange(replacementlen):
+        for i in pycompat.xrange(replacementlen):
             replacement = lines[index]
             original = node.bin(replacement[:40])
             succ = [node.bin(replacement[i:i + 40]) for i in