# HG changeset patch # User Gregory Szorc # Date 2019-09-29 19:25:29 # 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 --git a/contrib/bdiff-torture.py b/contrib/bdiff-torture.py --- a/contrib/bdiff-torture.py +++ b/contrib/bdiff-torture.py @@ -6,6 +6,7 @@ import sys from mercurial import ( mdiff, + pycompat, ) def reducetest(a, b): @@ -63,7 +64,7 @@ def test(a, b): 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: