view mercurial/templates/map-cmdline.status @ 38947:f9a98075a37e

templates: rename "user" to "luser" defined in default map file (API) "user" will be shadowed by the {user} keyword to be added by the next patch. I think the naming of template fields is a sort of an internal API, so this patch is flagged as an API change. .. api:: Rewrite ``{user}`` to ``{luser}`` in log templates inherited from map-cmdline.default.
author Yuya Nishihara <yuya@tcha.org>
date Tue, 24 Jul 2018 22:33:08 +0900
parents f4aeb952ab77
children
line wrap: on
line source

%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')}"}'