--- a/mercurial/scmutil.py Sat Aug 18 10:24:57 2018 +0200
+++ b/mercurial/scmutil.py Fri Aug 24 18:21:55 2018 -0700
@@ -1565,7 +1565,10 @@
"""Report statistics of phase changes for changesets pre-existing
pull/unbundle.
"""
- newrevs = tr.changes.get('revs', xrange(0, 0))
+ # TODO set() is only appropriate for 4.7 since revs post
+ # 45e05d39d9ce is a pycompat.membershiprange, which has O(n)
+ # membership testing.
+ newrevs = set(tr.changes.get('revs', xrange(0, 0)))
phasetracking = tr.changes.get('phases', {})
if not phasetracking:
return