mercurial/templates/map-cmdline.status
author Pulkit Goyal <7895pulkit@gmail.com>
Fri, 24 Jul 2020 19:48:38 +0530
changeset 45292 69691c5b8ce4
parent 38947 f9a98075a37e
permissions -rw-r--r--
mergeresult: introduce action -> (filename, data, msg) mapping and related API Good number of places in code, we iterate over the actions dict which has filename as keys and filter based on the action. This patch introduced another mapping which has action as key. This will help in refactoring the code much more in upcoming patch. Differential Revision: https://phab.mercurial-scm.org/D8830

%include map-cmdline.default

[templates]
# Override base templates
changeset = '{cset}{branches}{bookmarks}{tags}{parents}{luser}{ldate}{summary}{lfiles}\n'
changeset_verbose = '{cset}{branches}{bookmarks}{tags}{parents}{luser}{ldate}{description}{lfiles}\n'
changeset_debug = '{fullcset}{branches}{bookmarks}{tags}{lphase}{parents}{manifest}{luser}{ldate}{extras}{description}{lfiles}\n'

# Override the file templates
lfiles = '{if(files,
              label('ui.note log.files',
                    'files:\n'))}{lfile_mods}{lfile_adds}{lfile_dels}'

lfile_adds = '{file_adds % "{lfile_add}{lfile_src}"}'
lfile_mods = '{file_mods % "{lfile_mod}{lfile_src}"}'
lfile_add = '{label("status.added", "A {file}\n")}'
lfile_mod = '{label("status.modified", "M {file}\n")}'
lfile_src = '{ifcontains(file, file_copies_switch,
              label("status.copied", "  {get(file_copies_switch, file)}\n"))}'

lfile_dels = '{file_dels % "{label('status.removed', 'R {file}\n')}"}'