D6162: getrenamedfn: get copy data from context object if configured
martinvonz (Martin von Zweigbergk)
phabricator at mercurial-scm.org
Sat Apr 13 11:46:08 UTC 2019
This revision was automatically updated to reflect the committed changes.
Closed by commit rHGaa84bc48c2f7: getrenamedfn: get copy data from context object if configured (authored by martinvonz, committed by ).
REPOSITORY
rHG Mercurial
CHANGES SINCE LAST UPDATE
https://phab.mercurial-scm.org/D6162?vs=14574&id=14729
REVISION DETAIL
https://phab.mercurial-scm.org/D6162
AFFECTED FILES
mercurial/scmutil.py
CHANGE DETAILS
diff --git a/mercurial/scmutil.py b/mercurial/scmutil.py
--- a/mercurial/scmutil.py
+++ b/mercurial/scmutil.py
@@ -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)
To: martinvonz, #hg-reviewers
Cc: mercurial-devel
More information about the Mercurial-devel
mailing list