diff hgext/remotefilelog/__init__.py @ 41192:2338eab5f8b7

remotefilelog: fix {file_copies} template keyword remotefilelog overrides templatekw.getrenamedfn(). I changed the return type of that function in ec37df9042f9 (templatekw: make getrenamed() return only filename, not nodeid, 2018-03-26). So we need to change remotefilelog too. The function is used by the {file_copies} template keyword and by `hg log --copies`. Differential Revision: https://phab.mercurial-scm.org/D5576
author Martin von Zweigbergk <martinvonz@google.com>
date Fri, 11 Jan 2019 14:07:35 -0800
parents c61b8dfb07c8
children 312afd164009
line wrap: on
line diff
--- a/hgext/remotefilelog/__init__.py	Fri Jan 11 16:44:39 2019 -0800
+++ b/hgext/remotefilelog/__init__.py	Fri Jan 11 14:07:35 2019 -0800
@@ -680,9 +680,10 @@
             for ancestor in fctx.ancestors():
                 if ancestor.path() == fn:
                     renamed = ancestor.renamed()
-                    rcache[fn][ancestor.rev()] = renamed
+                    rcache[fn][ancestor.rev()] = renamed and renamed[0]
 
-            return fctx.renamed()
+            renamed = fctx.renamed()
+            return renamed and renamed[0]
         except error.LookupError:
             return None