Patchwork [4,of,8] graphlog: do not look up graphnodetemplate in template paths (BC)

login
register
mail settings
Submitter Yuya Nishihara
Date June 14, 2017, 1:40 p.m.
Message ID <544bef6832aa25822fdf.1497447635@mimosa>
Download mbox | patch
Permalink /patch/21374/
State Accepted
Headers show

Comments

Yuya Nishihara - June 14, 2017, 1:40 p.m.
# HG changeset patch
# User Yuya Nishihara <yuya@tcha.org>
# Date 1492840385 -32400
#      Sat Apr 22 14:53:05 2017 +0900
# Node ID 544bef6832aa25822fdfa7c93e8fe5f8371bcb80
# Parent  b1c1aab629501208e0b84b2c604328eea4311d4c
graphlog: do not look up graphnodetemplate in template paths (BC)

ui.graphnodetemplate config should be a literal template as ui.logtemplate is.
The use of formatter.gettemplater() is valid only for a template string
given by -T/--template option.

Patch

diff --git a/mercurial/cmdutil.py b/mercurial/cmdutil.py
--- a/mercurial/cmdutil.py
+++ b/mercurial/cmdutil.py
@@ -2292,7 +2292,7 @@  def _graphnodeformatter(ui, displayer):
         return templatekw.showgraphnode  # fast path for "{graphnode}"
 
     spec = templater.unquotestring(spec)
-    templ = formatter.gettemplater(ui, 'graphnode', spec)
+    templ = formatter.maketemplater(ui, 'graphnode', spec)
     cache = {}
     if isinstance(displayer, changeset_templater):
         cache = displayer.cache  # reuse cache of slow templates