[PATCH 1 of 3] graphlog: optionally strip quotes from graphnode template (BC)
Yuya Nishihara
yuya at tcha.org
Sat Apr 15 10:51:31 UTC 2017
# HG changeset patch
# User Yuya Nishihara <yuya at tcha.org>
# Date 1488018496 -32400
# Sat Feb 25 19:28:16 2017 +0900
# Node ID 911c62c727e9c0d628158a1655c1b69f725d20df
# Parent 83527d9f1f1381ffd7325b7c4297ffbdfed78236
graphlog: optionally strip quotes from graphnode template (BC)
For consistency with the other template options.
diff --git a/mercurial/cmdutil.py b/mercurial/cmdutil.py
--- a/mercurial/cmdutil.py
+++ b/mercurial/cmdutil.py
@@ -2154,6 +2154,7 @@ def _graphnodeformatter(ui, displayer):
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):
diff --git a/tests/test-glog.t b/tests/test-glog.t
--- a/tests/test-glog.t
+++ b/tests/test-glog.t
@@ -2398,7 +2398,7 @@ working-directory revision
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
More information about the Mercurial-devel
mailing list