copies: get copies information directly from _copies
Performance measurement does not show any significant performance movement. This
is not surprising since p1copies() code is `self._copies[0]`.
Differential Revision: https://phab.mercurial-scm.org/D7121
--- a/mercurial/copies.py Wed Oct 02 13:43:27 2019 -0400
+++ b/mercurial/copies.py Wed Oct 16 09:52:05 2019 +0200
@@ -207,13 +207,14 @@
return copies
for i, c in enumerate(children[r]):
childctx = repo[c]
+ p1copies, p2copies = childctx._copies
if r == childctx.p1().rev():
parent = 1
- childcopies = childctx.p1copies()
+ childcopies = p1copies
else:
assert r == childctx.p2().rev()
parent = 2
- childcopies = childctx.p2copies()
+ childcopies = p2copies
if not alwaysmatch:
childcopies = {
dst: src for dst, src in childcopies.items() if match(dst)