--- a/mercurial/scmutil.py Sun Mar 31 16:27:10 2019 +0300
+++ b/mercurial/scmutil.py Fri Jan 18 13:13:48 2019 -0800
@@ -1205,6 +1205,18 @@
wctx.copy(old, new)
def getrenamedfn(repo, endrev=None):
+ if repo.ui.config('experimental', 'copies.read-from') == 'compatibility':
+ def getrenamed(fn, rev):
+ ctx = repo[rev]
+ p1copies = ctx.p1copies()
+ if fn in p1copies:
+ return p1copies[fn]
+ p2copies = ctx.p2copies()
+ if fn in p2copies:
+ return p2copies[fn]
+ return None
+ return getrenamed
+
rcache = {}
if endrev is None:
endrev = len(repo)