The template {file_copies} should return a "list of strings" according to the docs. So it should work with join(file_copies,';'), but it does not. hg log --template "{rev}: {join(file_copies,';')}\n" prints literal "sourcename" for a revision with a rename, as in: 1: sourcename
Note that: hg log --template "{rev}: {file_copies}\n" prints the renamed file info correctly.
Already fixed by: changeset: 18715:c4ff927b6f68 parent: 18703:5bef0655f2e9 user: Matt Mackall <mpm@selenic.com> date: Fri Feb 22 13:45:46 2013 -0600 summary: templater: properly handle file_copies with % Will be in 2.6 on May 1.
(In reply to comment #2) > Already fixed by: > > changeset: 18715:c4ff927b6f68 > parent: 18703:5bef0655f2e9 > user: Matt Mackall <mpm@selenic.com> > date: Fri Feb 22 13:45:46 2013 -0600 > summary: templater: properly handle file_copies with % > > Will be in 2.6 on May 1. I doubt that: [☿:default] test % hg log --template "{rev}: {file_copies}\n" 2: 1: b (a) 0: [☿:default] test % hg log --template "{rev}: {join(file_copies,';')}\n" 2: 1: a 0: [☿:default] test % hg version Mercurial Distributed SCM (version 2.5.4+87-257afe5489d4+20130416)
Fixed by http://selenic.com/repo/hg/rev/3cdb6f2f6789 Matt Mackall <mpm@selenic.com> templatekw: add default styles for hybrid types (issue3887) This allows elements like file_copies to be printed as 'name (source)' when used with join. (please test the fix)
Seems to be fixed.