diff -r 7eba8f83129b -r e7aa113b14f7 mercurial/changegroup.py --- a/mercurial/changegroup.py Wed Aug 01 12:57:15 2018 -0700 +++ b/mercurial/changegroup.py Wed Aug 01 13:00:45 2018 -0700 @@ -325,7 +325,7 @@ cl = repo.changelog ml = repo.manifestlog # validate incoming csets have their manifests - for cset in xrange(clstart, clend): + for cset in pycompat.xrange(clstart, clend): mfnode = cl.changelogrevision(cset).manifest mfest = ml[mfnode].readdelta() # store file cgnodes we must see @@ -367,7 +367,7 @@ repo.hook('pretxnchangegroup', throw=True, **pycompat.strkwargs(hookargs)) - added = [cl.node(r) for r in xrange(clstart, clend)] + added = [cl.node(r) for r in pycompat.xrange(clstart, clend)] phaseall = None if srctype in ('push', 'serve'): # Old servers can not push the boundary themselves. @@ -568,7 +568,7 @@ if units is not None: progress = self._repo.ui.makeprogress(_('bundling'), unit=units, total=(len(revs) - 1)) - for r in xrange(len(revs) - 1): + for r in pycompat.xrange(len(revs) - 1): if progress: progress.update(r + 1) prev, curr = revs[r], revs[r + 1] @@ -989,7 +989,7 @@ revisions += len(fl) - o if f in needfiles: needs = needfiles[f] - for new in xrange(o, len(fl)): + for new in pycompat.xrange(o, len(fl)): n = fl.node(new) if n in needs: needs.remove(n)