mergecopies: avoid slowdown from linkrev adjustment (
issue4680)
checkcopies was using fctx.rev() which it was expecting would be
equivalent to linkrev() but was triggering the new _adjustlinkrev path.
This was making grafts and merges with large sets of potential copies
very expensive.
--- a/mercurial/copies.py Mon May 25 01:26:23 2015 +0900
+++ b/mercurial/copies.py Tue May 26 06:45:18 2015 -0500
@@ -456,7 +456,7 @@
g1, g2 = f1.ancestors(), f2.ancestors()
try:
- f1r, f2r = f1.rev(), f2.rev()
+ f1r, f2r = f1.linkrev(), f2.linkrev()
if f1r is None:
f1 = g1.next()
@@ -464,7 +464,7 @@
f2 = g2.next()
while True:
- f1r, f2r = f1.rev(), f2.rev()
+ f1r, f2r = f1.linkrev(), f2.linkrev()
if f1r > f2r:
f1 = g1.next()
elif f2r > f1r:
@@ -479,7 +479,7 @@
of = None
seen = set([f])
for oc in ctx(f, m1[f]).ancestors():
- ocr = oc.rev()
+ ocr = oc.linkrev()
of = oc.path()
if of in seen:
# check limit late - grab last rename before