changeset 39434:aa95fd0257df

py3: alias xrange to range in tests/test-fastannotate-revmap.py xrange is not available on Python 3. Differential Revision: https://phab.mercurial-scm.org/D4450
author Pulkit Goyal <pulkit@yandex-team.ru>
date Mon, 03 Sep 2018 13:53:30 +0300
parents b3572f733dbd
children c7f213d7f4d2
files tests/test-fastannotate-revmap.py
diffstat 1 files changed, 8 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/tests/test-fastannotate-revmap.py	Mon Sep 03 13:52:49 2018 +0300
+++ b/tests/test-fastannotate-revmap.py	Mon Sep 03 13:53:30 2018 +0300
@@ -3,9 +3,16 @@
 import os
 import tempfile
 
-from mercurial import util
+from mercurial import (
+    pycompat,
+    util,
+)
+
 from hgext.fastannotate import error, revmap
 
+if pycompat.ispy3:
+    xrange = range
+
 def genhsh(i):
     return chr(i) + b'\0' * 19