Mercurial > public > mercurial-scm > hg-stable
diff mercurial/templatekw.py @ 18715:c4ff927b6f68
templater: properly handle file_copies with %
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Fri, 22 Feb 2013 13:45:46 -0600 |
parents | 0b241d7a8c62 |
children | 3cdb6f2f6789 |
line wrap: on
line diff
--- a/mercurial/templatekw.py Mon Feb 18 13:21:27 2013 -0600 +++ b/mercurial/templatekw.py Fri Feb 22 13:45:46 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."""