Mercurial > hg
diff mercurial/dagop.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 | a0d88b021a98 |
line wrap: on
line diff
--- a/mercurial/dagop.py Sun May 29 12:38:54 2022 +0200 +++ b/mercurial/dagop.py Sun May 29 15:17:27 2022 +0200 @@ -203,7 +203,7 @@ def _builddescendantsmap(repo, startrev, followfirst): """Build map of 'rev -> child revs', offset from startrev""" cl = repo.changelog - descmap = [[] for _rev in pycompat.xrange(startrev, len(cl))] + descmap = [[] for _rev in range(startrev, len(cl))] for currev in cl.revs(startrev + 1): p1rev, p2rev = cl.parentrevs(currev) if p1rev >= startrev: @@ -725,7 +725,7 @@ for idx, (parent, blocks) in enumerate(pblocks): for (a1, a2, b1, b2), _t in blocks: if a2 - a1 >= b2 - b1: - for bk in pycompat.xrange(b1, b2): + for bk in range(b1, b2): if child.fctxs[bk] == childfctx: ak = min(a1 + (bk - b1), a2 - 1) child.fctxs[bk] = parent.fctxs[ak] @@ -738,7 +738,7 @@ # line. for parent, blocks in remaining: for a1, a2, b1, b2 in blocks: - for bk in pycompat.xrange(b1, b2): + for bk in range(b1, b2): if child.fctxs[bk] == childfctx: ak = min(a1 + (bk - b1), a2 - 1) child.fctxs[bk] = parent.fctxs[ak]