Patchwork D6542: remotefilelog: handle copies in changesets in getrenamedfn() override

login
register
mail settings
Submitter phabricator
Date June 19, 2019, 6:31 p.m.
Message ID <differential-rev-PHID-DREV-k6bn7phexqpkrxr3jxxz-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/40599/
State Superseded
Headers show

Comments

phabricator - June 19, 2019, 6:31 p.m.
martinvonz created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  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.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D6542

AFFECTED FILES
  hgext/remotefilelog/__init__.py

CHANGE DETAILS




To: martinvonz, #hg-reviewers
Cc: mercurial-devel

Patch

diff --git a/hgext/remotefilelog/__init__.py b/hgext/remotefilelog/__init__.py
--- a/hgext/remotefilelog/__init__.py
+++ b/hgext/remotefilelog/__init__.py
@@ -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 = {}