graphlog: optionally strip quotes from graphnode template (BC)
authorYuya Nishihara <yuya@tcha.org>
Sat, 25 Feb 2017 19:28:16 +0900
changeset 32045 3eceeede26e9
parent 32044 cde72a195f32
child 32046 5b630f2ccb4e
graphlog: optionally strip quotes from graphnode template (BC) For consistency with the other template options.
mercurial/cmdutil.py
tests/test-glog.t
--- 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