Skip to content
Snippets Groups Projects
Commit 2888d12b authored by Augie Fackler's avatar Augie Fackler
Browse files

tests: fix up uses of xrange in remotefilelog tests for py3

Differential Revision: https://phab.mercurial-scm.org/D5604
parent 29996f6c
Branches
Tags
No related merge requests found
......@@ -18,6 +18,8 @@
> import os
> import shutil
> import sys
> if sys.version_info[0] > 2:
> xrange = range
> f = open('$TESTTMP/cachelog.log', 'w')
> srccache = os.path.join('$TESTTMP', 'oldhgcache')
> def log(message):
......
......@@ -18,6 +18,7 @@
sys.path[0:0] = [os.path.join(os.path.dirname(__file__), '..')]
from mercurial.node import nullid
from mercurial import (
pycompat,
ui as uimod,
)
from hgext.remotefilelog import (
......@@ -245,7 +246,7 @@
revisions = []
blobs = {}
total = basepack.SMALLFANOUTCUTOFF + 1
for i in xrange(total):
for i in pycompat.xrange(total):
filename = "filename-%s" % i
content = filename
node = self.getHash(content)
......@@ -328,7 +329,7 @@
]
for packsize in packsizes:
revisions = []
for i in xrange(packsize):
for i in pycompat.xrange(packsize):
filename = "filename-%s" % i
content = "content-%s" % i
node = self.getHash(content)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment