# HG changeset patch # User Yuya Nishihara # Date 1457535435 -32400 # Node ID 6a4a4ca21907ebd009d43ee1bd93e38061649f1b # Parent 969a4615c4c4a79120f87ee0af11e78b8f0354cb graphlog: bring back color to node symbol template Follows up 3356bf61fa25. A ui object is required to render labels. diff -r 969a4615c4c4 -r 6a4a4ca21907 mercurial/cmdutil.py --- a/mercurial/cmdutil.py Tue Feb 16 21:44:13 2016 +0900 +++ b/mercurial/cmdutil.py Wed Mar 09 23:57:15 2016 +0900 @@ -2206,6 +2206,7 @@ def formatnode(repo, ctx): props['ctx'] = ctx props['repo'] = repo + props['ui'] = repo.ui props['revcache'] = {} return templater.stringify(templ('graphnode', **props)) return formatnode diff -r 969a4615c4c4 -r 6a4a4ca21907 tests/test-glog.t --- a/tests/test-glog.t Tue Feb 16 21:44:13 2016 +0900 +++ b/tests/test-glog.t Wed Mar 09 23:57:15 2016 +0900 @@ -2407,4 +2407,11 @@ o | 5 null+5 | | +label() should just work in node template: + + $ hg log -Gqr 7 --config extensions.color= --color=debug \ + > --config ui.graphnodetemplate='{label("branch.{branch}", rev)}' + [branch.default|7] [log.node|7:02dbb8e276b8] + | + $ cd ..