ops/nixos/lib/hgrc: colourise rev ID based on phase
This commit is contained in:
parent
9824a286f8
commit
2712655c50
1 changed files with 8 additions and 4 deletions
|
@ -19,8 +19,12 @@ smartlog() = publichead(smartlogstart())::smartlogstart() | smartlogstart()
|
||||||
[color]
|
[color]
|
||||||
mode = terminfo
|
mode = terminfo
|
||||||
|
|
||||||
custom.rev = green bold
|
custom.rev_draft = green bold
|
||||||
custom.revprefix = green bold inverse
|
custom.rev_public = blue bold
|
||||||
|
custom.rev_secret = red bold
|
||||||
|
custom.revprefix_draft = green bold inverse
|
||||||
|
custom.revprefix_public = blue bold inverse
|
||||||
|
custom.revprefix_secret = red bold inverse
|
||||||
custom.author = red
|
custom.author = red
|
||||||
custom.currentcommit_message = magenta
|
custom.currentcommit_message = magenta
|
||||||
custom.bookmarks = bold orange
|
custom.bookmarks = bold orange
|
||||||
|
@ -32,13 +36,13 @@ color.orange = 202
|
||||||
color.lightyellow = 191
|
color.lightyellow = 191
|
||||||
|
|
||||||
[templates]
|
[templates]
|
||||||
lukegblogshort = {separate(' ', label('custom.rev', lukegbnode), label('custom.date', lukegbdate), label('custom.author', lukegbauthor), label('custom.branch_tip', ifcontains(rev, revset(branch), branch, '')), label('custom.bookmarks', bookmarks), label('custom.topics', topics), label(ifcontains(rev, revset('.'), 'custom.currentcommit_message', 'custom.message'), lukegbmsg))}\n
|
lukegblogshort = {separate(' ', label('custom.rev_{phase}', lukegbnode), label('custom.date', lukegbdate), label('custom.author', lukegbauthor), label('custom.branch_tip', ifcontains(rev, revset(branch), branch, '')), label('custom.bookmarks', bookmarks), label('custom.topics', topics), label(ifcontains(rev, revset('.'), 'custom.currentcommit_message', 'custom.message'), lukegbmsg))}\n
|
||||||
lukegbdate = {date|age}
|
lukegbdate = {date|age}
|
||||||
lukegbmsg = {desc|firstline}
|
lukegbmsg = {desc|firstline}
|
||||||
lukegbcopybarain = {sub('^noreply\+([^@]+)@lukegb.com$', 'copybara:\\1', author|email)}
|
lukegbcopybarain = {sub('^noreply\+([^@]+)@lukegb.com$', 'copybara:\\1', author|email)}
|
||||||
lukegbcopybara = {ifcontains(lukegbcopybarain, '@', "", lukegbcopybarain)}
|
lukegbcopybara = {ifcontains(lukegbcopybarain, '@', "", lukegbcopybarain)}
|
||||||
lukegbauthor = {ifeq('hg@lukegb.com', author|email, 'lukegb', if(lukegbcopybara, lukegbcopybara, author|email))}
|
lukegbauthor = {ifeq('hg@lukegb.com', author|email, 'lukegb', if(lukegbcopybara, lukegbcopybara, author|email))}
|
||||||
lukegbnode = {label('custom.revprefix', lukegbnodesh)}{lukegbnodelng}
|
lukegbnode = {label('custom.revprefix_{phase}', lukegbnodesh)}{lukegbnodelng}
|
||||||
lukegbnodesh = {node|shortest}
|
lukegbnodesh = {node|shortest}
|
||||||
lukegbnodelng = {sub('^{lukegbnodesh}', "", '{node|short}')}
|
lukegbnodelng = {sub('^{lukegbnodesh}', "", '{node|short}')}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue