D6012: templatekw: migrate to new method for getting copy info

martinvonz (Martin von Zweigbergk) phabricator at mercurial-scm.org
Sat Feb 23 12:09:04 EST 2019


martinvonz created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REPOSITORY
  rHG Mercurial

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

AFFECTED FILES
  mercurial/templatekw.py

CHANGE DETAILS

diff --git a/mercurial/templatekw.py b/mercurial/templatekw.py
--- a/mercurial/templatekw.py
+++ b/mercurial/templatekw.py
@@ -129,8 +129,7 @@
         # If linkrev != rev (i.e. rev not found in rcache) fallback to
         # filectx logic.
         try:
-            renamed = repo[rev][fn].renamed()
-            return renamed and renamed[0]
+            return repo[rev][fn].copysource()
         except error.LookupError:
             return None
 



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


More information about the Mercurial-devel mailing list