remotefilelog: handle copies in changesets in getrenamedfn() override
authorMartin von Zweigbergk <martinvonz@google.com>
Wed, 19 Jun 2019 10:33:13 -0700
changeset 42500 e387cb22f6c0
parent 42499 f93762f251d2
child 42501 75334e5b519e
remotefilelog: handle copies in changesets in getrenamedfn() override E.g. the {file_copies} template keyword didn't work with copies in changesets before this patch because remotefilelog overrides the getrenamedfn() and didn't handle the changeset-centric case. Differential Revision: https://phab.mercurial-scm.org/D6542
hgext/remotefilelog/__init__.py
--- a/hgext/remotefilelog/__init__.py	Wed Jun 19 11:12:06 2019 -0700
+++ b/hgext/remotefilelog/__init__.py	Wed Jun 19 10:33:13 2019 -0700
@@ -636,7 +636,7 @@
     extensions.wrapfunction(changelog.changelog, 'add', changelogadd)
 
 def getrenamedfn(orig, repo, endrev=None):
-    if not isenabled(repo):
+    if not isenabled(repo) or copies.usechangesetcentricalgo(repo):
         return orig(repo, endrev)
 
     rcache = {}