diff mercurial/cmdutil.py @ 32971:6d79e9109908

changeset_templater: backport parts map of [templates] section from formatter
author Yuya Nishihara <yuya@tcha.org>
date Sat, 22 Apr 2017 21:16:08 +0900
parents 050efe9a1644
children 99c6c9fa9e6d
line wrap: on
line diff
--- a/mercurial/cmdutil.py	Sat Apr 22 21:29:00 2017 +0900
+++ b/mercurial/cmdutil.py	Sat Apr 22 21:16:08 2017 +0900
@@ -1603,6 +1603,10 @@
                     cur = t + postfix
                     if mode and cur in self.t:
                         self._parts[t] = cur
+        else:
+            partnames = [p for p in self._parts.keys() if p != tmplspec.ref]
+            m = formatter.templatepartsmap(tmplspec, self.t, partnames)
+            self._parts.update(m)
 
         if self._parts['docheader']:
             self.ui.write(templater.stringify(self.t(self._parts['docheader'])))