Patchwork D5576: remotefilelog: fix {file_copies} template keyword

login
register
mail settings
Submitter phabricator
Date Jan. 12, 2019, 2:31 a.m.
Message ID <d242eed8137d7d287dfc2a755cec6445@localhost.localdomain>
Download mbox | patch
Permalink /patch/37687/
State Not Applicable
Headers show

Comments

phabricator - Jan. 12, 2019, 2:31 a.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHG2338eab5f8b7: remotefilelog: fix {file_copies} template keyword (authored by martinvonz, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D5576?vs=13183&id=13185

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

AFFECTED FILES
  hgext/remotefilelog/__init__.py
  tests/test-remotefilelog-log.t

CHANGE DETAILS




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

Patch

diff --git a/tests/test-remotefilelog-log.t b/tests/test-remotefilelog-log.t
--- a/tests/test-remotefilelog-log.t
+++ b/tests/test-remotefilelog-log.t
@@ -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
   
diff --git a/hgext/remotefilelog/__init__.py b/hgext/remotefilelog/__init__.py
--- a/hgext/remotefilelog/__init__.py
+++ b/hgext/remotefilelog/__init__.py
@@ -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