comparison mercurial/httppeer.py @ 38783:e7aa113b14f7

global: use pycompat.xrange() On Python 3, our module importer automatically rewrites xrange() to pycompat.xrange(). We want to move away from the custom importer on Python 3. This commit converts all instances of xrange() to use pycompat.xrange(). Differential Revision: https://phab.mercurial-scm.org/D4032
author Gregory Szorc <gregory.szorc@gmail.com>
date Wed, 01 Aug 2018 13:00:45 -0700
parents 2279d90eed9a
children 3fe028b657bf
comparison
equal deleted inserted replaced
38782:7eba8f83129b 38783:e7aa113b14f7
62 # instead of a carriage return. 62 # instead of a carriage return.
63 valuelen = limit - len(fmt % r'000') - len(': \r\n') 63 valuelen = limit - len(fmt % r'000') - len(': \r\n')
64 result = [] 64 result = []
65 65
66 n = 0 66 n = 0
67 for i in xrange(0, len(value), valuelen): 67 for i in pycompat.xrange(0, len(value), valuelen):
68 n += 1 68 n += 1
69 result.append((fmt % str(n), pycompat.strurl(value[i:i + valuelen]))) 69 result.append((fmt % str(n), pycompat.strurl(value[i:i + valuelen])))
70 70
71 return result 71 return result
72 72