diff -r 7eba8f83129b -r e7aa113b14f7 mercurial/ancestor.py --- a/mercurial/ancestor.py Wed Aug 01 12:57:15 2018 -0700 +++ b/mercurial/ancestor.py Wed Aug 01 13:00:45 2018 -0700 @@ -11,6 +11,9 @@ import heapq from .node import nullrev +from . import ( + pycompat, +) def commonancestorsheads(pfunc, *nodes): """Returns a set with the heads of all common ancestors of all nodes, @@ -174,7 +177,7 @@ # no revs to consider return - for curr in xrange(start, min(revs) - 1, -1): + for curr in pycompat.xrange(start, min(revs) - 1, -1): if curr not in bases: continue revs.discard(curr) @@ -215,7 +218,7 @@ # exit. missing = [] - for curr in xrange(start, nullrev, -1): + for curr in pycompat.xrange(start, nullrev, -1): if not revsvisit: break