--- a/mercurial/cmdutil.py Sat Apr 22 14:53:05 2017 +0900
+++ b/mercurial/cmdutil.py Sat Apr 22 15:06:06 2017 +0900
@@ -1580,15 +1580,8 @@
def __init__(self, ui, repo, matchfn, diffopts, tmpl, mapfile, buffered):
changeset_printer.__init__(self, ui, repo, matchfn, diffopts, buffered)
- assert not (tmpl and mapfile)
- defaulttempl = templatekw.defaulttempl
- if mapfile:
- self.t = templater.templater.frommapfile(mapfile,
- cache=defaulttempl)
- else:
- self.t = formatter.maketemplater(ui, 'changeset', tmpl,
- cache=defaulttempl)
-
+ self.t = formatter.loadtemplater(ui, 'changeset', (tmpl, mapfile),
+ cache=templatekw.defaulttempl)
self._counter = itertools.count()
self.cache = {}