Mercurial > public > mercurial-scm > hg
diff hgext/fastannotate/revmap.py @ 49284:d44e3c45f0e4
py3: replace `pycompat.xrange` by `range`
author | Manuel Jacob <me@manueljacob.de> |
---|---|
date | Sun, 29 May 2022 15:17:27 +0200 |
parents | 642e31cb55f0 |
children | f4733654f144 |
line wrap: on
line diff
--- a/hgext/fastannotate/revmap.py Sun May 29 12:38:54 2022 +0200 +++ b/hgext/fastannotate/revmap.py Sun May 29 15:17:27 2022 +0200 @@ -15,7 +15,6 @@ from mercurial.pycompat import open from mercurial import ( error as hgerror, - pycompat, ) from . import error @@ -165,13 +164,11 @@ if self._lastmaxrev == -1: # write the entire file with open(self.path, b'wb') as f: f.write(self.HEADER) - for i in pycompat.xrange(1, len(self._rev2hsh)): + for i in range(1, len(self._rev2hsh)): self._writerev(i, f) else: # append incrementally with open(self.path, b'ab') as f: - for i in pycompat.xrange( - self._lastmaxrev + 1, len(self._rev2hsh) - ): + for i in range(self._lastmaxrev + 1, len(self._rev2hsh)): self._writerev(i, f) self._lastmaxrev = self.maxrev