compact: add color labels to -Tcompact

This commit is contained in:
timeless 2016-04-08 16:05:52 +00:00
parent 0262d50094
commit d34897fb75
2 changed files with 29 additions and 7 deletions

View File

@ -1,12 +1,30 @@
changeset = '{rev}{tags}{bookmarks}{parents} {node|short} {date|isodate} {author|user}\n {desc|firstline|strip}\n\n'
changeset_quiet = '{rev}:{node|short}\n'
changeset_verbose = '{rev}{tags}{parents} {node|short} {date|isodate} {author}\n {desc|strip}\n\n'
ldate = '{label("log.date",
"{date|isodate}")}'
ldesc = '{label('ui.note log.description',
'{desc|strip}')}'
ldescfirst = '{label('ui.note log.description',
'{desc|firstline|strip}')}'
changeset = '{lrev}{tags}{bookmarks}{parents} {lnode} {ldate} {luser}\n {ldescfirst}\n\n'
changeset_quiet = '{lrev}:{lnode}\n'
changeset_verbose = '{lrev}{tags}{parents} {lnode} {ldate} {lauthor}\n {ldesc}\n\n'
lrev = '{label("log.changeset changeset.{phase}",
"{rev}")}'
lnode = '{label("log.node",
"{node|short}")}'
lauthor = '{label("log.user",
"{author}")}'
luser = '{label("log.user",
"{author|user}")}'
start_tags = '['
tag = '{tag},'
tag = '{label("log.tag",
"{tag},")}'
last_tag = '{tag}]'
start_parents = ':'
parent = '{rev},'
last_parent = '{rev}'
parent = '{lrev},'
last_parent = '{lrev}'
start_bookmarks = '['
bookmark = '{bookmark},'
bookmark = '{label("log.bookmark",
"{bookmark},")}'
last_bookmark = '{bookmark}]'

View File

@ -163,6 +163,10 @@ Make sure ui.formatted=False works
[log.date|date: Thu Jan 01 00:00:00 1970 +0000]
[log.summary|summary: initial checkin]
$ hg log -Tcompact --color=debug
[log.changeset changeset.draft|0][tip] [log.node|389aef86a55e] [log.date|1970-01-01 00:00 +0000] [log.user|test]
[ui.note log.description|initial checkin]
Labels on empty strings should not be displayed, labels on custom
templates should be.