Mercurial > hg
changeset 22767:9579034d9eb2
log: add labels to the phase template
This copies the labelled default template and just adds an extra
{phase} keyword as necessary.
author | Jordi Gutiérrez Hermoso <jordigh@octave.org> |
---|---|
date | Sat, 04 Oct 2014 17:48:59 -0400 |
parents | 0ded0f0b1c04 |
children | 66bf251ee672 |
files | mercurial/templates/map-cmdline.phases |
diffstat | 1 files changed, 73 insertions(+), 25 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/templates/map-cmdline.phases Fri Oct 03 19:48:56 2014 -0400 +++ b/mercurial/templates/map-cmdline.phases Sat Oct 04 17:48:59 2014 -0400 @@ -1,25 +1,73 @@ -changeset = 'changeset: {rev}:{node|short}\n{branches}{bookmarks}{tags}phase: {phase}\n{parents}user: {author}\ndate: {date|date}\nsummary: {desc|firstline}\n\n' -changeset_quiet = '{rev}:{node|short}\n' -changeset_verbose = 'changeset: {rev}:{node|short}\n{branches}{bookmarks}{tags}{parents}user: {author}\ndate: {date|date}\n{files}{file_copies_switch}description:\n{desc|strip}\n\n\n' -changeset_debug = 'changeset: {rev}:{node}\n{branches}{bookmarks}{tags}phase: {phase}\n{parents}{manifest}user: {author}\ndate: {date|date}\n{file_mods}{file_adds}{file_dels}{file_copies_switch}{extras}description:\n{desc|strip}\n\n\n' -start_files = 'files: ' -file = ' {file}' -end_files = '\n' -start_file_mods = 'files: ' -file_mod = ' {file_mod}' -end_file_mods = '\n' -start_file_adds = 'files+: ' -file_add = ' {file_add}' -end_file_adds = '\n' -start_file_dels = 'files-: ' -file_del = ' {file_del}' -end_file_dels = '\n' -start_file_copies = 'copies: ' -file_copy = ' {name} ({source})' -end_file_copies = '\n' -parent = 'parent: {rev}:{node|formatnode}\n' -manifest = 'manifest: {rev}:{node}\n' -branch = 'branch: {branch}\n' -tag = 'tag: {tag}\n' -bookmark = 'bookmark: {bookmark}\n' -extra = 'extra: {key}={value|stringescape}\n' +# Base templates. Due to name clashes with existing keywords, we have +# to replace some keywords with 'lkeyword', for 'labelled keyword' +changeset = '{cset}{branches}{bookmarks}{tags}{lphase}{parents}{user}{ldate}{summary}\n' +changeset_quiet = '{node}' +changeset_verbose = '{cset}{branches}{bookmarks}{tags}{parents}{user}{ldate}{lfiles}{lfile_copies_switch}{description}\n' +changeset_debug = '{fullcset}{branches}{bookmarks}{tags}{lphase}{parents}{manifest}{user}{ldate}{lfile_mods}{lfile_adds}{lfile_dels}{lfile_copies_switch}{extras}{description}\n' + +# File templates +lfiles = '{if(files, + label("ui.note log.files", + "files: {files}\n"))}' + +lfile_mods = '{if(file_mods, + label("ui.debug log.files", + "files: {file_mods}\n"))}' + +lfile_adds = '{if(file_adds, + label("ui.debug log.files", + "files+: {file_adds}\n"))}' + +lfile_dels = '{if(file_dels, + label("ui.debug log.files", + "files-: {file_dels}\n"))}' + +lfile_copies_switch = '{if(file_copies_switch, + label("ui.note log.copies", + "copies: {file_copies_switch + % ' {name} ({source})'}\n"))}' + +# General templates +cset = '{label("log.changeset changeset.{phase}", + "changeset: {rev}:{node|short}")}\n' + +lphase = '{label("log.phase", + "phase: {phase}")}\n' + +fullcset = '{label("log.changeset changeset.{phase}", + "changeset: {rev}:{node}")}\n' + +parent = '{label("log.parent changeset.{phase}", + "parent: {rev}:{node|formatnode}")}\n' + +node = '{label("log.node", + "{rev}:{node|short}")}\n' + +manifest = '{label("ui.debug log.manifest", + "manifest: {rev}:{node}")}\n' + +branch = '{label("log.branch", + "branch: {branch}")}\n' + +tag = '{label("log.tag", + "tag: {tag}")}\n' + +bookmark = '{label("log.bookmark", + "bookmark: {bookmark}")}\n' + +user = '{label("log.user", + "user: {author}")}\n' + +summary = '{label("log.summary", + "summary: {desc|firstline}")}\n' + +ldate = '{label("log.date", + "date: {date|date}")}\n' + +extra = '{label("ui.debug log.extra", + "extra: {key}={value|stringescape}")}\n' + +description = '{label("ui.note log.description", + "description:")} + {label("ui.note log.description", + "{desc|strip}")}\n\n'