# HG changeset patch # User Martin von Zweigbergk # Date 1547244455 28800 # Node ID 2338eab5f8b73cf30ac09b3aabcdd36bca09b713 # Parent 93c2beb9047fd3f1741304f47c945eafd2489b1e 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 diff -r 93c2beb9047f -r 2338eab5f8b7 hgext/remotefilelog/__init__.py --- 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 diff -r 93c2beb9047f -r 2338eab5f8b7 tests/test-remotefilelog-log.t --- a/tests/test-remotefilelog-log.t Fri Jan 11 16:44:39 2019 -0800 +++ b/tests/test-remotefilelog-log.t Fri Jan 11 14:07:35 2019 -0800 @@ -108,7 +108,7 @@ $ hg mv x z $ hg commit -m move $ hg log -f z -T '{desc} {file_copies}\n' -G - @ move z (x\x14\x06\xe7A\x18bv\x94&\x84\x17I\x1f\x01\x8aJ\x881R\xf0) (esc) + @ move z (x) : o x