diff -r 7eba8f83129b -r e7aa113b14f7 mercurial/streamclone.py --- a/mercurial/streamclone.py Wed Aug 01 12:57:15 2018 -0700 +++ b/mercurial/streamclone.py Wed Aug 01 13:00:45 2018 -0700 @@ -358,7 +358,7 @@ with repo.transaction('clone'): with repo.svfs.backgroundclosing(repo.ui, expectedcount=filecount): - for i in xrange(filecount): + for i in pycompat.xrange(filecount): # XXX doesn't support '\n' or '\r' in filenames l = fp.readline() try: