Mercurial > hg
diff mercurial/wireprotov1peer.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 | aa9dd805234d |
children | f15a587d2dfc |
line wrap: on
line diff
--- a/mercurial/wireprotov1peer.py Wed Aug 01 12:57:15 2018 -0700 +++ b/mercurial/wireprotov1peer.py Wed Aug 01 13:00:45 2018 -0700 @@ -497,7 +497,7 @@ def between(self, pairs): batch = 8 # avoid giant requests r = [] - for i in xrange(0, len(pairs), batch): + for i in pycompat.xrange(0, len(pairs), batch): n = " ".join([wireprototypes.encodelist(p, '-') for p in pairs[i:i + batch]]) d = self._call("between", pairs=n)