D4450: py3: alias xrange to range in tests/test-fastannotate-revmap.py
pulkit (Pulkit Goyal)
phabricator at mercurial-scm.org
Mon Sep 3 10:57:19 UTC 2018
pulkit created this revision.
Herald added subscribers: mercurial-devel, mjpieters.
Herald added a reviewer: hg-reviewers.
REVISION SUMMARY
xrange is not available on Python 3.
REPOSITORY
rHG Mercurial
REVISION DETAIL
https://phab.mercurial-scm.org/D4450
AFFECTED FILES
tests/test-fastannotate-revmap.py
CHANGE DETAILS
diff --git a/tests/test-fastannotate-revmap.py b/tests/test-fastannotate-revmap.py
--- a/tests/test-fastannotate-revmap.py
+++ b/tests/test-fastannotate-revmap.py
@@ -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
To: pulkit, #hg-reviewers
Cc: mjpieters, mercurial-devel
More information about the Mercurial-devel
mailing list