comparison hgext/convert/cvsps.py @ 38783:e7aa113b14f7

global: use pycompat.xrange() On Python 3, our module importer automatically rewrites xrange() to pycompat.xrange(). We want to move away from the custom importer on Python 3. This commit converts all instances of xrange() to use pycompat.xrange(). Differential Revision: https://phab.mercurial-scm.org/D4032
author Gregory Szorc <gregory.szorc@gmail.com>
date Wed, 01 Aug 2018 13:00:45 -0700
parents bec815f991b0
children bd3f03d8cc9f
comparison
equal deleted inserted replaced
38782:7eba8f83129b 38783:e7aa113b14f7
761 # first changeset on a new branch 761 # first changeset on a new branch
762 # the parent is a changeset with the branch in its 762 # the parent is a changeset with the branch in its
763 # branchpoints such that it is the latest possible 763 # branchpoints such that it is the latest possible
764 # commit without any intervening, unrelated commits. 764 # commit without any intervening, unrelated commits.
765 765
766 for candidate in xrange(i): 766 for candidate in pycompat.xrange(i):
767 if c.branch not in changesets[candidate].branchpoints: 767 if c.branch not in changesets[candidate].branchpoints:
768 if p is not None: 768 if p is not None:
769 break 769 break
770 continue 770 continue
771 p = candidate 771 p = candidate