diff -r 7eba8f83129b -r e7aa113b14f7 mercurial/phases.py --- a/mercurial/phases.py Wed Aug 01 12:57:15 2018 -0700 +++ b/mercurial/phases.py Wed Aug 01 13:00:45 2018 -0700 @@ -374,7 +374,7 @@ changes = set() # set of revisions to be changed delroots = [] # set of root deleted by this path - for phase in xrange(targetphase + 1, len(allphases)): + for phase in pycompat.xrange(targetphase + 1, len(allphases)): # filter nodes that are not in a compatible phase already nodes = [n for n in nodes if self.phase(repo, repo[n].rev()) >= phase] @@ -420,7 +420,7 @@ affected = set(repo.revs('(%ln::) - (%ln::)', new, old)) # find the phase of the affected revision - for phase in xrange(targetphase, -1, -1): + for phase in pycompat.xrange(targetphase, -1, -1): if phase: roots = oldroots[phase] revs = set(repo.revs('%ln::%ld', roots, affected))