Mercurial > public > mercurial-scm > hg-stable
diff mercurial/linelog.py @ 49292: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 | 011eec5a66b2 |
line wrap: on
line diff
--- a/mercurial/linelog.py Sun May 29 12:38:54 2022 +0200 +++ b/mercurial/linelog.py Sun May 29 15:17:27 2022 +0200 @@ -293,7 +293,7 @@ % (expected, numentries) ) instructions = [_eof(0, 0)] - for offset in pycompat.xrange(1, numentries): + for offset in range(1, numentries): instructions.append(_decodeone(buf, offset * _llentry.size)) return cls(instructions, maxrev=maxrev) @@ -349,7 +349,7 @@ tgt = oldproglen + (b2 - b1 + 1) # Jump to skip the insert if we're at an older revision. appendinst(_jl(rev, tgt)) - for linenum in pycompat.xrange(b1, b2): + for linenum in range(b1, b2): if _internal_blines is None: bappend(lineinfo(rev, linenum, programlen())) appendinst(_line(rev, linenum)) @@ -447,7 +447,7 @@ # only take as many steps as there are instructions in the # program - if we don't find an EOF or our stop-line before # then, something is badly broken. - for step in pycompat.xrange(len(self._program)): + for step in range(len(self._program)): inst = self._program[pc] nextpc = pc + 1 if isinstance(inst, _jump):