# HG changeset patch # User Gregory Szorc # Date 1569785129 25200 # Node ID e05c141511dd72563546d36a8fb666ff7086fabc # Parent 5f8b6617e962f5397016bfb1965007a21994ffc0 contrib: use pycompat.xrange in bdiff-torture.py For Python 3 compatibility. Differential Revision: https://phab.mercurial-scm.org/D6920 diff -r 5f8b6617e962 -r e05c141511dd 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: