Show More
@@ -1,25 +1,73 b'' | |||
|
1 | changeset = 'changeset: {rev}:{node|short}\n{branches}{bookmarks}{tags}{parents}user: {author}\ndate: {date|date}\nsummary: {desc|firstline}\n\n' | |
|
2 | changeset_quiet = '{rev}:{node|short}\n' | |
|
3 | 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' | |
|
4 | 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' | |
|
5 | start_files = 'files: ' | |
|
6 | file = ' {file}' | |
|
7 | end_files = '\n' | |
|
8 | start_file_mods = 'files: ' | |
|
9 | file_mod = ' {file_mod}' | |
|
10 | end_file_mods = '\n' | |
|
11 | start_file_adds = 'files+: ' | |
|
12 | file_add = ' {file_add}' | |
|
13 | end_file_adds = '\n' | |
|
14 | start_file_dels = 'files-: ' | |
|
15 | file_del = ' {file_del}' | |
|
16 | end_file_dels = '\n' | |
|
17 | start_file_copies = 'copies: ' | |
|
18 | file_copy = ' {name} ({source})' | |
|
19 | end_file_copies = '\n' | |
|
20 | parent = 'parent: {rev}:{node|formatnode}\n' | |
|
21 | manifest = 'manifest: {rev}:{node}\n' | |
|
22 | branch = 'branch: {branch}\n' | |
|
23 | tag = 'tag: {tag}\n' | |
|
24 | bookmark = 'bookmark: {bookmark}\n' | |
|
25 | extra = 'extra: {key}={value|stringescape}\n' | |
|
1 | # Base templates. Due to name clashes with existing keywords, we have | |
|
2 | # to replace some keywords with 'lkeyword', for 'labelled keyword' | |
|
3 | changeset = '{cset}{branches}{bookmarks}{tags}{parents}{user}{ldate}{summary}\n' | |
|
4 | changeset_quiet = '{node}' | |
|
5 | changeset_verbose = '{cset}{branches}{bookmarks}{tags}{parents}{user}{ldate}{lfiles}{lfile_copies_switch}{description}\n' | |
|
6 | changeset_debug = '{fullcset}{branches}{bookmarks}{tags}{lphase}{parents}{manifest}{user}{ldate}{lfile_mods}{lfile_adds}{lfile_dels}{lfile_copies_switch}{extras}{description}\n' | |
|
7 | ||
|
8 | # File templates | |
|
9 | lfiles = '{if(files, | |
|
10 | label("ui.note log.files", | |
|
11 | "files: {files}\n"))}' | |
|
12 | ||
|
13 | lfile_mods = '{if(file_mods, | |
|
14 | label("ui.debug log.files", | |
|
15 | "files: {file_mods}\n"))}' | |
|
16 | ||
|
17 | lfile_adds = '{if(file_adds, | |
|
18 | label("ui.debug log.files", | |
|
19 | "files+: {file_adds}\n"))}' | |
|
20 | ||
|
21 | lfile_dels = '{if(file_dels, | |
|
22 | label("ui.debug log.files", | |
|
23 | "files-: {file_dels}\n"))}' | |
|
24 | ||
|
25 | lfile_copies_switch = '{if(file_copies_switch, | |
|
26 | label("ui.note log.copies", | |
|
27 | "copies: {file_copies_switch | |
|
28 | % ' {name} ({source})'}\n"))}' | |
|
29 | ||
|
30 | # General templates | |
|
31 | cset = '{label("log.changeset changeset.{phase}", | |
|
32 | "changeset: {rev}:{node|short}")}\n' | |
|
33 | ||
|
34 | lphase = '{label("log.phase", | |
|
35 | "phase: {phase}")}\n' | |
|
36 | ||
|
37 | fullcset = '{label("log.changeset changeset.{phase}", | |
|
38 | "changeset: {rev}:{node}")}\n' | |
|
39 | ||
|
40 | parent = '{label("log.parent changeset.{phase}", | |
|
41 | "parent: {rev}:{node|formatnode}")}\n' | |
|
42 | ||
|
43 | node = '{label("log.node", | |
|
44 | "{rev}:{node|short}")}\n' | |
|
45 | ||
|
46 | manifest = '{label("ui.debug log.manifest", | |
|
47 | "manifest: {rev}:{node}")}\n' | |
|
48 | ||
|
49 | branch = '{label("log.branch", | |
|
50 | "branch: {branch}")}\n' | |
|
51 | ||
|
52 | tag = '{label("log.tag", | |
|
53 | "tag: {tag}")}\n' | |
|
54 | ||
|
55 | bookmark = '{label("log.bookmark", | |
|
56 | "bookmark: {bookmark}")}\n' | |
|
57 | ||
|
58 | user = '{label("log.user", | |
|
59 | "user: {author}")}\n' | |
|
60 | ||
|
61 | summary = '{label("log.summary", | |
|
62 | "summary: {desc|firstline}")}\n' | |
|
63 | ||
|
64 | ldate = '{label("log.date", | |
|
65 | "date: {date|date}")}\n' | |
|
66 | ||
|
67 | extra = '{label("ui.debug log.extra", | |
|
68 | "extra: {key}={value|stringescape}")}\n' | |
|
69 | ||
|
70 | description = '{label("ui.note log.description", | |
|
71 | "description:")} | |
|
72 | {label("ui.note log.description", | |
|
73 | "{desc|strip}")}\n\n' |
@@ -105,6 +105,26 b' Default style is like normal output:' | |||
|
105 | 105 | $ hg log --debug --style default > style.out |
|
106 | 106 | $ cmp log.out style.out || diff -u log.out style.out |
|
107 | 107 | |
|
108 | Default style should also preserve color information (issue2866): | |
|
109 | ||
|
110 | $ cp $HGRCPATH $HGRCPATH-bak | |
|
111 | $ cat <<EOF >> $HGRCPATH | |
|
112 | > [extensions] | |
|
113 | > color= | |
|
114 | > EOF | |
|
115 | ||
|
116 | $ hg --color=debug log > log.out | |
|
117 | $ hg --color=debug log --style default > style.out | |
|
118 | $ cmp log.out style.out || diff -u log.out style.out | |
|
119 | $ hg --color=debug -v log > log.out | |
|
120 | $ hg --color=debug -v log --style default > style.out | |
|
121 | $ cmp log.out style.out || diff -u log.out style.out | |
|
122 | $ hg --color=debug --debug log > log.out | |
|
123 | $ hg --color=debug --debug log --style default > style.out | |
|
124 | $ cmp log.out style.out || diff -u log.out style.out | |
|
125 | ||
|
126 | $ mv $HGRCPATH-bak $HGRCPATH | |
|
127 | ||
|
108 | 128 | Revision with no copies (used to print a traceback): |
|
109 | 129 | |
|
110 | 130 | $ hg tip -v --template '\n' |
General Comments 0
You need to be logged in to leave comments.
Login now