D5576: remotefilelog: fix {file_copies} template keyword

martinvonz (Martin von Zweigbergk) phabricator at mercurial-scm.org
Fri Jan 11 21:31:26 EST 2019


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

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
 



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


More information about the Mercurial-devel mailing list