contrib: use pycompat.xrange in bdiff-torture.py
authorGregory Szorc <gregory.szorc@gmail.com>
Sun, 29 Sep 2019 12:25:29 -0700
changeset 43011 e05c141511dd
parent 43010 5f8b6617e962
child 43012 d75142ef054a
contrib: use pycompat.xrange in bdiff-torture.py For Python 3 compatibility. Differential Revision: https://phab.mercurial-scm.org/D6920
contrib/bdiff-torture.py
--- a/contrib/bdiff-torture.py	Sun Sep 29 12:22:21 2019 -0700
+++ b/contrib/bdiff-torture.py	Sun Sep 29 12:25:29 2019 -0700
@@ -6,6 +6,7 @@
 
 from mercurial import (
     mdiff,
+    pycompat,
 )
 
 def reducetest(a, b):
@@ -63,7 +64,7 @@
 def rndtest(size, noise):
     a = []
     src = "                aaaaaaaabbbbccd"
-    for x in xrange(size):
+    for x in pycompat.xrange(size):
         a.append(src[random.randint(0, len(src) - 1)])
 
     while True: