D7122: copies: avoid instancing more changectx to access parent revisions
marmoute (Pierre-Yves David)
phabricator at mercurial-scm.org
Wed Oct 16 17:34:02 UTC 2019
Closed by commit rHG6b43c7be2d15: copies: avoid instancing more changectx to access parent revisions (authored by marmoute).
This revision was automatically updated to reflect the committed changes.
REPOSITORY
rHG Mercurial
CHANGES SINCE LAST UPDATE
https://phab.mercurial-scm.org/D7122?vs=17241&id=17248
CHANGES SINCE LAST ACTION
https://phab.mercurial-scm.org/D7122/new/
REVISION DETAIL
https://phab.mercurial-scm.org/D7122
AFFECTED FILES
mercurial/copies.py
CHANGE DETAILS
diff --git a/mercurial/copies.py b/mercurial/copies.py
--- a/mercurial/copies.py
+++ b/mercurial/copies.py
@@ -207,12 +207,13 @@
return copies
for i, c in enumerate(children[r]):
childctx = repo[c]
+ p1, p2 = cl.parentrevs(c)
p1copies, p2copies = childctx._copies
- if r == childctx.p1().rev():
+ if r == p1:
parent = 1
childcopies = p1copies
else:
- assert r == childctx.p2().rev()
+ assert r == p2
parent = 2
childcopies = p2copies
if not alwaysmatch:
To: marmoute, #hg-reviewers, martinvonz
Cc: martinvonz, mercurial-devel
More information about the Mercurial-devel
mailing list