--- a/mercurial/cmdutil.py Sat May 06 17:41:05 2017 +0900
+++ b/mercurial/cmdutil.py Sat Apr 22 20:14:55 2017 +0900
@@ -1649,7 +1649,10 @@
self.t(self._parts['footer'], **props))
def logtemplatespec(tmpl, mapfile):
- return formatter.templatespec('changeset', tmpl, mapfile)
+ if mapfile:
+ return formatter.templatespec('changeset', tmpl, mapfile)
+ else:
+ return formatter.templatespec('', tmpl, None)
def _lookuplogtemplate(ui, tmpl, style):
"""Find the template matching the given template spec or style
@@ -1706,7 +1709,7 @@
spec = _lookuplogtemplate(ui, opts.get('template'), opts.get('style'))
- if not spec.tmpl and not spec.mapfile:
+ if not spec.ref and not spec.tmpl and not spec.mapfile:
return changeset_printer(ui, repo, matchfn, opts, buffered)
return changeset_templater(ui, repo, spec, matchfn, opts, buffered)