Mercurial > public > mercurial-scm > hg
diff mercurial/diffhelper.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 | 6000f5b25c9b |
children | f4733654f144 |
line wrap: on
line diff
--- a/mercurial/diffhelper.py Sun May 29 12:38:54 2022 +0200 +++ b/mercurial/diffhelper.py Sun May 29 15:17:27 2022 +0200 @@ -10,7 +10,6 @@ from . import ( error, - pycompat, ) MISSING_NEWLINE_MARKER = b'\\ No newline at end of file\n' @@ -29,7 +28,7 @@ num = max(todoa, todob) if num == 0: break - for i in pycompat.xrange(num): + for i in range(num): s = fp.readline() if not s: raise error.ParseError(_(b'incomplete hunk')) @@ -76,7 +75,7 @@ blen = len(b) if alen > blen - bstart or bstart < 0: return False - for i in pycompat.xrange(alen): + for i in range(alen): if a[i][1:] != b[i + bstart]: return False return True