Mercurial > hg
diff tests/test-glog.t @ 27216:8117e2cd959e
graphlog: make node symbol templatable by ui.graphnodetemplate option
New ui.graphnodetemplate option allows us to colorize a node symbol by phase
or branch,
[ui]
graphnodetemplate = {label('graphnode.{phase}', graphnode)}
[color]
graphnode.draft = yellow bold
or use a variety of unicode emoji characters, and so on. (You'll need less-481
to display non-BMP unicode character.)
[ui]
graphnodetemplate = {ifeq(obsolete, 'stable', graphnode, '\xf0\x9f\x92\xa9')}
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Sat, 14 Nov 2015 17:25:43 +0900 |
parents | 5e1b0739611c |
children | 1df9b8b2abda |
line wrap: on
line diff
--- a/tests/test-glog.t Sat Nov 14 17:02:57 2015 +0900 +++ b/tests/test-glog.t Sat Nov 14 17:25:43 2015 +0900 @@ -2400,4 +2400,25 @@ @ 3:5918b8d165d1 | +node template with changeset_printer: + + $ hg log -Gqr 5:7 --config ui.graphnodetemplate='{rev}' + 7 7:02dbb8e276b8 + | + 6 6:fc281d8ff18d + |\ + 5 | 5:99b31f1c2782 + | | + +node template with changeset_templater (shared cache variable): + + $ hg log -Gr 5:7 -T '{latesttag % "{rev} {tag}+{distance}"}\n' \ + > --config ui.graphnodetemplate='{ifeq(latesttagdistance, 0, "#", graphnode)}' + o 7 foo-bar+1 + | + # 6 foo-bar+0 + |\ + o | 5 null+5 + | | + $ cd ..