changeset 43009:e05c141511dd

contrib: use pycompat.xrange in bdiff-torture.py For Python 3 compatibility. Differential Revision: https://phab.mercurial-scm.org/D6920
author Gregory Szorc <gregory.szorc@gmail.com>
date Sun, 29 Sep 2019 12:25:29 -0700
parents 5f8b6617e962
children d75142ef054a
files contrib/bdiff-torture.py
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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: