Mercurial > hg
annotate mercurial/templates/map-cmdline.default @ 30713:6d0b1a69f98c
templates: display evolution "troubles" in command line style
author | Denis Laxalde <denis.laxalde@logilab.fr> |
---|---|
date | Fri, 06 Jan 2017 13:50:52 +0100 |
parents | 667d9c93c412 |
children | 32f160ceb99d |
rev | line source |
---|---|
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 |
30713
6d0b1a69f98c
templates: display evolution "troubles" in command line style
Denis Laxalde <denis.laxalde@logilab.fr>
parents:
30696
diff
changeset
|
31 _trouble_label = 'trouble.{trouble}' |
6d0b1a69f98c
templates: display evolution "troubles" in command line style
Denis Laxalde <denis.laxalde@logilab.fr>
parents:
30696
diff
changeset
|
32 _cset_labels = 'log.changeset changeset.{phase}{if(troubles, " changeset.troubled {troubles%_trouble_label}")}' |
30696
667d9c93c412
templates-default: factor out definition of changeset labels
Denis Laxalde <denis.laxalde@logilab.fr>
parents:
25514
diff
changeset
|
33 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
|
34 "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
|
35 |
0ded0f0b1c04
log: rewrite default template to use labels (issue2866)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
15907
diff
changeset
|
36 lphase = '{label("log.phase", |
0ded0f0b1c04
log: rewrite default template to use labels (issue2866)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
15907
diff
changeset
|
37 "phase: {phase}")}\n' |
0ded0f0b1c04
log: rewrite default template to use labels (issue2866)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
15907
diff
changeset
|
38 |
30696
667d9c93c412
templates-default: factor out definition of changeset labels
Denis Laxalde <denis.laxalde@logilab.fr>
parents:
25514
diff
changeset
|
39 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
|
40 "changeset: {rev}:{node}")}\n' |
0ded0f0b1c04
log: rewrite default template to use labels (issue2866)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
15907
diff
changeset
|
41 |
0ded0f0b1c04
log: rewrite default template to use labels (issue2866)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
15907
diff
changeset
|
42 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
|
43 "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
|
44 |
24304
6136704b975d
templates: fix "log -q" output of default style
Yuya Nishihara <yuya@tcha.org>
parents:
22766
diff
changeset
|
45 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
|
46 "{rev}:{node|short}")}\n' |
0ded0f0b1c04
log: rewrite default template to use labels (issue2866)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
15907
diff
changeset
|
47 |
0ded0f0b1c04
log: rewrite default template to use labels (issue2866)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
15907
diff
changeset
|
48 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
|
49 "manifest: {rev}:{node}")}\n' |
0ded0f0b1c04
log: rewrite default template to use labels (issue2866)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
15907
diff
changeset
|
50 |
0ded0f0b1c04
log: rewrite default template to use labels (issue2866)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
15907
diff
changeset
|
51 branch = '{label("log.branch", |
0ded0f0b1c04
log: rewrite default template to use labels (issue2866)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
15907
diff
changeset
|
52 "branch: {branch}")}\n' |
0ded0f0b1c04
log: rewrite default template to use labels (issue2866)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
15907
diff
changeset
|
53 |
0ded0f0b1c04
log: rewrite default template to use labels (issue2866)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
15907
diff
changeset
|
54 tag = '{label("log.tag", |
0ded0f0b1c04
log: rewrite default template to use labels (issue2866)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
15907
diff
changeset
|
55 "tag: {tag}")}\n' |
0ded0f0b1c04
log: rewrite default template to use labels (issue2866)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
15907
diff
changeset
|
56 |
0ded0f0b1c04
log: rewrite default template to use labels (issue2866)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
15907
diff
changeset
|
57 bookmark = '{label("log.bookmark", |
0ded0f0b1c04
log: rewrite default template to use labels (issue2866)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
15907
diff
changeset
|
58 "bookmark: {bookmark}")}\n' |
0ded0f0b1c04
log: rewrite default template to use labels (issue2866)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
15907
diff
changeset
|
59 |
0ded0f0b1c04
log: rewrite default template to use labels (issue2866)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
15907
diff
changeset
|
60 user = '{label("log.user", |
0ded0f0b1c04
log: rewrite default template to use labels (issue2866)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
15907
diff
changeset
|
61 "user: {author}")}\n' |
0ded0f0b1c04
log: rewrite default template to use labels (issue2866)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
15907
diff
changeset
|
62 |
24637
c1cb6523e968
templates-default: do not show description or summary if empty
Yuya Nishihara <yuya@tcha.org>
parents:
24304
diff
changeset
|
63 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
|
64 '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
|
65 |
0ded0f0b1c04
log: rewrite default template to use labels (issue2866)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
15907
diff
changeset
|
66 ldate = '{label("log.date", |
0ded0f0b1c04
log: rewrite default template to use labels (issue2866)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
15907
diff
changeset
|
67 "date: {date|date}")}\n' |
0ded0f0b1c04
log: rewrite default template to use labels (issue2866)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
15907
diff
changeset
|
68 |
30713
6d0b1a69f98c
templates: display evolution "troubles" in command line style
Denis Laxalde <denis.laxalde@logilab.fr>
parents:
30696
diff
changeset
|
69 ltroubles = '{if(troubles, "{label('ui.note log.trouble', |
6d0b1a69f98c
templates: display evolution "troubles" in command line style
Denis Laxalde <denis.laxalde@logilab.fr>
parents:
30696
diff
changeset
|
70 'trouble: {join(troubles, ", ")}')}\n")}' |
6d0b1a69f98c
templates: display evolution "troubles" in command line style
Denis Laxalde <denis.laxalde@logilab.fr>
parents:
30696
diff
changeset
|
71 |
22766
0ded0f0b1c04
log: rewrite default template to use labels (issue2866)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
15907
diff
changeset
|
72 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
|
73 "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
|
74 |
24637
c1cb6523e968
templates-default: do not show description or summary if empty
Yuya Nishihara <yuya@tcha.org>
parents:
24304
diff
changeset
|
75 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
|
76 'description:')} |
c1cb6523e968
templates-default: do not show description or summary if empty
Yuya Nishihara <yuya@tcha.org>
parents:
24304
diff
changeset
|
77 {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 '{desc|strip}')}\n\n")}' |
25514
9b1a8ce1f03b
templates: add a default template style for status
Matt Mackall <mpm@selenic.com>
parents:
24637
diff
changeset
|
79 |
9b1a8ce1f03b
templates: add a default template style for status
Matt Mackall <mpm@selenic.com>
parents:
24637
diff
changeset
|
80 status = '{status} {path}\n{if(copy, " {copy}\n")}' |