mercurial/templates/map-cmdline.default
author Durham Goode <durham@fb.com>
Wed, 13 Sep 2017 17:16:45 -0700
changeset 34150 e9e0e1143fc5
parent 33783 db6b666ce1e6
child 34714 f4aeb952ab77
permissions -rw-r--r--
bundle2: move part iterator a separate class Currently, the part iterator logic is tightly coupled with the part handling logic, which means it's hard to replace the part handling logic without duplicating the part iterator bits. In a future diff we'll want to be able to replace all part handling, so let's begin refactoring the part iterator logic to it's own class. Differential Revision: https://phab.mercurial-scm.org/D703
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
22766
0ded0f0b1c04 log: rewrite default template to use labels (issue2866)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 15907
diff changeset
     1
# Base templates. Due to name clashes with existing keywords, we have
0ded0f0b1c04 log: rewrite default template to use labels (issue2866)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 15907
diff changeset
     2
# to replace some keywords with 'lkeyword', for 'labelled keyword'
30713
6d0b1a69f98c templates: display evolution "troubles" in command line style
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 30696
diff changeset
     3
changeset = '{cset}{branches}{bookmarks}{tags}{parents}{user}{ldate}{ltroubles}{summary}\n'
24304
6136704b975d templates: fix "log -q" output of default style
Yuya Nishihara <yuya@tcha.org>
parents: 22766
diff changeset
     4
changeset_quiet = '{lnode}'
30713
6d0b1a69f98c templates: display evolution "troubles" in command line style
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 30696
diff changeset
     5
changeset_verbose = '{cset}{branches}{bookmarks}{tags}{parents}{user}{ldate}{ltroubles}{lfiles}{lfile_copies_switch}{description}\n'
6d0b1a69f98c templates: display evolution "troubles" in command line style
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 30696
diff changeset
     6
changeset_debug = '{fullcset}{branches}{bookmarks}{tags}{lphase}{parents}{manifest}{user}{ldate}{ltroubles}{lfile_mods}{lfile_adds}{lfile_dels}{lfile_copies_switch}{extras}{description}\n'
22766
0ded0f0b1c04 log: rewrite default template to use labels (issue2866)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 15907
diff changeset
     7
0ded0f0b1c04 log: rewrite default template to use labels (issue2866)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 15907
diff changeset
     8
# File templates
0ded0f0b1c04 log: rewrite default template to use labels (issue2866)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 15907
diff changeset
     9
lfiles = '{if(files,
0ded0f0b1c04 log: rewrite default template to use labels (issue2866)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 15907
diff changeset
    10
               label("ui.note log.files",
0ded0f0b1c04 log: rewrite default template to use labels (issue2866)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 15907
diff changeset
    11
                     "files:       {files}\n"))}'
0ded0f0b1c04 log: rewrite default template to use labels (issue2866)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 15907
diff changeset
    12
0ded0f0b1c04 log: rewrite default template to use labels (issue2866)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 15907
diff changeset
    13
lfile_mods = '{if(file_mods,
0ded0f0b1c04 log: rewrite default template to use labels (issue2866)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 15907
diff changeset
    14
                  label("ui.debug log.files",
0ded0f0b1c04 log: rewrite default template to use labels (issue2866)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 15907
diff changeset
    15
                        "files:       {file_mods}\n"))}'
0ded0f0b1c04 log: rewrite default template to use labels (issue2866)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 15907
diff changeset
    16
0ded0f0b1c04 log: rewrite default template to use labels (issue2866)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 15907
diff changeset
    17
lfile_adds = '{if(file_adds,
0ded0f0b1c04 log: rewrite default template to use labels (issue2866)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 15907
diff changeset
    18
                  label("ui.debug log.files",
0ded0f0b1c04 log: rewrite default template to use labels (issue2866)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 15907
diff changeset
    19
                        "files+:      {file_adds}\n"))}'
0ded0f0b1c04 log: rewrite default template to use labels (issue2866)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 15907
diff changeset
    20
0ded0f0b1c04 log: rewrite default template to use labels (issue2866)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 15907
diff changeset
    21
lfile_dels = '{if(file_dels,
0ded0f0b1c04 log: rewrite default template to use labels (issue2866)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 15907
diff changeset
    22
                  label("ui.debug log.files",
0ded0f0b1c04 log: rewrite default template to use labels (issue2866)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 15907
diff changeset
    23
                        "files-:      {file_dels}\n"))}'
0ded0f0b1c04 log: rewrite default template to use labels (issue2866)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 15907
diff changeset
    24
0ded0f0b1c04 log: rewrite default template to use labels (issue2866)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 15907
diff changeset
    25
lfile_copies_switch = '{if(file_copies_switch,
0ded0f0b1c04 log: rewrite default template to use labels (issue2866)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 15907
diff changeset
    26
                           label("ui.note log.copies",
0ded0f0b1c04 log: rewrite default template to use labels (issue2866)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 15907
diff changeset
    27
                                 "copies:     {file_copies_switch
0ded0f0b1c04 log: rewrite default template to use labels (issue2866)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 15907
diff changeset
    28
                                               % ' {name} ({source})'}\n"))}'
0ded0f0b1c04 log: rewrite default template to use labels (issue2866)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 15907
diff changeset
    29
0ded0f0b1c04 log: rewrite default template to use labels (issue2866)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 15907
diff changeset
    30
# General templates
33782
40739aef97f7 label: rename trouble.X into instability.X
Boris Feld <boris.feld@octobus.net>
parents: 33781
diff changeset
    31
_instability_label = 'instability.{instability}'
40739aef97f7 label: rename trouble.X into instability.X
Boris Feld <boris.feld@octobus.net>
parents: 33781
diff changeset
    32
_troubles_labels = '{if(instabilities, "changeset.unstable {instabilities%_instability_label}")}'
31702
00f996f05522 templates: add "changeset.obsolete" label in command line style
Denis Laxalde <denis@laxalde.org>
parents: 31701
diff changeset
    33
_obsolete_label = '{if(obsolete, "changeset.obsolete")}'
00f996f05522 templates: add "changeset.obsolete" label in command line style
Denis Laxalde <denis@laxalde.org>
parents: 31701
diff changeset
    34
_cset_labels = '{separate(" ", "log.changeset", "changeset.{phase}", "{_obsolete_label}", "{_troubles_labels}")}'
30696
667d9c93c412 templates-default: factor out definition of changeset labels
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 25514
diff changeset
    35
cset = '{label("{_cset_labels}",
22766
0ded0f0b1c04 log: rewrite default template to use labels (issue2866)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 15907
diff changeset
    36
               "changeset:   {rev}:{node|short}")}\n'
0ded0f0b1c04 log: rewrite default template to use labels (issue2866)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 15907
diff changeset
    37
0ded0f0b1c04 log: rewrite default template to use labels (issue2866)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 15907
diff changeset
    38
lphase = '{label("log.phase",
0ded0f0b1c04 log: rewrite default template to use labels (issue2866)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 15907
diff changeset
    39
                 "phase:       {phase}")}\n'
0ded0f0b1c04 log: rewrite default template to use labels (issue2866)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 15907
diff changeset
    40
30696
667d9c93c412 templates-default: factor out definition of changeset labels
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 25514
diff changeset
    41
fullcset = '{label("{_cset_labels}",
22766
0ded0f0b1c04 log: rewrite default template to use labels (issue2866)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 15907
diff changeset
    42
                   "changeset:   {rev}:{node}")}\n'
0ded0f0b1c04 log: rewrite default template to use labels (issue2866)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 15907
diff changeset
    43
0ded0f0b1c04 log: rewrite default template to use labels (issue2866)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 15907
diff changeset
    44
parent = '{label("log.parent changeset.{phase}",
0ded0f0b1c04 log: rewrite default template to use labels (issue2866)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 15907
diff changeset
    45
                  "parent:      {rev}:{node|formatnode}")}\n'
0ded0f0b1c04 log: rewrite default template to use labels (issue2866)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 15907
diff changeset
    46
24304
6136704b975d templates: fix "log -q" output of default style
Yuya Nishihara <yuya@tcha.org>
parents: 22766
diff changeset
    47
lnode = '{label("log.node",
22766
0ded0f0b1c04 log: rewrite default template to use labels (issue2866)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 15907
diff changeset
    48
                "{rev}:{node|short}")}\n'
0ded0f0b1c04 log: rewrite default template to use labels (issue2866)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 15907
diff changeset
    49
0ded0f0b1c04 log: rewrite default template to use labels (issue2866)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 15907
diff changeset
    50
manifest = '{label("ui.debug log.manifest",
0ded0f0b1c04 log: rewrite default template to use labels (issue2866)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 15907
diff changeset
    51
                   "manifest:    {rev}:{node}")}\n'
0ded0f0b1c04 log: rewrite default template to use labels (issue2866)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 15907
diff changeset
    52
0ded0f0b1c04 log: rewrite default template to use labels (issue2866)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 15907
diff changeset
    53
branch = '{label("log.branch",
0ded0f0b1c04 log: rewrite default template to use labels (issue2866)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 15907
diff changeset
    54
                 "branch:      {branch}")}\n'
0ded0f0b1c04 log: rewrite default template to use labels (issue2866)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 15907
diff changeset
    55
0ded0f0b1c04 log: rewrite default template to use labels (issue2866)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 15907
diff changeset
    56
tag = '{label("log.tag",
0ded0f0b1c04 log: rewrite default template to use labels (issue2866)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 15907
diff changeset
    57
              "tag:         {tag}")}\n'
0ded0f0b1c04 log: rewrite default template to use labels (issue2866)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 15907
diff changeset
    58
0ded0f0b1c04 log: rewrite default template to use labels (issue2866)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 15907
diff changeset
    59
bookmark = '{label("log.bookmark",
0ded0f0b1c04 log: rewrite default template to use labels (issue2866)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 15907
diff changeset
    60
                   "bookmark:    {bookmark}")}\n'
0ded0f0b1c04 log: rewrite default template to use labels (issue2866)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 15907
diff changeset
    61
0ded0f0b1c04 log: rewrite default template to use labels (issue2866)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 15907
diff changeset
    62
user = '{label("log.user",
0ded0f0b1c04 log: rewrite default template to use labels (issue2866)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 15907
diff changeset
    63
               "user:        {author}")}\n'
0ded0f0b1c04 log: rewrite default template to use labels (issue2866)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 15907
diff changeset
    64
24637
c1cb6523e968 templates-default: do not show description or summary if empty
Yuya Nishihara <yuya@tcha.org>
parents: 24304
diff changeset
    65
summary = '{if(desc|strip, "{label('log.summary',
c1cb6523e968 templates-default: do not show description or summary if empty
Yuya Nishihara <yuya@tcha.org>
parents: 24304
diff changeset
    66
                                   'summary:     {desc|firstline}')}\n")}'
22766
0ded0f0b1c04 log: rewrite default template to use labels (issue2866)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 15907
diff changeset
    67
0ded0f0b1c04 log: rewrite default template to use labels (issue2866)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 15907
diff changeset
    68
ldate = '{label("log.date",
0ded0f0b1c04 log: rewrite default template to use labels (issue2866)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 15907
diff changeset
    69
                "date:        {date|date}")}\n'
0ded0f0b1c04 log: rewrite default template to use labels (issue2866)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 15907
diff changeset
    70
33783
db6b666ce1e6 label: rename log.trouble into log.instability
Boris Feld <boris.feld@octobus.net>
parents: 33782
diff changeset
    71
ltroubles = '{if(instabilities, "{label('log.instability',
33709
511d6ae462f3 template: rename troubles templatekw into instabilities
Boris Feld <boris.feld@octobus.net>
parents: 31702
diff changeset
    72
                                   'instability: {join(instabilities, ", ")}')}\n")}'
30713
6d0b1a69f98c templates: display evolution "troubles" in command line style
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 30696
diff changeset
    73
22766
0ded0f0b1c04 log: rewrite default template to use labels (issue2866)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 15907
diff changeset
    74
extra = '{label("ui.debug log.extra",
0ded0f0b1c04 log: rewrite default template to use labels (issue2866)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 15907
diff changeset
    75
                "extra:       {key}={value|stringescape}")}\n'
0ded0f0b1c04 log: rewrite default template to use labels (issue2866)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 15907
diff changeset
    76
24637
c1cb6523e968 templates-default: do not show description or summary if empty
Yuya Nishihara <yuya@tcha.org>
parents: 24304
diff changeset
    77
description = '{if(desc|strip, "{label('ui.note log.description',
c1cb6523e968 templates-default: do not show description or summary if empty
Yuya Nishihara <yuya@tcha.org>
parents: 24304
diff changeset
    78
                                       'description:')}
c1cb6523e968 templates-default: do not show description or summary if empty
Yuya Nishihara <yuya@tcha.org>
parents: 24304
diff changeset
    79
                                {label('ui.note log.description',
c1cb6523e968 templates-default: do not show description or summary if empty
Yuya Nishihara <yuya@tcha.org>
parents: 24304
diff changeset
    80
                                       '{desc|strip}')}\n\n")}'
25514
9b1a8ce1f03b templates: add a default template style for status
Matt Mackall <mpm@selenic.com>
parents: 24637
diff changeset
    81
9b1a8ce1f03b templates: add a default template style for status
Matt Mackall <mpm@selenic.com>
parents: 24637
diff changeset
    82
status = '{status} {path}\n{if(copy, "  {copy}\n")}'