# HG changeset patch # User Matt Mackall # Date 1361562414 21600 # Node ID 963468e9f9e59625eb11c0c0981829b295b06632 # Parent c4ff927b6f68b29e67a0c888ca064ca7a76959f9# Parent 7790d69af6d6bd72b4d5495c6a75abdc75cbeb33 merge with crew diff -r 7790d69af6d6 -r 963468e9f9e5 mercurial/templatekw.py --- a/mercurial/templatekw.py Fri Feb 22 10:05:22 2013 -0800 +++ b/mercurial/templatekw.py Fri Feb 22 13:46:54 2013 -0600 @@ -244,8 +244,8 @@ copies.append((fn, rename[0])) c = [{'name': x[0], 'source': x[1]} for x in copies] - return showlist('file_copy', c, plural='file_copies', - element='file', **args) + f = _showlist('file_copy', c, plural='file_copies', **args) + return _hybrid(f, c) # showfilecopiesswitch() displays file copies only if copy records are # provided before calling the templater, usually with a --copies @@ -256,8 +256,8 @@ """ copies = args['revcache'].get('copies') or [] c = [{'name': x[0], 'source': x[1]} for x in copies] - return showlist('file_copy', c, plural='file_copies', - element='file', **args) + f = _showlist('file_copy', c, plural='file_copies', **args) + return _hybrid(f, c) def showfiledels(**args): """:file_dels: List of strings. Files removed by this changeset.""" diff -r 7790d69af6d6 -r 963468e9f9e5 tests/test-command-template.t --- a/tests/test-command-template.t Fri Feb 22 10:05:22 2013 -0800 +++ b/tests/test-command-template.t Fri Feb 22 13:46:54 2013 -0600 @@ -43,6 +43,9 @@ $ hg mv second fourth $ hg commit -m third -d "2020-01-01 10:01" + $ hg log --template '{file_copies % "{source} -> {name}\n"}' -r . + second -> fourth + Quoting for ui.logtemplate $ hg tip --config "ui.logtemplate={rev}\n"