mercurial/cmdutil.py
changeset 10061 9e2ab10728a2
parent 10060 f780b1098efc
child 10111 27457d31ae3f
--- a/mercurial/cmdutil.py	Sun Dec 13 18:06:24 2009 +0100
+++ b/mercurial/cmdutil.py	Sun Dec 13 18:06:24 2009 +0100
@@ -757,12 +757,16 @@
     def __init__(self, ui, repo, patch, diffopts, mapfile, buffered):
         changeset_printer.__init__(self, ui, repo, patch, diffopts, buffered)
         formatnode = ui.debugflag and (lambda x: x) or (lambda x: x[:12])
+        defaulttempl = {
+            'parent': '{rev}:{node|formatnode} ',
+            'manifest': '{rev}:{node|formatnode}',
+            'file_copy': '{name} ({source})',
+            'extra': '{key}={value|stringescape}'
+            }
+        # filecopy is preserved for compatibility reasons
+        defaulttempl['filecopy'] = defaulttempl['file_copy']
         self.t = templater.templater(mapfile, {'formatnode': formatnode},
-                                     cache={
-                                         'parent': '{rev}:{node|formatnode} ',
-                                         'manifest': '{rev}:{node|formatnode}',
-                                         'filecopy': '{name} ({source})',
-                                         'extra': '{key}={value|stringescape}'})
+                                     cache=defaulttempl)
         self.cache = {}
 
     def use_template(self, t):