--- a/mercurial/templater.py Tue Nov 04 21:54:27 2014 +0100
+++ b/mercurial/templater.py Tue Nov 04 16:43:33 2014 -0600
@@ -153,8 +153,6 @@
return v(**mapping)
if isinstance(v, types.GeneratorType):
v = list(v)
- mapping[key] = v
- return v
return v
def buildfilter(exp, context):
--- a/tests/test-convert-hg-source.t Tue Nov 04 21:54:27 2014 +0100
+++ b/tests/test-convert-hg-source.t Tue Nov 04 16:43:33 2014 -0600
@@ -16,6 +16,12 @@
$ hg copy foo baz
$ hg ci -m 'make bar and baz copies of foo' -d '2 0'
created new head
+
+Test that template can print all file copies (issue4362)
+ $ hg log -r . --template "{file_copies % ' File: {file_copy}\n'}"
+ File: bar (foo)
+ File: baz (foo)
+
$ hg bookmark premerge1
$ hg merge -r 1
merging baz and foo to baz
--- a/tests/test-graft.t Tue Nov 04 21:54:27 2014 +0100
+++ b/tests/test-graft.t Tue Nov 04 16:43:33 2014 -0600
@@ -478,6 +478,12 @@
date: Thu Jan 01 00:00:00 1970 +0000
summary: 2
+Test that template correctly expands more than one 'extra' (issue4362)
+ $ hg -R ../converted log -r 7 --template "{extras % ' Extra: {extra}\n'}"
+ Extra: branch=default
+ Extra: convert_revision=ef0ef43d49e79e81ddafdc7997401ba0041efc82
+ Extra: source=e0213322b2c1a5d5d236c74e79666441bee67a7d
+
The transplant case
$ hg -R ../converted log -r tip --template "{rev}: {node}\n{join(extras, '\n')}\n"
21: fbb6c5cc81002f2b4b49c9d731404688bcae5ade