changeset 32045:3eceeede26e9

graphlog: optionally strip quotes from graphnode template (BC) For consistency with the other template options.
author Yuya Nishihara <yuya@tcha.org>
date Sat, 25 Feb 2017 19:28:16 +0900
parents cde72a195f32
children 5b630f2ccb4e
files mercurial/cmdutil.py tests/test-glog.t
diffstat 2 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/cmdutil.py	Mon Apr 17 23:53:19 2017 +0900
+++ b/mercurial/cmdutil.py	Sat Feb 25 19:28:16 2017 +0900
@@ -2154,6 +2154,7 @@
     if not spec:
         return templatekw.showgraphnode  # fast path for "{graphnode}"
 
+    spec = templater.unquotestring(spec)
     templ = formatter.gettemplater(ui, 'graphnode', spec)
     cache = {}
     if isinstance(displayer, changeset_templater):
--- a/tests/test-glog.t	Mon Apr 17 23:53:19 2017 +0900
+++ b/tests/test-glog.t	Sat Feb 25 19:28:16 2017 +0900
@@ -2398,7 +2398,7 @@
 
 node template with changeset_printer:
 
-  $ hg log -Gqr 5:7 --config ui.graphnodetemplate='{rev}'
+  $ hg log -Gqr 5:7 --config ui.graphnodetemplate='"{rev}"'
   7  7:02dbb8e276b8
   |
   6    6:fc281d8ff18d