Mercurial > dotfiles
changeset 399:1a85ad164ae7
hg: refactor sl template to use templatealias for readability
author | Augie Fackler <raf@durin42.com> |
---|---|
date | Tue, 19 Jul 2016 09:20:53 -0400 |
parents | 1cda3348f36b |
children | 879df95a0578 |
files | .hgrc |
diffstat | 1 files changed, 10 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/.hgrc +++ b/.hgrc @@ -72,8 +72,17 @@ sl = log -Gr smart -Tsl si = incoming -GTsl sl. = log -Gr 'smart and ::.' -Tsl +[templatealias] +sl_branch = '{ifeq(branch,"default","","{label(black_background, branch)} ")}' +sl_node = '{label("log.changeset changeset.{phase}", shortest(node))}' +sl_user = '{label("grep.user", author|user)}' +sl_tags = '{label("tags.normal", if(tags," {tags}"))}' +sl_book = '{label("sl.book", if(bookmarks," {bookmarks}"))}' +sl_topic = '{label("sl.topic", if(topics," {topics}"))}' +sl_desc = '{label(ifcontains(rev, revset('.'), 'desc.here'),desc|firstline)}' + [templates] -sl = '{ifeq(branch,"default","","{label(black_background, branch)} ")}{label("log.changeset changeset.{phase}", shortest(node))} {label("grep.user", author|user)}{label("tags.normal", if(tags," {tags}"))}{label("sl.book", if(bookmarks," {bookmarks}"))}{label("sl.topic", if(topics," {topics}"))}\n{label(ifcontains(rev, revset('.'), 'desc.here'),desc|firstline)}' +sl = '{sl_branch}{sl_node} {sl_user}{sl_tags}{sl_book}{sl_topic}\n{sl_desc}' [color] sl.book = magenta bold