##// END OF EJS Templates
templates-default: do not show description or summary if empty...
Yuya Nishihara -
r24637:c1cb6523 default
parent child Browse files
Show More
@@ -1,73 +1,73 b''
1 # Base templates. Due to name clashes with existing keywords, we have
1 # Base templates. Due to name clashes with existing keywords, we have
2 # to replace some keywords with 'lkeyword', for 'labelled keyword'
2 # to replace some keywords with 'lkeyword', for 'labelled keyword'
3 changeset = '{cset}{branches}{bookmarks}{tags}{parents}{user}{ldate}{summary}\n'
3 changeset = '{cset}{branches}{bookmarks}{tags}{parents}{user}{ldate}{summary}\n'
4 changeset_quiet = '{lnode}'
4 changeset_quiet = '{lnode}'
5 changeset_verbose = '{cset}{branches}{bookmarks}{tags}{parents}{user}{ldate}{lfiles}{lfile_copies_switch}{description}\n'
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'
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
7
8 # File templates
8 # File templates
9 lfiles = '{if(files,
9 lfiles = '{if(files,
10 label("ui.note log.files",
10 label("ui.note log.files",
11 "files: {files}\n"))}'
11 "files: {files}\n"))}'
12
12
13 lfile_mods = '{if(file_mods,
13 lfile_mods = '{if(file_mods,
14 label("ui.debug log.files",
14 label("ui.debug log.files",
15 "files: {file_mods}\n"))}'
15 "files: {file_mods}\n"))}'
16
16
17 lfile_adds = '{if(file_adds,
17 lfile_adds = '{if(file_adds,
18 label("ui.debug log.files",
18 label("ui.debug log.files",
19 "files+: {file_adds}\n"))}'
19 "files+: {file_adds}\n"))}'
20
20
21 lfile_dels = '{if(file_dels,
21 lfile_dels = '{if(file_dels,
22 label("ui.debug log.files",
22 label("ui.debug log.files",
23 "files-: {file_dels}\n"))}'
23 "files-: {file_dels}\n"))}'
24
24
25 lfile_copies_switch = '{if(file_copies_switch,
25 lfile_copies_switch = '{if(file_copies_switch,
26 label("ui.note log.copies",
26 label("ui.note log.copies",
27 "copies: {file_copies_switch
27 "copies: {file_copies_switch
28 % ' {name} ({source})'}\n"))}'
28 % ' {name} ({source})'}\n"))}'
29
29
30 # General templates
30 # General templates
31 cset = '{label("log.changeset changeset.{phase}",
31 cset = '{label("log.changeset changeset.{phase}",
32 "changeset: {rev}:{node|short}")}\n'
32 "changeset: {rev}:{node|short}")}\n'
33
33
34 lphase = '{label("log.phase",
34 lphase = '{label("log.phase",
35 "phase: {phase}")}\n'
35 "phase: {phase}")}\n'
36
36
37 fullcset = '{label("log.changeset changeset.{phase}",
37 fullcset = '{label("log.changeset changeset.{phase}",
38 "changeset: {rev}:{node}")}\n'
38 "changeset: {rev}:{node}")}\n'
39
39
40 parent = '{label("log.parent changeset.{phase}",
40 parent = '{label("log.parent changeset.{phase}",
41 "parent: {rev}:{node|formatnode}")}\n'
41 "parent: {rev}:{node|formatnode}")}\n'
42
42
43 lnode = '{label("log.node",
43 lnode = '{label("log.node",
44 "{rev}:{node|short}")}\n'
44 "{rev}:{node|short}")}\n'
45
45
46 manifest = '{label("ui.debug log.manifest",
46 manifest = '{label("ui.debug log.manifest",
47 "manifest: {rev}:{node}")}\n'
47 "manifest: {rev}:{node}")}\n'
48
48
49 branch = '{label("log.branch",
49 branch = '{label("log.branch",
50 "branch: {branch}")}\n'
50 "branch: {branch}")}\n'
51
51
52 tag = '{label("log.tag",
52 tag = '{label("log.tag",
53 "tag: {tag}")}\n'
53 "tag: {tag}")}\n'
54
54
55 bookmark = '{label("log.bookmark",
55 bookmark = '{label("log.bookmark",
56 "bookmark: {bookmark}")}\n'
56 "bookmark: {bookmark}")}\n'
57
57
58 user = '{label("log.user",
58 user = '{label("log.user",
59 "user: {author}")}\n'
59 "user: {author}")}\n'
60
60
61 summary = '{label("log.summary",
61 summary = '{if(desc|strip, "{label('log.summary',
62 "summary: {desc|firstline}")}\n'
62 'summary: {desc|firstline}')}\n")}'
63
63
64 ldate = '{label("log.date",
64 ldate = '{label("log.date",
65 "date: {date|date}")}\n'
65 "date: {date|date}")}\n'
66
66
67 extra = '{label("ui.debug log.extra",
67 extra = '{label("ui.debug log.extra",
68 "extra: {key}={value|stringescape}")}\n'
68 "extra: {key}={value|stringescape}")}\n'
69
69
70 description = '{label("ui.note log.description",
70 description = '{if(desc|strip, "{label('ui.note log.description',
71 "description:")}
71 'description:')}
72 {label("ui.note log.description",
72 {label('ui.note log.description',
73 "{desc|strip}")}\n\n'
73 '{desc|strip}')}\n\n")}'
@@ -1,2550 +1,2556 b''
1 $ hg init a
1 $ hg init a
2 $ cd a
2 $ cd a
3 $ echo a > a
3 $ echo a > a
4 $ hg add a
4 $ hg add a
5 $ echo line 1 > b
5 $ echo line 1 > b
6 $ echo line 2 >> b
6 $ echo line 2 >> b
7 $ hg commit -l b -d '1000000 0' -u 'User Name <user@hostname>'
7 $ hg commit -l b -d '1000000 0' -u 'User Name <user@hostname>'
8
8
9 $ hg add b
9 $ hg add b
10 $ echo other 1 > c
10 $ echo other 1 > c
11 $ echo other 2 >> c
11 $ echo other 2 >> c
12 $ echo >> c
12 $ echo >> c
13 $ echo other 3 >> c
13 $ echo other 3 >> c
14 $ hg commit -l c -d '1100000 0' -u 'A. N. Other <other@place>'
14 $ hg commit -l c -d '1100000 0' -u 'A. N. Other <other@place>'
15
15
16 $ hg add c
16 $ hg add c
17 $ hg commit -m 'no person' -d '1200000 0' -u 'other@place'
17 $ hg commit -m 'no person' -d '1200000 0' -u 'other@place'
18 $ echo c >> c
18 $ echo c >> c
19 $ hg commit -m 'no user, no domain' -d '1300000 0' -u 'person'
19 $ hg commit -m 'no user, no domain' -d '1300000 0' -u 'person'
20
20
21 $ echo foo > .hg/branch
21 $ echo foo > .hg/branch
22 $ hg commit -m 'new branch' -d '1400000 0' -u 'person'
22 $ hg commit -m 'new branch' -d '1400000 0' -u 'person'
23
23
24 $ hg co -q 3
24 $ hg co -q 3
25 $ echo other 4 >> d
25 $ echo other 4 >> d
26 $ hg add d
26 $ hg add d
27 $ hg commit -m 'new head' -d '1500000 0' -u 'person'
27 $ hg commit -m 'new head' -d '1500000 0' -u 'person'
28
28
29 $ hg merge -q foo
29 $ hg merge -q foo
30 $ hg commit -m 'merge' -d '1500001 0' -u 'person'
30 $ hg commit -m 'merge' -d '1500001 0' -u 'person'
31
31
32 Second branch starting at nullrev:
32 Second branch starting at nullrev:
33
33
34 $ hg update null
34 $ hg update null
35 0 files updated, 0 files merged, 4 files removed, 0 files unresolved
35 0 files updated, 0 files merged, 4 files removed, 0 files unresolved
36 $ echo second > second
36 $ echo second > second
37 $ hg add second
37 $ hg add second
38 $ hg commit -m second -d '1000000 0' -u 'User Name <user@hostname>'
38 $ hg commit -m second -d '1000000 0' -u 'User Name <user@hostname>'
39 created new head
39 created new head
40
40
41 $ echo third > third
41 $ echo third > third
42 $ hg add third
42 $ hg add third
43 $ hg mv second fourth
43 $ hg mv second fourth
44 $ hg commit -m third -d "2020-01-01 10:01"
44 $ hg commit -m third -d "2020-01-01 10:01"
45
45
46 $ hg log --template '{join(file_copies, ",\n")}\n' -r .
46 $ hg log --template '{join(file_copies, ",\n")}\n' -r .
47 fourth (second)
47 fourth (second)
48 $ hg log -T '{file_copies % "{source} -> {name}\n"}' -r .
48 $ hg log -T '{file_copies % "{source} -> {name}\n"}' -r .
49 second -> fourth
49 second -> fourth
50 $ hg log -T '{rev} {ifcontains("fourth", file_copies, "t", "f")}\n' -r .:7
50 $ hg log -T '{rev} {ifcontains("fourth", file_copies, "t", "f")}\n' -r .:7
51 8 t
51 8 t
52 7 f
52 7 f
53
53
54 Quoting for ui.logtemplate
54 Quoting for ui.logtemplate
55
55
56 $ hg tip --config "ui.logtemplate={rev}\n"
56 $ hg tip --config "ui.logtemplate={rev}\n"
57 8
57 8
58 $ hg tip --config "ui.logtemplate='{rev}\n'"
58 $ hg tip --config "ui.logtemplate='{rev}\n'"
59 8
59 8
60 $ hg tip --config 'ui.logtemplate="{rev}\n"'
60 $ hg tip --config 'ui.logtemplate="{rev}\n"'
61 8
61 8
62
62
63 Make sure user/global hgrc does not affect tests
63 Make sure user/global hgrc does not affect tests
64
64
65 $ echo '[ui]' > .hg/hgrc
65 $ echo '[ui]' > .hg/hgrc
66 $ echo 'logtemplate =' >> .hg/hgrc
66 $ echo 'logtemplate =' >> .hg/hgrc
67 $ echo 'style =' >> .hg/hgrc
67 $ echo 'style =' >> .hg/hgrc
68
68
69 Add some simple styles to settings
69 Add some simple styles to settings
70
70
71 $ echo '[templates]' >> .hg/hgrc
71 $ echo '[templates]' >> .hg/hgrc
72 $ printf 'simple = "{rev}\\n"\n' >> .hg/hgrc
72 $ printf 'simple = "{rev}\\n"\n' >> .hg/hgrc
73 $ printf 'simple2 = {rev}\\n\n' >> .hg/hgrc
73 $ printf 'simple2 = {rev}\\n\n' >> .hg/hgrc
74
74
75 $ hg log -l1 -Tsimple
75 $ hg log -l1 -Tsimple
76 8
76 8
77 $ hg log -l1 -Tsimple2
77 $ hg log -l1 -Tsimple2
78 8
78 8
79
79
80 Test templates and style maps in files:
80 Test templates and style maps in files:
81
81
82 $ echo "{rev}" > tmpl
82 $ echo "{rev}" > tmpl
83 $ hg log -l1 -T./tmpl
83 $ hg log -l1 -T./tmpl
84 8
84 8
85 $ hg log -l1 -Tblah/blah
85 $ hg log -l1 -Tblah/blah
86 blah/blah (no-eol)
86 blah/blah (no-eol)
87
87
88 $ printf 'changeset = "{rev}\\n"\n' > map-simple
88 $ printf 'changeset = "{rev}\\n"\n' > map-simple
89 $ hg log -l1 -T./map-simple
89 $ hg log -l1 -T./map-simple
90 8
90 8
91
91
92 Template should precede style option
92 Template should precede style option
93
93
94 $ hg log -l1 --style default -T '{rev}\n'
94 $ hg log -l1 --style default -T '{rev}\n'
95 8
95 8
96
96
97 Default style is like normal output:
97 Default style is like normal output:
98
98
99 $ echo c >> c
100 $ hg add c
101 $ hg commit -qm ' '
102
99 $ hg log > log.out
103 $ hg log > log.out
100 $ hg log --style default > style.out
104 $ hg log --style default > style.out
101 $ cmp log.out style.out || diff -u log.out style.out
105 $ cmp log.out style.out || diff -u log.out style.out
102
106
103 $ hg log -v > log.out
107 $ hg log -v > log.out
104 $ hg log -v --style default > style.out
108 $ hg log -v --style default > style.out
105 $ cmp log.out style.out || diff -u log.out style.out
109 $ cmp log.out style.out || diff -u log.out style.out
106
110
107 $ hg log -q > log.out
111 $ hg log -q > log.out
108 $ hg log -q --style default > style.out
112 $ hg log -q --style default > style.out
109 $ cmp log.out style.out || diff -u log.out style.out
113 $ cmp log.out style.out || diff -u log.out style.out
110
114
111 $ hg log --debug > log.out
115 $ hg log --debug > log.out
112 $ hg log --debug --style default > style.out
116 $ hg log --debug --style default > style.out
113 $ cmp log.out style.out || diff -u log.out style.out
117 $ cmp log.out style.out || diff -u log.out style.out
114
118
115 Default style should also preserve color information (issue2866):
119 Default style should also preserve color information (issue2866):
116
120
117 $ cp $HGRCPATH $HGRCPATH-bak
121 $ cp $HGRCPATH $HGRCPATH-bak
118 $ cat <<EOF >> $HGRCPATH
122 $ cat <<EOF >> $HGRCPATH
119 > [extensions]
123 > [extensions]
120 > color=
124 > color=
121 > EOF
125 > EOF
122
126
123 $ hg --color=debug log > log.out
127 $ hg --color=debug log > log.out
124 $ hg --color=debug log --style default > style.out
128 $ hg --color=debug log --style default > style.out
125 $ cmp log.out style.out || diff -u log.out style.out
129 $ cmp log.out style.out || diff -u log.out style.out
126 $ hg --color=debug -v log > log.out
130 $ hg --color=debug -v log > log.out
127 $ hg --color=debug -v log --style default > style.out
131 $ hg --color=debug -v log --style default > style.out
128 $ cmp log.out style.out || diff -u log.out style.out
132 $ cmp log.out style.out || diff -u log.out style.out
129 $ hg --color=debug -q log > log.out
133 $ hg --color=debug -q log > log.out
130 $ hg --color=debug -q log --style default > style.out
134 $ hg --color=debug -q log --style default > style.out
131 $ cmp log.out style.out || diff -u log.out style.out
135 $ cmp log.out style.out || diff -u log.out style.out
132 $ hg --color=debug --debug log > log.out
136 $ hg --color=debug --debug log > log.out
133 $ hg --color=debug --debug log --style default > style.out
137 $ hg --color=debug --debug log --style default > style.out
134 $ cmp log.out style.out || diff -u log.out style.out
138 $ cmp log.out style.out || diff -u log.out style.out
135
139
136 $ mv $HGRCPATH-bak $HGRCPATH
140 $ mv $HGRCPATH-bak $HGRCPATH
137
141
142 $ hg --config extensions.strip= strip -q .
143
138 Revision with no copies (used to print a traceback):
144 Revision with no copies (used to print a traceback):
139
145
140 $ hg tip -v --template '\n'
146 $ hg tip -v --template '\n'
141
147
142
148
143 Compact style works:
149 Compact style works:
144
150
145 $ hg log -Tcompact
151 $ hg log -Tcompact
146 8[tip] 95c24699272e 2020-01-01 10:01 +0000 test
152 8[tip] 95c24699272e 2020-01-01 10:01 +0000 test
147 third
153 third
148
154
149 7:-1 29114dbae42b 1970-01-12 13:46 +0000 user
155 7:-1 29114dbae42b 1970-01-12 13:46 +0000 user
150 second
156 second
151
157
152 6:5,4 d41e714fe50d 1970-01-18 08:40 +0000 person
158 6:5,4 d41e714fe50d 1970-01-18 08:40 +0000 person
153 merge
159 merge
154
160
155 5:3 13207e5a10d9 1970-01-18 08:40 +0000 person
161 5:3 13207e5a10d9 1970-01-18 08:40 +0000 person
156 new head
162 new head
157
163
158 4 bbe44766e73d 1970-01-17 04:53 +0000 person
164 4 bbe44766e73d 1970-01-17 04:53 +0000 person
159 new branch
165 new branch
160
166
161 3 10e46f2dcbf4 1970-01-16 01:06 +0000 person
167 3 10e46f2dcbf4 1970-01-16 01:06 +0000 person
162 no user, no domain
168 no user, no domain
163
169
164 2 97054abb4ab8 1970-01-14 21:20 +0000 other
170 2 97054abb4ab8 1970-01-14 21:20 +0000 other
165 no person
171 no person
166
172
167 1 b608e9d1a3f0 1970-01-13 17:33 +0000 other
173 1 b608e9d1a3f0 1970-01-13 17:33 +0000 other
168 other 1
174 other 1
169
175
170 0 1e4e1b8f71e0 1970-01-12 13:46 +0000 user
176 0 1e4e1b8f71e0 1970-01-12 13:46 +0000 user
171 line 1
177 line 1
172
178
173
179
174 $ hg log -v --style compact
180 $ hg log -v --style compact
175 8[tip] 95c24699272e 2020-01-01 10:01 +0000 test
181 8[tip] 95c24699272e 2020-01-01 10:01 +0000 test
176 third
182 third
177
183
178 7:-1 29114dbae42b 1970-01-12 13:46 +0000 User Name <user@hostname>
184 7:-1 29114dbae42b 1970-01-12 13:46 +0000 User Name <user@hostname>
179 second
185 second
180
186
181 6:5,4 d41e714fe50d 1970-01-18 08:40 +0000 person
187 6:5,4 d41e714fe50d 1970-01-18 08:40 +0000 person
182 merge
188 merge
183
189
184 5:3 13207e5a10d9 1970-01-18 08:40 +0000 person
190 5:3 13207e5a10d9 1970-01-18 08:40 +0000 person
185 new head
191 new head
186
192
187 4 bbe44766e73d 1970-01-17 04:53 +0000 person
193 4 bbe44766e73d 1970-01-17 04:53 +0000 person
188 new branch
194 new branch
189
195
190 3 10e46f2dcbf4 1970-01-16 01:06 +0000 person
196 3 10e46f2dcbf4 1970-01-16 01:06 +0000 person
191 no user, no domain
197 no user, no domain
192
198
193 2 97054abb4ab8 1970-01-14 21:20 +0000 other@place
199 2 97054abb4ab8 1970-01-14 21:20 +0000 other@place
194 no person
200 no person
195
201
196 1 b608e9d1a3f0 1970-01-13 17:33 +0000 A. N. Other <other@place>
202 1 b608e9d1a3f0 1970-01-13 17:33 +0000 A. N. Other <other@place>
197 other 1
203 other 1
198 other 2
204 other 2
199
205
200 other 3
206 other 3
201
207
202 0 1e4e1b8f71e0 1970-01-12 13:46 +0000 User Name <user@hostname>
208 0 1e4e1b8f71e0 1970-01-12 13:46 +0000 User Name <user@hostname>
203 line 1
209 line 1
204 line 2
210 line 2
205
211
206
212
207 $ hg log --debug --style compact
213 $ hg log --debug --style compact
208 8[tip]:7,-1 95c24699272e 2020-01-01 10:01 +0000 test
214 8[tip]:7,-1 95c24699272e 2020-01-01 10:01 +0000 test
209 third
215 third
210
216
211 7:-1,-1 29114dbae42b 1970-01-12 13:46 +0000 User Name <user@hostname>
217 7:-1,-1 29114dbae42b 1970-01-12 13:46 +0000 User Name <user@hostname>
212 second
218 second
213
219
214 6:5,4 d41e714fe50d 1970-01-18 08:40 +0000 person
220 6:5,4 d41e714fe50d 1970-01-18 08:40 +0000 person
215 merge
221 merge
216
222
217 5:3,-1 13207e5a10d9 1970-01-18 08:40 +0000 person
223 5:3,-1 13207e5a10d9 1970-01-18 08:40 +0000 person
218 new head
224 new head
219
225
220 4:3,-1 bbe44766e73d 1970-01-17 04:53 +0000 person
226 4:3,-1 bbe44766e73d 1970-01-17 04:53 +0000 person
221 new branch
227 new branch
222
228
223 3:2,-1 10e46f2dcbf4 1970-01-16 01:06 +0000 person
229 3:2,-1 10e46f2dcbf4 1970-01-16 01:06 +0000 person
224 no user, no domain
230 no user, no domain
225
231
226 2:1,-1 97054abb4ab8 1970-01-14 21:20 +0000 other@place
232 2:1,-1 97054abb4ab8 1970-01-14 21:20 +0000 other@place
227 no person
233 no person
228
234
229 1:0,-1 b608e9d1a3f0 1970-01-13 17:33 +0000 A. N. Other <other@place>
235 1:0,-1 b608e9d1a3f0 1970-01-13 17:33 +0000 A. N. Other <other@place>
230 other 1
236 other 1
231 other 2
237 other 2
232
238
233 other 3
239 other 3
234
240
235 0:-1,-1 1e4e1b8f71e0 1970-01-12 13:46 +0000 User Name <user@hostname>
241 0:-1,-1 1e4e1b8f71e0 1970-01-12 13:46 +0000 User Name <user@hostname>
236 line 1
242 line 1
237 line 2
243 line 2
238
244
239
245
240 Test xml styles:
246 Test xml styles:
241
247
242 $ hg log --style xml
248 $ hg log --style xml
243 <?xml version="1.0"?>
249 <?xml version="1.0"?>
244 <log>
250 <log>
245 <logentry revision="8" node="95c24699272ef57d062b8bccc32c878bf841784a">
251 <logentry revision="8" node="95c24699272ef57d062b8bccc32c878bf841784a">
246 <tag>tip</tag>
252 <tag>tip</tag>
247 <author email="test">test</author>
253 <author email="test">test</author>
248 <date>2020-01-01T10:01:00+00:00</date>
254 <date>2020-01-01T10:01:00+00:00</date>
249 <msg xml:space="preserve">third</msg>
255 <msg xml:space="preserve">third</msg>
250 </logentry>
256 </logentry>
251 <logentry revision="7" node="29114dbae42b9f078cf2714dbe3a86bba8ec7453">
257 <logentry revision="7" node="29114dbae42b9f078cf2714dbe3a86bba8ec7453">
252 <parent revision="-1" node="0000000000000000000000000000000000000000" />
258 <parent revision="-1" node="0000000000000000000000000000000000000000" />
253 <author email="user@hostname">User Name</author>
259 <author email="user@hostname">User Name</author>
254 <date>1970-01-12T13:46:40+00:00</date>
260 <date>1970-01-12T13:46:40+00:00</date>
255 <msg xml:space="preserve">second</msg>
261 <msg xml:space="preserve">second</msg>
256 </logentry>
262 </logentry>
257 <logentry revision="6" node="d41e714fe50d9e4a5f11b4d595d543481b5f980b">
263 <logentry revision="6" node="d41e714fe50d9e4a5f11b4d595d543481b5f980b">
258 <parent revision="5" node="13207e5a10d9fd28ec424934298e176197f2c67f" />
264 <parent revision="5" node="13207e5a10d9fd28ec424934298e176197f2c67f" />
259 <parent revision="4" node="bbe44766e73d5f11ed2177f1838de10c53ef3e74" />
265 <parent revision="4" node="bbe44766e73d5f11ed2177f1838de10c53ef3e74" />
260 <author email="person">person</author>
266 <author email="person">person</author>
261 <date>1970-01-18T08:40:01+00:00</date>
267 <date>1970-01-18T08:40:01+00:00</date>
262 <msg xml:space="preserve">merge</msg>
268 <msg xml:space="preserve">merge</msg>
263 </logentry>
269 </logentry>
264 <logentry revision="5" node="13207e5a10d9fd28ec424934298e176197f2c67f">
270 <logentry revision="5" node="13207e5a10d9fd28ec424934298e176197f2c67f">
265 <parent revision="3" node="10e46f2dcbf4823578cf180f33ecf0b957964c47" />
271 <parent revision="3" node="10e46f2dcbf4823578cf180f33ecf0b957964c47" />
266 <author email="person">person</author>
272 <author email="person">person</author>
267 <date>1970-01-18T08:40:00+00:00</date>
273 <date>1970-01-18T08:40:00+00:00</date>
268 <msg xml:space="preserve">new head</msg>
274 <msg xml:space="preserve">new head</msg>
269 </logentry>
275 </logentry>
270 <logentry revision="4" node="bbe44766e73d5f11ed2177f1838de10c53ef3e74">
276 <logentry revision="4" node="bbe44766e73d5f11ed2177f1838de10c53ef3e74">
271 <branch>foo</branch>
277 <branch>foo</branch>
272 <author email="person">person</author>
278 <author email="person">person</author>
273 <date>1970-01-17T04:53:20+00:00</date>
279 <date>1970-01-17T04:53:20+00:00</date>
274 <msg xml:space="preserve">new branch</msg>
280 <msg xml:space="preserve">new branch</msg>
275 </logentry>
281 </logentry>
276 <logentry revision="3" node="10e46f2dcbf4823578cf180f33ecf0b957964c47">
282 <logentry revision="3" node="10e46f2dcbf4823578cf180f33ecf0b957964c47">
277 <author email="person">person</author>
283 <author email="person">person</author>
278 <date>1970-01-16T01:06:40+00:00</date>
284 <date>1970-01-16T01:06:40+00:00</date>
279 <msg xml:space="preserve">no user, no domain</msg>
285 <msg xml:space="preserve">no user, no domain</msg>
280 </logentry>
286 </logentry>
281 <logentry revision="2" node="97054abb4ab824450e9164180baf491ae0078465">
287 <logentry revision="2" node="97054abb4ab824450e9164180baf491ae0078465">
282 <author email="other@place">other</author>
288 <author email="other@place">other</author>
283 <date>1970-01-14T21:20:00+00:00</date>
289 <date>1970-01-14T21:20:00+00:00</date>
284 <msg xml:space="preserve">no person</msg>
290 <msg xml:space="preserve">no person</msg>
285 </logentry>
291 </logentry>
286 <logentry revision="1" node="b608e9d1a3f0273ccf70fb85fd6866b3482bf965">
292 <logentry revision="1" node="b608e9d1a3f0273ccf70fb85fd6866b3482bf965">
287 <author email="other@place">A. N. Other</author>
293 <author email="other@place">A. N. Other</author>
288 <date>1970-01-13T17:33:20+00:00</date>
294 <date>1970-01-13T17:33:20+00:00</date>
289 <msg xml:space="preserve">other 1
295 <msg xml:space="preserve">other 1
290 other 2
296 other 2
291
297
292 other 3</msg>
298 other 3</msg>
293 </logentry>
299 </logentry>
294 <logentry revision="0" node="1e4e1b8f71e05681d422154f5421e385fec3454f">
300 <logentry revision="0" node="1e4e1b8f71e05681d422154f5421e385fec3454f">
295 <author email="user@hostname">User Name</author>
301 <author email="user@hostname">User Name</author>
296 <date>1970-01-12T13:46:40+00:00</date>
302 <date>1970-01-12T13:46:40+00:00</date>
297 <msg xml:space="preserve">line 1
303 <msg xml:space="preserve">line 1
298 line 2</msg>
304 line 2</msg>
299 </logentry>
305 </logentry>
300 </log>
306 </log>
301
307
302 $ hg log -v --style xml
308 $ hg log -v --style xml
303 <?xml version="1.0"?>
309 <?xml version="1.0"?>
304 <log>
310 <log>
305 <logentry revision="8" node="95c24699272ef57d062b8bccc32c878bf841784a">
311 <logentry revision="8" node="95c24699272ef57d062b8bccc32c878bf841784a">
306 <tag>tip</tag>
312 <tag>tip</tag>
307 <author email="test">test</author>
313 <author email="test">test</author>
308 <date>2020-01-01T10:01:00+00:00</date>
314 <date>2020-01-01T10:01:00+00:00</date>
309 <msg xml:space="preserve">third</msg>
315 <msg xml:space="preserve">third</msg>
310 <paths>
316 <paths>
311 <path action="A">fourth</path>
317 <path action="A">fourth</path>
312 <path action="A">third</path>
318 <path action="A">third</path>
313 <path action="R">second</path>
319 <path action="R">second</path>
314 </paths>
320 </paths>
315 <copies>
321 <copies>
316 <copy source="second">fourth</copy>
322 <copy source="second">fourth</copy>
317 </copies>
323 </copies>
318 </logentry>
324 </logentry>
319 <logentry revision="7" node="29114dbae42b9f078cf2714dbe3a86bba8ec7453">
325 <logentry revision="7" node="29114dbae42b9f078cf2714dbe3a86bba8ec7453">
320 <parent revision="-1" node="0000000000000000000000000000000000000000" />
326 <parent revision="-1" node="0000000000000000000000000000000000000000" />
321 <author email="user@hostname">User Name</author>
327 <author email="user@hostname">User Name</author>
322 <date>1970-01-12T13:46:40+00:00</date>
328 <date>1970-01-12T13:46:40+00:00</date>
323 <msg xml:space="preserve">second</msg>
329 <msg xml:space="preserve">second</msg>
324 <paths>
330 <paths>
325 <path action="A">second</path>
331 <path action="A">second</path>
326 </paths>
332 </paths>
327 </logentry>
333 </logentry>
328 <logentry revision="6" node="d41e714fe50d9e4a5f11b4d595d543481b5f980b">
334 <logentry revision="6" node="d41e714fe50d9e4a5f11b4d595d543481b5f980b">
329 <parent revision="5" node="13207e5a10d9fd28ec424934298e176197f2c67f" />
335 <parent revision="5" node="13207e5a10d9fd28ec424934298e176197f2c67f" />
330 <parent revision="4" node="bbe44766e73d5f11ed2177f1838de10c53ef3e74" />
336 <parent revision="4" node="bbe44766e73d5f11ed2177f1838de10c53ef3e74" />
331 <author email="person">person</author>
337 <author email="person">person</author>
332 <date>1970-01-18T08:40:01+00:00</date>
338 <date>1970-01-18T08:40:01+00:00</date>
333 <msg xml:space="preserve">merge</msg>
339 <msg xml:space="preserve">merge</msg>
334 <paths>
340 <paths>
335 </paths>
341 </paths>
336 </logentry>
342 </logentry>
337 <logentry revision="5" node="13207e5a10d9fd28ec424934298e176197f2c67f">
343 <logentry revision="5" node="13207e5a10d9fd28ec424934298e176197f2c67f">
338 <parent revision="3" node="10e46f2dcbf4823578cf180f33ecf0b957964c47" />
344 <parent revision="3" node="10e46f2dcbf4823578cf180f33ecf0b957964c47" />
339 <author email="person">person</author>
345 <author email="person">person</author>
340 <date>1970-01-18T08:40:00+00:00</date>
346 <date>1970-01-18T08:40:00+00:00</date>
341 <msg xml:space="preserve">new head</msg>
347 <msg xml:space="preserve">new head</msg>
342 <paths>
348 <paths>
343 <path action="A">d</path>
349 <path action="A">d</path>
344 </paths>
350 </paths>
345 </logentry>
351 </logentry>
346 <logentry revision="4" node="bbe44766e73d5f11ed2177f1838de10c53ef3e74">
352 <logentry revision="4" node="bbe44766e73d5f11ed2177f1838de10c53ef3e74">
347 <branch>foo</branch>
353 <branch>foo</branch>
348 <author email="person">person</author>
354 <author email="person">person</author>
349 <date>1970-01-17T04:53:20+00:00</date>
355 <date>1970-01-17T04:53:20+00:00</date>
350 <msg xml:space="preserve">new branch</msg>
356 <msg xml:space="preserve">new branch</msg>
351 <paths>
357 <paths>
352 </paths>
358 </paths>
353 </logentry>
359 </logentry>
354 <logentry revision="3" node="10e46f2dcbf4823578cf180f33ecf0b957964c47">
360 <logentry revision="3" node="10e46f2dcbf4823578cf180f33ecf0b957964c47">
355 <author email="person">person</author>
361 <author email="person">person</author>
356 <date>1970-01-16T01:06:40+00:00</date>
362 <date>1970-01-16T01:06:40+00:00</date>
357 <msg xml:space="preserve">no user, no domain</msg>
363 <msg xml:space="preserve">no user, no domain</msg>
358 <paths>
364 <paths>
359 <path action="M">c</path>
365 <path action="M">c</path>
360 </paths>
366 </paths>
361 </logentry>
367 </logentry>
362 <logentry revision="2" node="97054abb4ab824450e9164180baf491ae0078465">
368 <logentry revision="2" node="97054abb4ab824450e9164180baf491ae0078465">
363 <author email="other@place">other</author>
369 <author email="other@place">other</author>
364 <date>1970-01-14T21:20:00+00:00</date>
370 <date>1970-01-14T21:20:00+00:00</date>
365 <msg xml:space="preserve">no person</msg>
371 <msg xml:space="preserve">no person</msg>
366 <paths>
372 <paths>
367 <path action="A">c</path>
373 <path action="A">c</path>
368 </paths>
374 </paths>
369 </logentry>
375 </logentry>
370 <logentry revision="1" node="b608e9d1a3f0273ccf70fb85fd6866b3482bf965">
376 <logentry revision="1" node="b608e9d1a3f0273ccf70fb85fd6866b3482bf965">
371 <author email="other@place">A. N. Other</author>
377 <author email="other@place">A. N. Other</author>
372 <date>1970-01-13T17:33:20+00:00</date>
378 <date>1970-01-13T17:33:20+00:00</date>
373 <msg xml:space="preserve">other 1
379 <msg xml:space="preserve">other 1
374 other 2
380 other 2
375
381
376 other 3</msg>
382 other 3</msg>
377 <paths>
383 <paths>
378 <path action="A">b</path>
384 <path action="A">b</path>
379 </paths>
385 </paths>
380 </logentry>
386 </logentry>
381 <logentry revision="0" node="1e4e1b8f71e05681d422154f5421e385fec3454f">
387 <logentry revision="0" node="1e4e1b8f71e05681d422154f5421e385fec3454f">
382 <author email="user@hostname">User Name</author>
388 <author email="user@hostname">User Name</author>
383 <date>1970-01-12T13:46:40+00:00</date>
389 <date>1970-01-12T13:46:40+00:00</date>
384 <msg xml:space="preserve">line 1
390 <msg xml:space="preserve">line 1
385 line 2</msg>
391 line 2</msg>
386 <paths>
392 <paths>
387 <path action="A">a</path>
393 <path action="A">a</path>
388 </paths>
394 </paths>
389 </logentry>
395 </logentry>
390 </log>
396 </log>
391
397
392 $ hg log --debug --style xml
398 $ hg log --debug --style xml
393 <?xml version="1.0"?>
399 <?xml version="1.0"?>
394 <log>
400 <log>
395 <logentry revision="8" node="95c24699272ef57d062b8bccc32c878bf841784a">
401 <logentry revision="8" node="95c24699272ef57d062b8bccc32c878bf841784a">
396 <tag>tip</tag>
402 <tag>tip</tag>
397 <parent revision="7" node="29114dbae42b9f078cf2714dbe3a86bba8ec7453" />
403 <parent revision="7" node="29114dbae42b9f078cf2714dbe3a86bba8ec7453" />
398 <parent revision="-1" node="0000000000000000000000000000000000000000" />
404 <parent revision="-1" node="0000000000000000000000000000000000000000" />
399 <author email="test">test</author>
405 <author email="test">test</author>
400 <date>2020-01-01T10:01:00+00:00</date>
406 <date>2020-01-01T10:01:00+00:00</date>
401 <msg xml:space="preserve">third</msg>
407 <msg xml:space="preserve">third</msg>
402 <paths>
408 <paths>
403 <path action="A">fourth</path>
409 <path action="A">fourth</path>
404 <path action="A">third</path>
410 <path action="A">third</path>
405 <path action="R">second</path>
411 <path action="R">second</path>
406 </paths>
412 </paths>
407 <copies>
413 <copies>
408 <copy source="second">fourth</copy>
414 <copy source="second">fourth</copy>
409 </copies>
415 </copies>
410 <extra key="branch">default</extra>
416 <extra key="branch">default</extra>
411 </logentry>
417 </logentry>
412 <logentry revision="7" node="29114dbae42b9f078cf2714dbe3a86bba8ec7453">
418 <logentry revision="7" node="29114dbae42b9f078cf2714dbe3a86bba8ec7453">
413 <parent revision="-1" node="0000000000000000000000000000000000000000" />
419 <parent revision="-1" node="0000000000000000000000000000000000000000" />
414 <parent revision="-1" node="0000000000000000000000000000000000000000" />
420 <parent revision="-1" node="0000000000000000000000000000000000000000" />
415 <author email="user@hostname">User Name</author>
421 <author email="user@hostname">User Name</author>
416 <date>1970-01-12T13:46:40+00:00</date>
422 <date>1970-01-12T13:46:40+00:00</date>
417 <msg xml:space="preserve">second</msg>
423 <msg xml:space="preserve">second</msg>
418 <paths>
424 <paths>
419 <path action="A">second</path>
425 <path action="A">second</path>
420 </paths>
426 </paths>
421 <extra key="branch">default</extra>
427 <extra key="branch">default</extra>
422 </logentry>
428 </logentry>
423 <logentry revision="6" node="d41e714fe50d9e4a5f11b4d595d543481b5f980b">
429 <logentry revision="6" node="d41e714fe50d9e4a5f11b4d595d543481b5f980b">
424 <parent revision="5" node="13207e5a10d9fd28ec424934298e176197f2c67f" />
430 <parent revision="5" node="13207e5a10d9fd28ec424934298e176197f2c67f" />
425 <parent revision="4" node="bbe44766e73d5f11ed2177f1838de10c53ef3e74" />
431 <parent revision="4" node="bbe44766e73d5f11ed2177f1838de10c53ef3e74" />
426 <author email="person">person</author>
432 <author email="person">person</author>
427 <date>1970-01-18T08:40:01+00:00</date>
433 <date>1970-01-18T08:40:01+00:00</date>
428 <msg xml:space="preserve">merge</msg>
434 <msg xml:space="preserve">merge</msg>
429 <paths>
435 <paths>
430 </paths>
436 </paths>
431 <extra key="branch">default</extra>
437 <extra key="branch">default</extra>
432 </logentry>
438 </logentry>
433 <logentry revision="5" node="13207e5a10d9fd28ec424934298e176197f2c67f">
439 <logentry revision="5" node="13207e5a10d9fd28ec424934298e176197f2c67f">
434 <parent revision="3" node="10e46f2dcbf4823578cf180f33ecf0b957964c47" />
440 <parent revision="3" node="10e46f2dcbf4823578cf180f33ecf0b957964c47" />
435 <parent revision="-1" node="0000000000000000000000000000000000000000" />
441 <parent revision="-1" node="0000000000000000000000000000000000000000" />
436 <author email="person">person</author>
442 <author email="person">person</author>
437 <date>1970-01-18T08:40:00+00:00</date>
443 <date>1970-01-18T08:40:00+00:00</date>
438 <msg xml:space="preserve">new head</msg>
444 <msg xml:space="preserve">new head</msg>
439 <paths>
445 <paths>
440 <path action="A">d</path>
446 <path action="A">d</path>
441 </paths>
447 </paths>
442 <extra key="branch">default</extra>
448 <extra key="branch">default</extra>
443 </logentry>
449 </logentry>
444 <logentry revision="4" node="bbe44766e73d5f11ed2177f1838de10c53ef3e74">
450 <logentry revision="4" node="bbe44766e73d5f11ed2177f1838de10c53ef3e74">
445 <branch>foo</branch>
451 <branch>foo</branch>
446 <parent revision="3" node="10e46f2dcbf4823578cf180f33ecf0b957964c47" />
452 <parent revision="3" node="10e46f2dcbf4823578cf180f33ecf0b957964c47" />
447 <parent revision="-1" node="0000000000000000000000000000000000000000" />
453 <parent revision="-1" node="0000000000000000000000000000000000000000" />
448 <author email="person">person</author>
454 <author email="person">person</author>
449 <date>1970-01-17T04:53:20+00:00</date>
455 <date>1970-01-17T04:53:20+00:00</date>
450 <msg xml:space="preserve">new branch</msg>
456 <msg xml:space="preserve">new branch</msg>
451 <paths>
457 <paths>
452 </paths>
458 </paths>
453 <extra key="branch">foo</extra>
459 <extra key="branch">foo</extra>
454 </logentry>
460 </logentry>
455 <logentry revision="3" node="10e46f2dcbf4823578cf180f33ecf0b957964c47">
461 <logentry revision="3" node="10e46f2dcbf4823578cf180f33ecf0b957964c47">
456 <parent revision="2" node="97054abb4ab824450e9164180baf491ae0078465" />
462 <parent revision="2" node="97054abb4ab824450e9164180baf491ae0078465" />
457 <parent revision="-1" node="0000000000000000000000000000000000000000" />
463 <parent revision="-1" node="0000000000000000000000000000000000000000" />
458 <author email="person">person</author>
464 <author email="person">person</author>
459 <date>1970-01-16T01:06:40+00:00</date>
465 <date>1970-01-16T01:06:40+00:00</date>
460 <msg xml:space="preserve">no user, no domain</msg>
466 <msg xml:space="preserve">no user, no domain</msg>
461 <paths>
467 <paths>
462 <path action="M">c</path>
468 <path action="M">c</path>
463 </paths>
469 </paths>
464 <extra key="branch">default</extra>
470 <extra key="branch">default</extra>
465 </logentry>
471 </logentry>
466 <logentry revision="2" node="97054abb4ab824450e9164180baf491ae0078465">
472 <logentry revision="2" node="97054abb4ab824450e9164180baf491ae0078465">
467 <parent revision="1" node="b608e9d1a3f0273ccf70fb85fd6866b3482bf965" />
473 <parent revision="1" node="b608e9d1a3f0273ccf70fb85fd6866b3482bf965" />
468 <parent revision="-1" node="0000000000000000000000000000000000000000" />
474 <parent revision="-1" node="0000000000000000000000000000000000000000" />
469 <author email="other@place">other</author>
475 <author email="other@place">other</author>
470 <date>1970-01-14T21:20:00+00:00</date>
476 <date>1970-01-14T21:20:00+00:00</date>
471 <msg xml:space="preserve">no person</msg>
477 <msg xml:space="preserve">no person</msg>
472 <paths>
478 <paths>
473 <path action="A">c</path>
479 <path action="A">c</path>
474 </paths>
480 </paths>
475 <extra key="branch">default</extra>
481 <extra key="branch">default</extra>
476 </logentry>
482 </logentry>
477 <logentry revision="1" node="b608e9d1a3f0273ccf70fb85fd6866b3482bf965">
483 <logentry revision="1" node="b608e9d1a3f0273ccf70fb85fd6866b3482bf965">
478 <parent revision="0" node="1e4e1b8f71e05681d422154f5421e385fec3454f" />
484 <parent revision="0" node="1e4e1b8f71e05681d422154f5421e385fec3454f" />
479 <parent revision="-1" node="0000000000000000000000000000000000000000" />
485 <parent revision="-1" node="0000000000000000000000000000000000000000" />
480 <author email="other@place">A. N. Other</author>
486 <author email="other@place">A. N. Other</author>
481 <date>1970-01-13T17:33:20+00:00</date>
487 <date>1970-01-13T17:33:20+00:00</date>
482 <msg xml:space="preserve">other 1
488 <msg xml:space="preserve">other 1
483 other 2
489 other 2
484
490
485 other 3</msg>
491 other 3</msg>
486 <paths>
492 <paths>
487 <path action="A">b</path>
493 <path action="A">b</path>
488 </paths>
494 </paths>
489 <extra key="branch">default</extra>
495 <extra key="branch">default</extra>
490 </logentry>
496 </logentry>
491 <logentry revision="0" node="1e4e1b8f71e05681d422154f5421e385fec3454f">
497 <logentry revision="0" node="1e4e1b8f71e05681d422154f5421e385fec3454f">
492 <parent revision="-1" node="0000000000000000000000000000000000000000" />
498 <parent revision="-1" node="0000000000000000000000000000000000000000" />
493 <parent revision="-1" node="0000000000000000000000000000000000000000" />
499 <parent revision="-1" node="0000000000000000000000000000000000000000" />
494 <author email="user@hostname">User Name</author>
500 <author email="user@hostname">User Name</author>
495 <date>1970-01-12T13:46:40+00:00</date>
501 <date>1970-01-12T13:46:40+00:00</date>
496 <msg xml:space="preserve">line 1
502 <msg xml:space="preserve">line 1
497 line 2</msg>
503 line 2</msg>
498 <paths>
504 <paths>
499 <path action="A">a</path>
505 <path action="A">a</path>
500 </paths>
506 </paths>
501 <extra key="branch">default</extra>
507 <extra key="branch">default</extra>
502 </logentry>
508 </logentry>
503 </log>
509 </log>
504
510
505
511
506 Test JSON style:
512 Test JSON style:
507
513
508 $ hg log -k nosuch -Tjson
514 $ hg log -k nosuch -Tjson
509 []
515 []
510
516
511 $ hg log -qr . -Tjson
517 $ hg log -qr . -Tjson
512 [
518 [
513 {
519 {
514 "rev": 8,
520 "rev": 8,
515 "node": "95c24699272ef57d062b8bccc32c878bf841784a"
521 "node": "95c24699272ef57d062b8bccc32c878bf841784a"
516 }
522 }
517 ]
523 ]
518
524
519 $ hg log -vpr . -Tjson --stat
525 $ hg log -vpr . -Tjson --stat
520 [
526 [
521 {
527 {
522 "rev": 8,
528 "rev": 8,
523 "node": "95c24699272ef57d062b8bccc32c878bf841784a",
529 "node": "95c24699272ef57d062b8bccc32c878bf841784a",
524 "branch": "default",
530 "branch": "default",
525 "phase": "draft",
531 "phase": "draft",
526 "user": "test",
532 "user": "test",
527 "date": [1577872860, 0],
533 "date": [1577872860, 0],
528 "desc": "third",
534 "desc": "third",
529 "bookmarks": [],
535 "bookmarks": [],
530 "tags": ["tip"],
536 "tags": ["tip"],
531 "parents": ["29114dbae42b9f078cf2714dbe3a86bba8ec7453"],
537 "parents": ["29114dbae42b9f078cf2714dbe3a86bba8ec7453"],
532 "files": ["fourth", "second", "third"],
538 "files": ["fourth", "second", "third"],
533 "diffstat": " fourth | 1 +\n second | 1 -\n third | 1 +\n 3 files changed, 2 insertions(+), 1 deletions(-)\n",
539 "diffstat": " fourth | 1 +\n second | 1 -\n third | 1 +\n 3 files changed, 2 insertions(+), 1 deletions(-)\n",
534 "diff": "diff -r 29114dbae42b -r 95c24699272e fourth\n--- /dev/null\tThu Jan 01 00:00:00 1970 +0000\n+++ b/fourth\tWed Jan 01 10:01:00 2020 +0000\n@@ -0,0 +1,1 @@\n+second\ndiff -r 29114dbae42b -r 95c24699272e second\n--- a/second\tMon Jan 12 13:46:40 1970 +0000\n+++ /dev/null\tThu Jan 01 00:00:00 1970 +0000\n@@ -1,1 +0,0 @@\n-second\ndiff -r 29114dbae42b -r 95c24699272e third\n--- /dev/null\tThu Jan 01 00:00:00 1970 +0000\n+++ b/third\tWed Jan 01 10:01:00 2020 +0000\n@@ -0,0 +1,1 @@\n+third\n"
540 "diff": "diff -r 29114dbae42b -r 95c24699272e fourth\n--- /dev/null\tThu Jan 01 00:00:00 1970 +0000\n+++ b/fourth\tWed Jan 01 10:01:00 2020 +0000\n@@ -0,0 +1,1 @@\n+second\ndiff -r 29114dbae42b -r 95c24699272e second\n--- a/second\tMon Jan 12 13:46:40 1970 +0000\n+++ /dev/null\tThu Jan 01 00:00:00 1970 +0000\n@@ -1,1 +0,0 @@\n-second\ndiff -r 29114dbae42b -r 95c24699272e third\n--- /dev/null\tThu Jan 01 00:00:00 1970 +0000\n+++ b/third\tWed Jan 01 10:01:00 2020 +0000\n@@ -0,0 +1,1 @@\n+third\n"
535 }
541 }
536 ]
542 ]
537
543
538 honor --git but not format-breaking diffopts
544 honor --git but not format-breaking diffopts
539 $ hg --config diff.noprefix=True log --git -vpr . -Tjson
545 $ hg --config diff.noprefix=True log --git -vpr . -Tjson
540 [
546 [
541 {
547 {
542 "rev": 8,
548 "rev": 8,
543 "node": "95c24699272ef57d062b8bccc32c878bf841784a",
549 "node": "95c24699272ef57d062b8bccc32c878bf841784a",
544 "branch": "default",
550 "branch": "default",
545 "phase": "draft",
551 "phase": "draft",
546 "user": "test",
552 "user": "test",
547 "date": [1577872860, 0],
553 "date": [1577872860, 0],
548 "desc": "third",
554 "desc": "third",
549 "bookmarks": [],
555 "bookmarks": [],
550 "tags": ["tip"],
556 "tags": ["tip"],
551 "parents": ["29114dbae42b9f078cf2714dbe3a86bba8ec7453"],
557 "parents": ["29114dbae42b9f078cf2714dbe3a86bba8ec7453"],
552 "files": ["fourth", "second", "third"],
558 "files": ["fourth", "second", "third"],
553 "diff": "diff --git a/second b/fourth\nrename from second\nrename to fourth\ndiff --git a/third b/third\nnew file mode 100644\n--- /dev/null\n+++ b/third\n@@ -0,0 +1,1 @@\n+third\n"
559 "diff": "diff --git a/second b/fourth\nrename from second\nrename to fourth\ndiff --git a/third b/third\nnew file mode 100644\n--- /dev/null\n+++ b/third\n@@ -0,0 +1,1 @@\n+third\n"
554 }
560 }
555 ]
561 ]
556
562
557 $ hg log -T json
563 $ hg log -T json
558 [
564 [
559 {
565 {
560 "rev": 8,
566 "rev": 8,
561 "node": "95c24699272ef57d062b8bccc32c878bf841784a",
567 "node": "95c24699272ef57d062b8bccc32c878bf841784a",
562 "branch": "default",
568 "branch": "default",
563 "phase": "draft",
569 "phase": "draft",
564 "user": "test",
570 "user": "test",
565 "date": [1577872860, 0],
571 "date": [1577872860, 0],
566 "desc": "third",
572 "desc": "third",
567 "bookmarks": [],
573 "bookmarks": [],
568 "tags": ["tip"],
574 "tags": ["tip"],
569 "parents": ["29114dbae42b9f078cf2714dbe3a86bba8ec7453"]
575 "parents": ["29114dbae42b9f078cf2714dbe3a86bba8ec7453"]
570 },
576 },
571 {
577 {
572 "rev": 7,
578 "rev": 7,
573 "node": "29114dbae42b9f078cf2714dbe3a86bba8ec7453",
579 "node": "29114dbae42b9f078cf2714dbe3a86bba8ec7453",
574 "branch": "default",
580 "branch": "default",
575 "phase": "draft",
581 "phase": "draft",
576 "user": "User Name <user@hostname>",
582 "user": "User Name <user@hostname>",
577 "date": [1000000, 0],
583 "date": [1000000, 0],
578 "desc": "second",
584 "desc": "second",
579 "bookmarks": [],
585 "bookmarks": [],
580 "tags": [],
586 "tags": [],
581 "parents": ["0000000000000000000000000000000000000000"]
587 "parents": ["0000000000000000000000000000000000000000"]
582 },
588 },
583 {
589 {
584 "rev": 6,
590 "rev": 6,
585 "node": "d41e714fe50d9e4a5f11b4d595d543481b5f980b",
591 "node": "d41e714fe50d9e4a5f11b4d595d543481b5f980b",
586 "branch": "default",
592 "branch": "default",
587 "phase": "draft",
593 "phase": "draft",
588 "user": "person",
594 "user": "person",
589 "date": [1500001, 0],
595 "date": [1500001, 0],
590 "desc": "merge",
596 "desc": "merge",
591 "bookmarks": [],
597 "bookmarks": [],
592 "tags": [],
598 "tags": [],
593 "parents": ["13207e5a10d9fd28ec424934298e176197f2c67f", "bbe44766e73d5f11ed2177f1838de10c53ef3e74"]
599 "parents": ["13207e5a10d9fd28ec424934298e176197f2c67f", "bbe44766e73d5f11ed2177f1838de10c53ef3e74"]
594 },
600 },
595 {
601 {
596 "rev": 5,
602 "rev": 5,
597 "node": "13207e5a10d9fd28ec424934298e176197f2c67f",
603 "node": "13207e5a10d9fd28ec424934298e176197f2c67f",
598 "branch": "default",
604 "branch": "default",
599 "phase": "draft",
605 "phase": "draft",
600 "user": "person",
606 "user": "person",
601 "date": [1500000, 0],
607 "date": [1500000, 0],
602 "desc": "new head",
608 "desc": "new head",
603 "bookmarks": [],
609 "bookmarks": [],
604 "tags": [],
610 "tags": [],
605 "parents": ["10e46f2dcbf4823578cf180f33ecf0b957964c47"]
611 "parents": ["10e46f2dcbf4823578cf180f33ecf0b957964c47"]
606 },
612 },
607 {
613 {
608 "rev": 4,
614 "rev": 4,
609 "node": "bbe44766e73d5f11ed2177f1838de10c53ef3e74",
615 "node": "bbe44766e73d5f11ed2177f1838de10c53ef3e74",
610 "branch": "foo",
616 "branch": "foo",
611 "phase": "draft",
617 "phase": "draft",
612 "user": "person",
618 "user": "person",
613 "date": [1400000, 0],
619 "date": [1400000, 0],
614 "desc": "new branch",
620 "desc": "new branch",
615 "bookmarks": [],
621 "bookmarks": [],
616 "tags": [],
622 "tags": [],
617 "parents": ["10e46f2dcbf4823578cf180f33ecf0b957964c47"]
623 "parents": ["10e46f2dcbf4823578cf180f33ecf0b957964c47"]
618 },
624 },
619 {
625 {
620 "rev": 3,
626 "rev": 3,
621 "node": "10e46f2dcbf4823578cf180f33ecf0b957964c47",
627 "node": "10e46f2dcbf4823578cf180f33ecf0b957964c47",
622 "branch": "default",
628 "branch": "default",
623 "phase": "draft",
629 "phase": "draft",
624 "user": "person",
630 "user": "person",
625 "date": [1300000, 0],
631 "date": [1300000, 0],
626 "desc": "no user, no domain",
632 "desc": "no user, no domain",
627 "bookmarks": [],
633 "bookmarks": [],
628 "tags": [],
634 "tags": [],
629 "parents": ["97054abb4ab824450e9164180baf491ae0078465"]
635 "parents": ["97054abb4ab824450e9164180baf491ae0078465"]
630 },
636 },
631 {
637 {
632 "rev": 2,
638 "rev": 2,
633 "node": "97054abb4ab824450e9164180baf491ae0078465",
639 "node": "97054abb4ab824450e9164180baf491ae0078465",
634 "branch": "default",
640 "branch": "default",
635 "phase": "draft",
641 "phase": "draft",
636 "user": "other@place",
642 "user": "other@place",
637 "date": [1200000, 0],
643 "date": [1200000, 0],
638 "desc": "no person",
644 "desc": "no person",
639 "bookmarks": [],
645 "bookmarks": [],
640 "tags": [],
646 "tags": [],
641 "parents": ["b608e9d1a3f0273ccf70fb85fd6866b3482bf965"]
647 "parents": ["b608e9d1a3f0273ccf70fb85fd6866b3482bf965"]
642 },
648 },
643 {
649 {
644 "rev": 1,
650 "rev": 1,
645 "node": "b608e9d1a3f0273ccf70fb85fd6866b3482bf965",
651 "node": "b608e9d1a3f0273ccf70fb85fd6866b3482bf965",
646 "branch": "default",
652 "branch": "default",
647 "phase": "draft",
653 "phase": "draft",
648 "user": "A. N. Other <other@place>",
654 "user": "A. N. Other <other@place>",
649 "date": [1100000, 0],
655 "date": [1100000, 0],
650 "desc": "other 1\nother 2\n\nother 3",
656 "desc": "other 1\nother 2\n\nother 3",
651 "bookmarks": [],
657 "bookmarks": [],
652 "tags": [],
658 "tags": [],
653 "parents": ["1e4e1b8f71e05681d422154f5421e385fec3454f"]
659 "parents": ["1e4e1b8f71e05681d422154f5421e385fec3454f"]
654 },
660 },
655 {
661 {
656 "rev": 0,
662 "rev": 0,
657 "node": "1e4e1b8f71e05681d422154f5421e385fec3454f",
663 "node": "1e4e1b8f71e05681d422154f5421e385fec3454f",
658 "branch": "default",
664 "branch": "default",
659 "phase": "draft",
665 "phase": "draft",
660 "user": "User Name <user@hostname>",
666 "user": "User Name <user@hostname>",
661 "date": [1000000, 0],
667 "date": [1000000, 0],
662 "desc": "line 1\nline 2",
668 "desc": "line 1\nline 2",
663 "bookmarks": [],
669 "bookmarks": [],
664 "tags": [],
670 "tags": [],
665 "parents": ["0000000000000000000000000000000000000000"]
671 "parents": ["0000000000000000000000000000000000000000"]
666 }
672 }
667 ]
673 ]
668
674
669 $ hg heads -v -Tjson
675 $ hg heads -v -Tjson
670 [
676 [
671 {
677 {
672 "rev": 8,
678 "rev": 8,
673 "node": "95c24699272ef57d062b8bccc32c878bf841784a",
679 "node": "95c24699272ef57d062b8bccc32c878bf841784a",
674 "branch": "default",
680 "branch": "default",
675 "phase": "draft",
681 "phase": "draft",
676 "user": "test",
682 "user": "test",
677 "date": [1577872860, 0],
683 "date": [1577872860, 0],
678 "desc": "third",
684 "desc": "third",
679 "bookmarks": [],
685 "bookmarks": [],
680 "tags": ["tip"],
686 "tags": ["tip"],
681 "parents": ["29114dbae42b9f078cf2714dbe3a86bba8ec7453"],
687 "parents": ["29114dbae42b9f078cf2714dbe3a86bba8ec7453"],
682 "files": ["fourth", "second", "third"]
688 "files": ["fourth", "second", "third"]
683 },
689 },
684 {
690 {
685 "rev": 6,
691 "rev": 6,
686 "node": "d41e714fe50d9e4a5f11b4d595d543481b5f980b",
692 "node": "d41e714fe50d9e4a5f11b4d595d543481b5f980b",
687 "branch": "default",
693 "branch": "default",
688 "phase": "draft",
694 "phase": "draft",
689 "user": "person",
695 "user": "person",
690 "date": [1500001, 0],
696 "date": [1500001, 0],
691 "desc": "merge",
697 "desc": "merge",
692 "bookmarks": [],
698 "bookmarks": [],
693 "tags": [],
699 "tags": [],
694 "parents": ["13207e5a10d9fd28ec424934298e176197f2c67f", "bbe44766e73d5f11ed2177f1838de10c53ef3e74"],
700 "parents": ["13207e5a10d9fd28ec424934298e176197f2c67f", "bbe44766e73d5f11ed2177f1838de10c53ef3e74"],
695 "files": []
701 "files": []
696 },
702 },
697 {
703 {
698 "rev": 4,
704 "rev": 4,
699 "node": "bbe44766e73d5f11ed2177f1838de10c53ef3e74",
705 "node": "bbe44766e73d5f11ed2177f1838de10c53ef3e74",
700 "branch": "foo",
706 "branch": "foo",
701 "phase": "draft",
707 "phase": "draft",
702 "user": "person",
708 "user": "person",
703 "date": [1400000, 0],
709 "date": [1400000, 0],
704 "desc": "new branch",
710 "desc": "new branch",
705 "bookmarks": [],
711 "bookmarks": [],
706 "tags": [],
712 "tags": [],
707 "parents": ["10e46f2dcbf4823578cf180f33ecf0b957964c47"],
713 "parents": ["10e46f2dcbf4823578cf180f33ecf0b957964c47"],
708 "files": []
714 "files": []
709 }
715 }
710 ]
716 ]
711
717
712 $ hg log --debug -Tjson
718 $ hg log --debug -Tjson
713 [
719 [
714 {
720 {
715 "rev": 8,
721 "rev": 8,
716 "node": "95c24699272ef57d062b8bccc32c878bf841784a",
722 "node": "95c24699272ef57d062b8bccc32c878bf841784a",
717 "branch": "default",
723 "branch": "default",
718 "phase": "draft",
724 "phase": "draft",
719 "user": "test",
725 "user": "test",
720 "date": [1577872860, 0],
726 "date": [1577872860, 0],
721 "desc": "third",
727 "desc": "third",
722 "bookmarks": [],
728 "bookmarks": [],
723 "tags": ["tip"],
729 "tags": ["tip"],
724 "parents": ["29114dbae42b9f078cf2714dbe3a86bba8ec7453"],
730 "parents": ["29114dbae42b9f078cf2714dbe3a86bba8ec7453"],
725 "manifest": "94961b75a2da554b4df6fb599e5bfc7d48de0c64",
731 "manifest": "94961b75a2da554b4df6fb599e5bfc7d48de0c64",
726 "extra": {"branch": "default"},
732 "extra": {"branch": "default"},
727 "modified": [],
733 "modified": [],
728 "added": ["fourth", "third"],
734 "added": ["fourth", "third"],
729 "removed": ["second"]
735 "removed": ["second"]
730 },
736 },
731 {
737 {
732 "rev": 7,
738 "rev": 7,
733 "node": "29114dbae42b9f078cf2714dbe3a86bba8ec7453",
739 "node": "29114dbae42b9f078cf2714dbe3a86bba8ec7453",
734 "branch": "default",
740 "branch": "default",
735 "phase": "draft",
741 "phase": "draft",
736 "user": "User Name <user@hostname>",
742 "user": "User Name <user@hostname>",
737 "date": [1000000, 0],
743 "date": [1000000, 0],
738 "desc": "second",
744 "desc": "second",
739 "bookmarks": [],
745 "bookmarks": [],
740 "tags": [],
746 "tags": [],
741 "parents": ["0000000000000000000000000000000000000000"],
747 "parents": ["0000000000000000000000000000000000000000"],
742 "manifest": "f2dbc354b94e5ec0b4f10680ee0cee816101d0bf",
748 "manifest": "f2dbc354b94e5ec0b4f10680ee0cee816101d0bf",
743 "extra": {"branch": "default"},
749 "extra": {"branch": "default"},
744 "modified": [],
750 "modified": [],
745 "added": ["second"],
751 "added": ["second"],
746 "removed": []
752 "removed": []
747 },
753 },
748 {
754 {
749 "rev": 6,
755 "rev": 6,
750 "node": "d41e714fe50d9e4a5f11b4d595d543481b5f980b",
756 "node": "d41e714fe50d9e4a5f11b4d595d543481b5f980b",
751 "branch": "default",
757 "branch": "default",
752 "phase": "draft",
758 "phase": "draft",
753 "user": "person",
759 "user": "person",
754 "date": [1500001, 0],
760 "date": [1500001, 0],
755 "desc": "merge",
761 "desc": "merge",
756 "bookmarks": [],
762 "bookmarks": [],
757 "tags": [],
763 "tags": [],
758 "parents": ["13207e5a10d9fd28ec424934298e176197f2c67f", "bbe44766e73d5f11ed2177f1838de10c53ef3e74"],
764 "parents": ["13207e5a10d9fd28ec424934298e176197f2c67f", "bbe44766e73d5f11ed2177f1838de10c53ef3e74"],
759 "manifest": "4dc3def4f9b4c6e8de820f6ee74737f91e96a216",
765 "manifest": "4dc3def4f9b4c6e8de820f6ee74737f91e96a216",
760 "extra": {"branch": "default"},
766 "extra": {"branch": "default"},
761 "modified": [],
767 "modified": [],
762 "added": [],
768 "added": [],
763 "removed": []
769 "removed": []
764 },
770 },
765 {
771 {
766 "rev": 5,
772 "rev": 5,
767 "node": "13207e5a10d9fd28ec424934298e176197f2c67f",
773 "node": "13207e5a10d9fd28ec424934298e176197f2c67f",
768 "branch": "default",
774 "branch": "default",
769 "phase": "draft",
775 "phase": "draft",
770 "user": "person",
776 "user": "person",
771 "date": [1500000, 0],
777 "date": [1500000, 0],
772 "desc": "new head",
778 "desc": "new head",
773 "bookmarks": [],
779 "bookmarks": [],
774 "tags": [],
780 "tags": [],
775 "parents": ["10e46f2dcbf4823578cf180f33ecf0b957964c47"],
781 "parents": ["10e46f2dcbf4823578cf180f33ecf0b957964c47"],
776 "manifest": "4dc3def4f9b4c6e8de820f6ee74737f91e96a216",
782 "manifest": "4dc3def4f9b4c6e8de820f6ee74737f91e96a216",
777 "extra": {"branch": "default"},
783 "extra": {"branch": "default"},
778 "modified": [],
784 "modified": [],
779 "added": ["d"],
785 "added": ["d"],
780 "removed": []
786 "removed": []
781 },
787 },
782 {
788 {
783 "rev": 4,
789 "rev": 4,
784 "node": "bbe44766e73d5f11ed2177f1838de10c53ef3e74",
790 "node": "bbe44766e73d5f11ed2177f1838de10c53ef3e74",
785 "branch": "foo",
791 "branch": "foo",
786 "phase": "draft",
792 "phase": "draft",
787 "user": "person",
793 "user": "person",
788 "date": [1400000, 0],
794 "date": [1400000, 0],
789 "desc": "new branch",
795 "desc": "new branch",
790 "bookmarks": [],
796 "bookmarks": [],
791 "tags": [],
797 "tags": [],
792 "parents": ["10e46f2dcbf4823578cf180f33ecf0b957964c47"],
798 "parents": ["10e46f2dcbf4823578cf180f33ecf0b957964c47"],
793 "manifest": "cb5a1327723bada42f117e4c55a303246eaf9ccc",
799 "manifest": "cb5a1327723bada42f117e4c55a303246eaf9ccc",
794 "extra": {"branch": "foo"},
800 "extra": {"branch": "foo"},
795 "modified": [],
801 "modified": [],
796 "added": [],
802 "added": [],
797 "removed": []
803 "removed": []
798 },
804 },
799 {
805 {
800 "rev": 3,
806 "rev": 3,
801 "node": "10e46f2dcbf4823578cf180f33ecf0b957964c47",
807 "node": "10e46f2dcbf4823578cf180f33ecf0b957964c47",
802 "branch": "default",
808 "branch": "default",
803 "phase": "draft",
809 "phase": "draft",
804 "user": "person",
810 "user": "person",
805 "date": [1300000, 0],
811 "date": [1300000, 0],
806 "desc": "no user, no domain",
812 "desc": "no user, no domain",
807 "bookmarks": [],
813 "bookmarks": [],
808 "tags": [],
814 "tags": [],
809 "parents": ["97054abb4ab824450e9164180baf491ae0078465"],
815 "parents": ["97054abb4ab824450e9164180baf491ae0078465"],
810 "manifest": "cb5a1327723bada42f117e4c55a303246eaf9ccc",
816 "manifest": "cb5a1327723bada42f117e4c55a303246eaf9ccc",
811 "extra": {"branch": "default"},
817 "extra": {"branch": "default"},
812 "modified": ["c"],
818 "modified": ["c"],
813 "added": [],
819 "added": [],
814 "removed": []
820 "removed": []
815 },
821 },
816 {
822 {
817 "rev": 2,
823 "rev": 2,
818 "node": "97054abb4ab824450e9164180baf491ae0078465",
824 "node": "97054abb4ab824450e9164180baf491ae0078465",
819 "branch": "default",
825 "branch": "default",
820 "phase": "draft",
826 "phase": "draft",
821 "user": "other@place",
827 "user": "other@place",
822 "date": [1200000, 0],
828 "date": [1200000, 0],
823 "desc": "no person",
829 "desc": "no person",
824 "bookmarks": [],
830 "bookmarks": [],
825 "tags": [],
831 "tags": [],
826 "parents": ["b608e9d1a3f0273ccf70fb85fd6866b3482bf965"],
832 "parents": ["b608e9d1a3f0273ccf70fb85fd6866b3482bf965"],
827 "manifest": "6e0e82995c35d0d57a52aca8da4e56139e06b4b1",
833 "manifest": "6e0e82995c35d0d57a52aca8da4e56139e06b4b1",
828 "extra": {"branch": "default"},
834 "extra": {"branch": "default"},
829 "modified": [],
835 "modified": [],
830 "added": ["c"],
836 "added": ["c"],
831 "removed": []
837 "removed": []
832 },
838 },
833 {
839 {
834 "rev": 1,
840 "rev": 1,
835 "node": "b608e9d1a3f0273ccf70fb85fd6866b3482bf965",
841 "node": "b608e9d1a3f0273ccf70fb85fd6866b3482bf965",
836 "branch": "default",
842 "branch": "default",
837 "phase": "draft",
843 "phase": "draft",
838 "user": "A. N. Other <other@place>",
844 "user": "A. N. Other <other@place>",
839 "date": [1100000, 0],
845 "date": [1100000, 0],
840 "desc": "other 1\nother 2\n\nother 3",
846 "desc": "other 1\nother 2\n\nother 3",
841 "bookmarks": [],
847 "bookmarks": [],
842 "tags": [],
848 "tags": [],
843 "parents": ["1e4e1b8f71e05681d422154f5421e385fec3454f"],
849 "parents": ["1e4e1b8f71e05681d422154f5421e385fec3454f"],
844 "manifest": "4e8d705b1e53e3f9375e0e60dc7b525d8211fe55",
850 "manifest": "4e8d705b1e53e3f9375e0e60dc7b525d8211fe55",
845 "extra": {"branch": "default"},
851 "extra": {"branch": "default"},
846 "modified": [],
852 "modified": [],
847 "added": ["b"],
853 "added": ["b"],
848 "removed": []
854 "removed": []
849 },
855 },
850 {
856 {
851 "rev": 0,
857 "rev": 0,
852 "node": "1e4e1b8f71e05681d422154f5421e385fec3454f",
858 "node": "1e4e1b8f71e05681d422154f5421e385fec3454f",
853 "branch": "default",
859 "branch": "default",
854 "phase": "draft",
860 "phase": "draft",
855 "user": "User Name <user@hostname>",
861 "user": "User Name <user@hostname>",
856 "date": [1000000, 0],
862 "date": [1000000, 0],
857 "desc": "line 1\nline 2",
863 "desc": "line 1\nline 2",
858 "bookmarks": [],
864 "bookmarks": [],
859 "tags": [],
865 "tags": [],
860 "parents": ["0000000000000000000000000000000000000000"],
866 "parents": ["0000000000000000000000000000000000000000"],
861 "manifest": "a0c8bcbbb45c63b90b70ad007bf38961f64f2af0",
867 "manifest": "a0c8bcbbb45c63b90b70ad007bf38961f64f2af0",
862 "extra": {"branch": "default"},
868 "extra": {"branch": "default"},
863 "modified": [],
869 "modified": [],
864 "added": ["a"],
870 "added": ["a"],
865 "removed": []
871 "removed": []
866 }
872 }
867 ]
873 ]
868
874
869 Error if style not readable:
875 Error if style not readable:
870
876
871 #if unix-permissions no-root
877 #if unix-permissions no-root
872 $ touch q
878 $ touch q
873 $ chmod 0 q
879 $ chmod 0 q
874 $ hg log --style ./q
880 $ hg log --style ./q
875 abort: Permission denied: ./q
881 abort: Permission denied: ./q
876 [255]
882 [255]
877 #endif
883 #endif
878
884
879 Error if no style:
885 Error if no style:
880
886
881 $ hg log --style notexist
887 $ hg log --style notexist
882 abort: style 'notexist' not found
888 abort: style 'notexist' not found
883 (available styles: bisect, changelog, compact, default, phases, xml)
889 (available styles: bisect, changelog, compact, default, phases, xml)
884 [255]
890 [255]
885
891
886 $ hg log -T list
892 $ hg log -T list
887 available styles: bisect, changelog, compact, default, phases, xml
893 available styles: bisect, changelog, compact, default, phases, xml
888 abort: specify a template
894 abort: specify a template
889 [255]
895 [255]
890
896
891 Error if style missing key:
897 Error if style missing key:
892
898
893 $ echo 'q = q' > t
899 $ echo 'q = q' > t
894 $ hg log --style ./t
900 $ hg log --style ./t
895 abort: "changeset" not in template map
901 abort: "changeset" not in template map
896 [255]
902 [255]
897
903
898 Error if style missing value:
904 Error if style missing value:
899
905
900 $ echo 'changeset =' > t
906 $ echo 'changeset =' > t
901 $ hg log --style t
907 $ hg log --style t
902 abort: t:1: missing value
908 abort: t:1: missing value
903 [255]
909 [255]
904
910
905 Error if include fails:
911 Error if include fails:
906
912
907 $ echo 'changeset = q' >> t
913 $ echo 'changeset = q' >> t
908 #if unix-permissions no-root
914 #if unix-permissions no-root
909 $ hg log --style ./t
915 $ hg log --style ./t
910 abort: template file ./q: Permission denied
916 abort: template file ./q: Permission denied
911 [255]
917 [255]
912 $ rm q
918 $ rm q
913 #endif
919 #endif
914
920
915 Include works:
921 Include works:
916
922
917 $ echo '{rev}' > q
923 $ echo '{rev}' > q
918 $ hg log --style ./t
924 $ hg log --style ./t
919 8
925 8
920 7
926 7
921 6
927 6
922 5
928 5
923 4
929 4
924 3
930 3
925 2
931 2
926 1
932 1
927 0
933 0
928
934
929 Check that {phase} works correctly on parents:
935 Check that {phase} works correctly on parents:
930
936
931 $ cat << EOF > parentphase
937 $ cat << EOF > parentphase
932 > changeset_debug = '{rev} ({phase}):{parents}\n'
938 > changeset_debug = '{rev} ({phase}):{parents}\n'
933 > parent = ' {rev} ({phase})'
939 > parent = ' {rev} ({phase})'
934 > EOF
940 > EOF
935 $ hg phase -r 5 --public
941 $ hg phase -r 5 --public
936 $ hg phase -r 7 --secret --force
942 $ hg phase -r 7 --secret --force
937 $ hg log --debug -G --style ./parentphase
943 $ hg log --debug -G --style ./parentphase
938 @ 8 (secret): 7 (secret) -1 (public)
944 @ 8 (secret): 7 (secret) -1 (public)
939 |
945 |
940 o 7 (secret): -1 (public) -1 (public)
946 o 7 (secret): -1 (public) -1 (public)
941
947
942 o 6 (draft): 5 (public) 4 (draft)
948 o 6 (draft): 5 (public) 4 (draft)
943 |\
949 |\
944 | o 5 (public): 3 (public) -1 (public)
950 | o 5 (public): 3 (public) -1 (public)
945 | |
951 | |
946 o | 4 (draft): 3 (public) -1 (public)
952 o | 4 (draft): 3 (public) -1 (public)
947 |/
953 |/
948 o 3 (public): 2 (public) -1 (public)
954 o 3 (public): 2 (public) -1 (public)
949 |
955 |
950 o 2 (public): 1 (public) -1 (public)
956 o 2 (public): 1 (public) -1 (public)
951 |
957 |
952 o 1 (public): 0 (public) -1 (public)
958 o 1 (public): 0 (public) -1 (public)
953 |
959 |
954 o 0 (public): -1 (public) -1 (public)
960 o 0 (public): -1 (public) -1 (public)
955
961
956
962
957 Missing non-standard names give no error (backward compatibility):
963 Missing non-standard names give no error (backward compatibility):
958
964
959 $ echo "changeset = '{c}'" > t
965 $ echo "changeset = '{c}'" > t
960 $ hg log --style ./t
966 $ hg log --style ./t
961
967
962 Defining non-standard name works:
968 Defining non-standard name works:
963
969
964 $ cat <<EOF > t
970 $ cat <<EOF > t
965 > changeset = '{c}'
971 > changeset = '{c}'
966 > c = q
972 > c = q
967 > EOF
973 > EOF
968 $ hg log --style ./t
974 $ hg log --style ./t
969 8
975 8
970 7
976 7
971 6
977 6
972 5
978 5
973 4
979 4
974 3
980 3
975 2
981 2
976 1
982 1
977 0
983 0
978
984
979 ui.style works:
985 ui.style works:
980
986
981 $ echo '[ui]' > .hg/hgrc
987 $ echo '[ui]' > .hg/hgrc
982 $ echo 'style = t' >> .hg/hgrc
988 $ echo 'style = t' >> .hg/hgrc
983 $ hg log
989 $ hg log
984 8
990 8
985 7
991 7
986 6
992 6
987 5
993 5
988 4
994 4
989 3
995 3
990 2
996 2
991 1
997 1
992 0
998 0
993
999
994
1000
995 Issue338:
1001 Issue338:
996
1002
997 $ hg log --style=changelog > changelog
1003 $ hg log --style=changelog > changelog
998
1004
999 $ cat changelog
1005 $ cat changelog
1000 2020-01-01 test <test>
1006 2020-01-01 test <test>
1001
1007
1002 * fourth, second, third:
1008 * fourth, second, third:
1003 third
1009 third
1004 [95c24699272e] [tip]
1010 [95c24699272e] [tip]
1005
1011
1006 1970-01-12 User Name <user@hostname>
1012 1970-01-12 User Name <user@hostname>
1007
1013
1008 * second:
1014 * second:
1009 second
1015 second
1010 [29114dbae42b]
1016 [29114dbae42b]
1011
1017
1012 1970-01-18 person <person>
1018 1970-01-18 person <person>
1013
1019
1014 * merge
1020 * merge
1015 [d41e714fe50d]
1021 [d41e714fe50d]
1016
1022
1017 * d:
1023 * d:
1018 new head
1024 new head
1019 [13207e5a10d9]
1025 [13207e5a10d9]
1020
1026
1021 1970-01-17 person <person>
1027 1970-01-17 person <person>
1022
1028
1023 * new branch
1029 * new branch
1024 [bbe44766e73d] <foo>
1030 [bbe44766e73d] <foo>
1025
1031
1026 1970-01-16 person <person>
1032 1970-01-16 person <person>
1027
1033
1028 * c:
1034 * c:
1029 no user, no domain
1035 no user, no domain
1030 [10e46f2dcbf4]
1036 [10e46f2dcbf4]
1031
1037
1032 1970-01-14 other <other@place>
1038 1970-01-14 other <other@place>
1033
1039
1034 * c:
1040 * c:
1035 no person
1041 no person
1036 [97054abb4ab8]
1042 [97054abb4ab8]
1037
1043
1038 1970-01-13 A. N. Other <other@place>
1044 1970-01-13 A. N. Other <other@place>
1039
1045
1040 * b:
1046 * b:
1041 other 1 other 2
1047 other 1 other 2
1042
1048
1043 other 3
1049 other 3
1044 [b608e9d1a3f0]
1050 [b608e9d1a3f0]
1045
1051
1046 1970-01-12 User Name <user@hostname>
1052 1970-01-12 User Name <user@hostname>
1047
1053
1048 * a:
1054 * a:
1049 line 1 line 2
1055 line 1 line 2
1050 [1e4e1b8f71e0]
1056 [1e4e1b8f71e0]
1051
1057
1052
1058
1053 Issue2130: xml output for 'hg heads' is malformed
1059 Issue2130: xml output for 'hg heads' is malformed
1054
1060
1055 $ hg heads --style changelog
1061 $ hg heads --style changelog
1056 2020-01-01 test <test>
1062 2020-01-01 test <test>
1057
1063
1058 * fourth, second, third:
1064 * fourth, second, third:
1059 third
1065 third
1060 [95c24699272e] [tip]
1066 [95c24699272e] [tip]
1061
1067
1062 1970-01-18 person <person>
1068 1970-01-18 person <person>
1063
1069
1064 * merge
1070 * merge
1065 [d41e714fe50d]
1071 [d41e714fe50d]
1066
1072
1067 1970-01-17 person <person>
1073 1970-01-17 person <person>
1068
1074
1069 * new branch
1075 * new branch
1070 [bbe44766e73d] <foo>
1076 [bbe44766e73d] <foo>
1071
1077
1072
1078
1073 Keys work:
1079 Keys work:
1074
1080
1075 $ for key in author branch branches date desc file_adds file_dels file_mods \
1081 $ for key in author branch branches date desc file_adds file_dels file_mods \
1076 > file_copies file_copies_switch files \
1082 > file_copies file_copies_switch files \
1077 > manifest node parents rev tags diffstat extras \
1083 > manifest node parents rev tags diffstat extras \
1078 > p1rev p2rev p1node p2node; do
1084 > p1rev p2rev p1node p2node; do
1079 > for mode in '' --verbose --debug; do
1085 > for mode in '' --verbose --debug; do
1080 > hg log $mode --template "$key$mode: {$key}\n"
1086 > hg log $mode --template "$key$mode: {$key}\n"
1081 > done
1087 > done
1082 > done
1088 > done
1083 author: test
1089 author: test
1084 author: User Name <user@hostname>
1090 author: User Name <user@hostname>
1085 author: person
1091 author: person
1086 author: person
1092 author: person
1087 author: person
1093 author: person
1088 author: person
1094 author: person
1089 author: other@place
1095 author: other@place
1090 author: A. N. Other <other@place>
1096 author: A. N. Other <other@place>
1091 author: User Name <user@hostname>
1097 author: User Name <user@hostname>
1092 author--verbose: test
1098 author--verbose: test
1093 author--verbose: User Name <user@hostname>
1099 author--verbose: User Name <user@hostname>
1094 author--verbose: person
1100 author--verbose: person
1095 author--verbose: person
1101 author--verbose: person
1096 author--verbose: person
1102 author--verbose: person
1097 author--verbose: person
1103 author--verbose: person
1098 author--verbose: other@place
1104 author--verbose: other@place
1099 author--verbose: A. N. Other <other@place>
1105 author--verbose: A. N. Other <other@place>
1100 author--verbose: User Name <user@hostname>
1106 author--verbose: User Name <user@hostname>
1101 author--debug: test
1107 author--debug: test
1102 author--debug: User Name <user@hostname>
1108 author--debug: User Name <user@hostname>
1103 author--debug: person
1109 author--debug: person
1104 author--debug: person
1110 author--debug: person
1105 author--debug: person
1111 author--debug: person
1106 author--debug: person
1112 author--debug: person
1107 author--debug: other@place
1113 author--debug: other@place
1108 author--debug: A. N. Other <other@place>
1114 author--debug: A. N. Other <other@place>
1109 author--debug: User Name <user@hostname>
1115 author--debug: User Name <user@hostname>
1110 branch: default
1116 branch: default
1111 branch: default
1117 branch: default
1112 branch: default
1118 branch: default
1113 branch: default
1119 branch: default
1114 branch: foo
1120 branch: foo
1115 branch: default
1121 branch: default
1116 branch: default
1122 branch: default
1117 branch: default
1123 branch: default
1118 branch: default
1124 branch: default
1119 branch--verbose: default
1125 branch--verbose: default
1120 branch--verbose: default
1126 branch--verbose: default
1121 branch--verbose: default
1127 branch--verbose: default
1122 branch--verbose: default
1128 branch--verbose: default
1123 branch--verbose: foo
1129 branch--verbose: foo
1124 branch--verbose: default
1130 branch--verbose: default
1125 branch--verbose: default
1131 branch--verbose: default
1126 branch--verbose: default
1132 branch--verbose: default
1127 branch--verbose: default
1133 branch--verbose: default
1128 branch--debug: default
1134 branch--debug: default
1129 branch--debug: default
1135 branch--debug: default
1130 branch--debug: default
1136 branch--debug: default
1131 branch--debug: default
1137 branch--debug: default
1132 branch--debug: foo
1138 branch--debug: foo
1133 branch--debug: default
1139 branch--debug: default
1134 branch--debug: default
1140 branch--debug: default
1135 branch--debug: default
1141 branch--debug: default
1136 branch--debug: default
1142 branch--debug: default
1137 branches:
1143 branches:
1138 branches:
1144 branches:
1139 branches:
1145 branches:
1140 branches:
1146 branches:
1141 branches: foo
1147 branches: foo
1142 branches:
1148 branches:
1143 branches:
1149 branches:
1144 branches:
1150 branches:
1145 branches:
1151 branches:
1146 branches--verbose:
1152 branches--verbose:
1147 branches--verbose:
1153 branches--verbose:
1148 branches--verbose:
1154 branches--verbose:
1149 branches--verbose:
1155 branches--verbose:
1150 branches--verbose: foo
1156 branches--verbose: foo
1151 branches--verbose:
1157 branches--verbose:
1152 branches--verbose:
1158 branches--verbose:
1153 branches--verbose:
1159 branches--verbose:
1154 branches--verbose:
1160 branches--verbose:
1155 branches--debug:
1161 branches--debug:
1156 branches--debug:
1162 branches--debug:
1157 branches--debug:
1163 branches--debug:
1158 branches--debug:
1164 branches--debug:
1159 branches--debug: foo
1165 branches--debug: foo
1160 branches--debug:
1166 branches--debug:
1161 branches--debug:
1167 branches--debug:
1162 branches--debug:
1168 branches--debug:
1163 branches--debug:
1169 branches--debug:
1164 date: 1577872860.00
1170 date: 1577872860.00
1165 date: 1000000.00
1171 date: 1000000.00
1166 date: 1500001.00
1172 date: 1500001.00
1167 date: 1500000.00
1173 date: 1500000.00
1168 date: 1400000.00
1174 date: 1400000.00
1169 date: 1300000.00
1175 date: 1300000.00
1170 date: 1200000.00
1176 date: 1200000.00
1171 date: 1100000.00
1177 date: 1100000.00
1172 date: 1000000.00
1178 date: 1000000.00
1173 date--verbose: 1577872860.00
1179 date--verbose: 1577872860.00
1174 date--verbose: 1000000.00
1180 date--verbose: 1000000.00
1175 date--verbose: 1500001.00
1181 date--verbose: 1500001.00
1176 date--verbose: 1500000.00
1182 date--verbose: 1500000.00
1177 date--verbose: 1400000.00
1183 date--verbose: 1400000.00
1178 date--verbose: 1300000.00
1184 date--verbose: 1300000.00
1179 date--verbose: 1200000.00
1185 date--verbose: 1200000.00
1180 date--verbose: 1100000.00
1186 date--verbose: 1100000.00
1181 date--verbose: 1000000.00
1187 date--verbose: 1000000.00
1182 date--debug: 1577872860.00
1188 date--debug: 1577872860.00
1183 date--debug: 1000000.00
1189 date--debug: 1000000.00
1184 date--debug: 1500001.00
1190 date--debug: 1500001.00
1185 date--debug: 1500000.00
1191 date--debug: 1500000.00
1186 date--debug: 1400000.00
1192 date--debug: 1400000.00
1187 date--debug: 1300000.00
1193 date--debug: 1300000.00
1188 date--debug: 1200000.00
1194 date--debug: 1200000.00
1189 date--debug: 1100000.00
1195 date--debug: 1100000.00
1190 date--debug: 1000000.00
1196 date--debug: 1000000.00
1191 desc: third
1197 desc: third
1192 desc: second
1198 desc: second
1193 desc: merge
1199 desc: merge
1194 desc: new head
1200 desc: new head
1195 desc: new branch
1201 desc: new branch
1196 desc: no user, no domain
1202 desc: no user, no domain
1197 desc: no person
1203 desc: no person
1198 desc: other 1
1204 desc: other 1
1199 other 2
1205 other 2
1200
1206
1201 other 3
1207 other 3
1202 desc: line 1
1208 desc: line 1
1203 line 2
1209 line 2
1204 desc--verbose: third
1210 desc--verbose: third
1205 desc--verbose: second
1211 desc--verbose: second
1206 desc--verbose: merge
1212 desc--verbose: merge
1207 desc--verbose: new head
1213 desc--verbose: new head
1208 desc--verbose: new branch
1214 desc--verbose: new branch
1209 desc--verbose: no user, no domain
1215 desc--verbose: no user, no domain
1210 desc--verbose: no person
1216 desc--verbose: no person
1211 desc--verbose: other 1
1217 desc--verbose: other 1
1212 other 2
1218 other 2
1213
1219
1214 other 3
1220 other 3
1215 desc--verbose: line 1
1221 desc--verbose: line 1
1216 line 2
1222 line 2
1217 desc--debug: third
1223 desc--debug: third
1218 desc--debug: second
1224 desc--debug: second
1219 desc--debug: merge
1225 desc--debug: merge
1220 desc--debug: new head
1226 desc--debug: new head
1221 desc--debug: new branch
1227 desc--debug: new branch
1222 desc--debug: no user, no domain
1228 desc--debug: no user, no domain
1223 desc--debug: no person
1229 desc--debug: no person
1224 desc--debug: other 1
1230 desc--debug: other 1
1225 other 2
1231 other 2
1226
1232
1227 other 3
1233 other 3
1228 desc--debug: line 1
1234 desc--debug: line 1
1229 line 2
1235 line 2
1230 file_adds: fourth third
1236 file_adds: fourth third
1231 file_adds: second
1237 file_adds: second
1232 file_adds:
1238 file_adds:
1233 file_adds: d
1239 file_adds: d
1234 file_adds:
1240 file_adds:
1235 file_adds:
1241 file_adds:
1236 file_adds: c
1242 file_adds: c
1237 file_adds: b
1243 file_adds: b
1238 file_adds: a
1244 file_adds: a
1239 file_adds--verbose: fourth third
1245 file_adds--verbose: fourth third
1240 file_adds--verbose: second
1246 file_adds--verbose: second
1241 file_adds--verbose:
1247 file_adds--verbose:
1242 file_adds--verbose: d
1248 file_adds--verbose: d
1243 file_adds--verbose:
1249 file_adds--verbose:
1244 file_adds--verbose:
1250 file_adds--verbose:
1245 file_adds--verbose: c
1251 file_adds--verbose: c
1246 file_adds--verbose: b
1252 file_adds--verbose: b
1247 file_adds--verbose: a
1253 file_adds--verbose: a
1248 file_adds--debug: fourth third
1254 file_adds--debug: fourth third
1249 file_adds--debug: second
1255 file_adds--debug: second
1250 file_adds--debug:
1256 file_adds--debug:
1251 file_adds--debug: d
1257 file_adds--debug: d
1252 file_adds--debug:
1258 file_adds--debug:
1253 file_adds--debug:
1259 file_adds--debug:
1254 file_adds--debug: c
1260 file_adds--debug: c
1255 file_adds--debug: b
1261 file_adds--debug: b
1256 file_adds--debug: a
1262 file_adds--debug: a
1257 file_dels: second
1263 file_dels: second
1258 file_dels:
1264 file_dels:
1259 file_dels:
1265 file_dels:
1260 file_dels:
1266 file_dels:
1261 file_dels:
1267 file_dels:
1262 file_dels:
1268 file_dels:
1263 file_dels:
1269 file_dels:
1264 file_dels:
1270 file_dels:
1265 file_dels:
1271 file_dels:
1266 file_dels--verbose: second
1272 file_dels--verbose: second
1267 file_dels--verbose:
1273 file_dels--verbose:
1268 file_dels--verbose:
1274 file_dels--verbose:
1269 file_dels--verbose:
1275 file_dels--verbose:
1270 file_dels--verbose:
1276 file_dels--verbose:
1271 file_dels--verbose:
1277 file_dels--verbose:
1272 file_dels--verbose:
1278 file_dels--verbose:
1273 file_dels--verbose:
1279 file_dels--verbose:
1274 file_dels--verbose:
1280 file_dels--verbose:
1275 file_dels--debug: second
1281 file_dels--debug: second
1276 file_dels--debug:
1282 file_dels--debug:
1277 file_dels--debug:
1283 file_dels--debug:
1278 file_dels--debug:
1284 file_dels--debug:
1279 file_dels--debug:
1285 file_dels--debug:
1280 file_dels--debug:
1286 file_dels--debug:
1281 file_dels--debug:
1287 file_dels--debug:
1282 file_dels--debug:
1288 file_dels--debug:
1283 file_dels--debug:
1289 file_dels--debug:
1284 file_mods:
1290 file_mods:
1285 file_mods:
1291 file_mods:
1286 file_mods:
1292 file_mods:
1287 file_mods:
1293 file_mods:
1288 file_mods:
1294 file_mods:
1289 file_mods: c
1295 file_mods: c
1290 file_mods:
1296 file_mods:
1291 file_mods:
1297 file_mods:
1292 file_mods:
1298 file_mods:
1293 file_mods--verbose:
1299 file_mods--verbose:
1294 file_mods--verbose:
1300 file_mods--verbose:
1295 file_mods--verbose:
1301 file_mods--verbose:
1296 file_mods--verbose:
1302 file_mods--verbose:
1297 file_mods--verbose:
1303 file_mods--verbose:
1298 file_mods--verbose: c
1304 file_mods--verbose: c
1299 file_mods--verbose:
1305 file_mods--verbose:
1300 file_mods--verbose:
1306 file_mods--verbose:
1301 file_mods--verbose:
1307 file_mods--verbose:
1302 file_mods--debug:
1308 file_mods--debug:
1303 file_mods--debug:
1309 file_mods--debug:
1304 file_mods--debug:
1310 file_mods--debug:
1305 file_mods--debug:
1311 file_mods--debug:
1306 file_mods--debug:
1312 file_mods--debug:
1307 file_mods--debug: c
1313 file_mods--debug: c
1308 file_mods--debug:
1314 file_mods--debug:
1309 file_mods--debug:
1315 file_mods--debug:
1310 file_mods--debug:
1316 file_mods--debug:
1311 file_copies: fourth (second)
1317 file_copies: fourth (second)
1312 file_copies:
1318 file_copies:
1313 file_copies:
1319 file_copies:
1314 file_copies:
1320 file_copies:
1315 file_copies:
1321 file_copies:
1316 file_copies:
1322 file_copies:
1317 file_copies:
1323 file_copies:
1318 file_copies:
1324 file_copies:
1319 file_copies:
1325 file_copies:
1320 file_copies--verbose: fourth (second)
1326 file_copies--verbose: fourth (second)
1321 file_copies--verbose:
1327 file_copies--verbose:
1322 file_copies--verbose:
1328 file_copies--verbose:
1323 file_copies--verbose:
1329 file_copies--verbose:
1324 file_copies--verbose:
1330 file_copies--verbose:
1325 file_copies--verbose:
1331 file_copies--verbose:
1326 file_copies--verbose:
1332 file_copies--verbose:
1327 file_copies--verbose:
1333 file_copies--verbose:
1328 file_copies--verbose:
1334 file_copies--verbose:
1329 file_copies--debug: fourth (second)
1335 file_copies--debug: fourth (second)
1330 file_copies--debug:
1336 file_copies--debug:
1331 file_copies--debug:
1337 file_copies--debug:
1332 file_copies--debug:
1338 file_copies--debug:
1333 file_copies--debug:
1339 file_copies--debug:
1334 file_copies--debug:
1340 file_copies--debug:
1335 file_copies--debug:
1341 file_copies--debug:
1336 file_copies--debug:
1342 file_copies--debug:
1337 file_copies--debug:
1343 file_copies--debug:
1338 file_copies_switch:
1344 file_copies_switch:
1339 file_copies_switch:
1345 file_copies_switch:
1340 file_copies_switch:
1346 file_copies_switch:
1341 file_copies_switch:
1347 file_copies_switch:
1342 file_copies_switch:
1348 file_copies_switch:
1343 file_copies_switch:
1349 file_copies_switch:
1344 file_copies_switch:
1350 file_copies_switch:
1345 file_copies_switch:
1351 file_copies_switch:
1346 file_copies_switch:
1352 file_copies_switch:
1347 file_copies_switch--verbose:
1353 file_copies_switch--verbose:
1348 file_copies_switch--verbose:
1354 file_copies_switch--verbose:
1349 file_copies_switch--verbose:
1355 file_copies_switch--verbose:
1350 file_copies_switch--verbose:
1356 file_copies_switch--verbose:
1351 file_copies_switch--verbose:
1357 file_copies_switch--verbose:
1352 file_copies_switch--verbose:
1358 file_copies_switch--verbose:
1353 file_copies_switch--verbose:
1359 file_copies_switch--verbose:
1354 file_copies_switch--verbose:
1360 file_copies_switch--verbose:
1355 file_copies_switch--verbose:
1361 file_copies_switch--verbose:
1356 file_copies_switch--debug:
1362 file_copies_switch--debug:
1357 file_copies_switch--debug:
1363 file_copies_switch--debug:
1358 file_copies_switch--debug:
1364 file_copies_switch--debug:
1359 file_copies_switch--debug:
1365 file_copies_switch--debug:
1360 file_copies_switch--debug:
1366 file_copies_switch--debug:
1361 file_copies_switch--debug:
1367 file_copies_switch--debug:
1362 file_copies_switch--debug:
1368 file_copies_switch--debug:
1363 file_copies_switch--debug:
1369 file_copies_switch--debug:
1364 file_copies_switch--debug:
1370 file_copies_switch--debug:
1365 files: fourth second third
1371 files: fourth second third
1366 files: second
1372 files: second
1367 files:
1373 files:
1368 files: d
1374 files: d
1369 files:
1375 files:
1370 files: c
1376 files: c
1371 files: c
1377 files: c
1372 files: b
1378 files: b
1373 files: a
1379 files: a
1374 files--verbose: fourth second third
1380 files--verbose: fourth second third
1375 files--verbose: second
1381 files--verbose: second
1376 files--verbose:
1382 files--verbose:
1377 files--verbose: d
1383 files--verbose: d
1378 files--verbose:
1384 files--verbose:
1379 files--verbose: c
1385 files--verbose: c
1380 files--verbose: c
1386 files--verbose: c
1381 files--verbose: b
1387 files--verbose: b
1382 files--verbose: a
1388 files--verbose: a
1383 files--debug: fourth second third
1389 files--debug: fourth second third
1384 files--debug: second
1390 files--debug: second
1385 files--debug:
1391 files--debug:
1386 files--debug: d
1392 files--debug: d
1387 files--debug:
1393 files--debug:
1388 files--debug: c
1394 files--debug: c
1389 files--debug: c
1395 files--debug: c
1390 files--debug: b
1396 files--debug: b
1391 files--debug: a
1397 files--debug: a
1392 manifest: 6:94961b75a2da
1398 manifest: 6:94961b75a2da
1393 manifest: 5:f2dbc354b94e
1399 manifest: 5:f2dbc354b94e
1394 manifest: 4:4dc3def4f9b4
1400 manifest: 4:4dc3def4f9b4
1395 manifest: 4:4dc3def4f9b4
1401 manifest: 4:4dc3def4f9b4
1396 manifest: 3:cb5a1327723b
1402 manifest: 3:cb5a1327723b
1397 manifest: 3:cb5a1327723b
1403 manifest: 3:cb5a1327723b
1398 manifest: 2:6e0e82995c35
1404 manifest: 2:6e0e82995c35
1399 manifest: 1:4e8d705b1e53
1405 manifest: 1:4e8d705b1e53
1400 manifest: 0:a0c8bcbbb45c
1406 manifest: 0:a0c8bcbbb45c
1401 manifest--verbose: 6:94961b75a2da
1407 manifest--verbose: 6:94961b75a2da
1402 manifest--verbose: 5:f2dbc354b94e
1408 manifest--verbose: 5:f2dbc354b94e
1403 manifest--verbose: 4:4dc3def4f9b4
1409 manifest--verbose: 4:4dc3def4f9b4
1404 manifest--verbose: 4:4dc3def4f9b4
1410 manifest--verbose: 4:4dc3def4f9b4
1405 manifest--verbose: 3:cb5a1327723b
1411 manifest--verbose: 3:cb5a1327723b
1406 manifest--verbose: 3:cb5a1327723b
1412 manifest--verbose: 3:cb5a1327723b
1407 manifest--verbose: 2:6e0e82995c35
1413 manifest--verbose: 2:6e0e82995c35
1408 manifest--verbose: 1:4e8d705b1e53
1414 manifest--verbose: 1:4e8d705b1e53
1409 manifest--verbose: 0:a0c8bcbbb45c
1415 manifest--verbose: 0:a0c8bcbbb45c
1410 manifest--debug: 6:94961b75a2da554b4df6fb599e5bfc7d48de0c64
1416 manifest--debug: 6:94961b75a2da554b4df6fb599e5bfc7d48de0c64
1411 manifest--debug: 5:f2dbc354b94e5ec0b4f10680ee0cee816101d0bf
1417 manifest--debug: 5:f2dbc354b94e5ec0b4f10680ee0cee816101d0bf
1412 manifest--debug: 4:4dc3def4f9b4c6e8de820f6ee74737f91e96a216
1418 manifest--debug: 4:4dc3def4f9b4c6e8de820f6ee74737f91e96a216
1413 manifest--debug: 4:4dc3def4f9b4c6e8de820f6ee74737f91e96a216
1419 manifest--debug: 4:4dc3def4f9b4c6e8de820f6ee74737f91e96a216
1414 manifest--debug: 3:cb5a1327723bada42f117e4c55a303246eaf9ccc
1420 manifest--debug: 3:cb5a1327723bada42f117e4c55a303246eaf9ccc
1415 manifest--debug: 3:cb5a1327723bada42f117e4c55a303246eaf9ccc
1421 manifest--debug: 3:cb5a1327723bada42f117e4c55a303246eaf9ccc
1416 manifest--debug: 2:6e0e82995c35d0d57a52aca8da4e56139e06b4b1
1422 manifest--debug: 2:6e0e82995c35d0d57a52aca8da4e56139e06b4b1
1417 manifest--debug: 1:4e8d705b1e53e3f9375e0e60dc7b525d8211fe55
1423 manifest--debug: 1:4e8d705b1e53e3f9375e0e60dc7b525d8211fe55
1418 manifest--debug: 0:a0c8bcbbb45c63b90b70ad007bf38961f64f2af0
1424 manifest--debug: 0:a0c8bcbbb45c63b90b70ad007bf38961f64f2af0
1419 node: 95c24699272ef57d062b8bccc32c878bf841784a
1425 node: 95c24699272ef57d062b8bccc32c878bf841784a
1420 node: 29114dbae42b9f078cf2714dbe3a86bba8ec7453
1426 node: 29114dbae42b9f078cf2714dbe3a86bba8ec7453
1421 node: d41e714fe50d9e4a5f11b4d595d543481b5f980b
1427 node: d41e714fe50d9e4a5f11b4d595d543481b5f980b
1422 node: 13207e5a10d9fd28ec424934298e176197f2c67f
1428 node: 13207e5a10d9fd28ec424934298e176197f2c67f
1423 node: bbe44766e73d5f11ed2177f1838de10c53ef3e74
1429 node: bbe44766e73d5f11ed2177f1838de10c53ef3e74
1424 node: 10e46f2dcbf4823578cf180f33ecf0b957964c47
1430 node: 10e46f2dcbf4823578cf180f33ecf0b957964c47
1425 node: 97054abb4ab824450e9164180baf491ae0078465
1431 node: 97054abb4ab824450e9164180baf491ae0078465
1426 node: b608e9d1a3f0273ccf70fb85fd6866b3482bf965
1432 node: b608e9d1a3f0273ccf70fb85fd6866b3482bf965
1427 node: 1e4e1b8f71e05681d422154f5421e385fec3454f
1433 node: 1e4e1b8f71e05681d422154f5421e385fec3454f
1428 node--verbose: 95c24699272ef57d062b8bccc32c878bf841784a
1434 node--verbose: 95c24699272ef57d062b8bccc32c878bf841784a
1429 node--verbose: 29114dbae42b9f078cf2714dbe3a86bba8ec7453
1435 node--verbose: 29114dbae42b9f078cf2714dbe3a86bba8ec7453
1430 node--verbose: d41e714fe50d9e4a5f11b4d595d543481b5f980b
1436 node--verbose: d41e714fe50d9e4a5f11b4d595d543481b5f980b
1431 node--verbose: 13207e5a10d9fd28ec424934298e176197f2c67f
1437 node--verbose: 13207e5a10d9fd28ec424934298e176197f2c67f
1432 node--verbose: bbe44766e73d5f11ed2177f1838de10c53ef3e74
1438 node--verbose: bbe44766e73d5f11ed2177f1838de10c53ef3e74
1433 node--verbose: 10e46f2dcbf4823578cf180f33ecf0b957964c47
1439 node--verbose: 10e46f2dcbf4823578cf180f33ecf0b957964c47
1434 node--verbose: 97054abb4ab824450e9164180baf491ae0078465
1440 node--verbose: 97054abb4ab824450e9164180baf491ae0078465
1435 node--verbose: b608e9d1a3f0273ccf70fb85fd6866b3482bf965
1441 node--verbose: b608e9d1a3f0273ccf70fb85fd6866b3482bf965
1436 node--verbose: 1e4e1b8f71e05681d422154f5421e385fec3454f
1442 node--verbose: 1e4e1b8f71e05681d422154f5421e385fec3454f
1437 node--debug: 95c24699272ef57d062b8bccc32c878bf841784a
1443 node--debug: 95c24699272ef57d062b8bccc32c878bf841784a
1438 node--debug: 29114dbae42b9f078cf2714dbe3a86bba8ec7453
1444 node--debug: 29114dbae42b9f078cf2714dbe3a86bba8ec7453
1439 node--debug: d41e714fe50d9e4a5f11b4d595d543481b5f980b
1445 node--debug: d41e714fe50d9e4a5f11b4d595d543481b5f980b
1440 node--debug: 13207e5a10d9fd28ec424934298e176197f2c67f
1446 node--debug: 13207e5a10d9fd28ec424934298e176197f2c67f
1441 node--debug: bbe44766e73d5f11ed2177f1838de10c53ef3e74
1447 node--debug: bbe44766e73d5f11ed2177f1838de10c53ef3e74
1442 node--debug: 10e46f2dcbf4823578cf180f33ecf0b957964c47
1448 node--debug: 10e46f2dcbf4823578cf180f33ecf0b957964c47
1443 node--debug: 97054abb4ab824450e9164180baf491ae0078465
1449 node--debug: 97054abb4ab824450e9164180baf491ae0078465
1444 node--debug: b608e9d1a3f0273ccf70fb85fd6866b3482bf965
1450 node--debug: b608e9d1a3f0273ccf70fb85fd6866b3482bf965
1445 node--debug: 1e4e1b8f71e05681d422154f5421e385fec3454f
1451 node--debug: 1e4e1b8f71e05681d422154f5421e385fec3454f
1446 parents:
1452 parents:
1447 parents: -1:000000000000
1453 parents: -1:000000000000
1448 parents: 5:13207e5a10d9 4:bbe44766e73d
1454 parents: 5:13207e5a10d9 4:bbe44766e73d
1449 parents: 3:10e46f2dcbf4
1455 parents: 3:10e46f2dcbf4
1450 parents:
1456 parents:
1451 parents:
1457 parents:
1452 parents:
1458 parents:
1453 parents:
1459 parents:
1454 parents:
1460 parents:
1455 parents--verbose:
1461 parents--verbose:
1456 parents--verbose: -1:000000000000
1462 parents--verbose: -1:000000000000
1457 parents--verbose: 5:13207e5a10d9 4:bbe44766e73d
1463 parents--verbose: 5:13207e5a10d9 4:bbe44766e73d
1458 parents--verbose: 3:10e46f2dcbf4
1464 parents--verbose: 3:10e46f2dcbf4
1459 parents--verbose:
1465 parents--verbose:
1460 parents--verbose:
1466 parents--verbose:
1461 parents--verbose:
1467 parents--verbose:
1462 parents--verbose:
1468 parents--verbose:
1463 parents--verbose:
1469 parents--verbose:
1464 parents--debug: 7:29114dbae42b9f078cf2714dbe3a86bba8ec7453 -1:0000000000000000000000000000000000000000
1470 parents--debug: 7:29114dbae42b9f078cf2714dbe3a86bba8ec7453 -1:0000000000000000000000000000000000000000
1465 parents--debug: -1:0000000000000000000000000000000000000000 -1:0000000000000000000000000000000000000000
1471 parents--debug: -1:0000000000000000000000000000000000000000 -1:0000000000000000000000000000000000000000
1466 parents--debug: 5:13207e5a10d9fd28ec424934298e176197f2c67f 4:bbe44766e73d5f11ed2177f1838de10c53ef3e74
1472 parents--debug: 5:13207e5a10d9fd28ec424934298e176197f2c67f 4:bbe44766e73d5f11ed2177f1838de10c53ef3e74
1467 parents--debug: 3:10e46f2dcbf4823578cf180f33ecf0b957964c47 -1:0000000000000000000000000000000000000000
1473 parents--debug: 3:10e46f2dcbf4823578cf180f33ecf0b957964c47 -1:0000000000000000000000000000000000000000
1468 parents--debug: 3:10e46f2dcbf4823578cf180f33ecf0b957964c47 -1:0000000000000000000000000000000000000000
1474 parents--debug: 3:10e46f2dcbf4823578cf180f33ecf0b957964c47 -1:0000000000000000000000000000000000000000
1469 parents--debug: 2:97054abb4ab824450e9164180baf491ae0078465 -1:0000000000000000000000000000000000000000
1475 parents--debug: 2:97054abb4ab824450e9164180baf491ae0078465 -1:0000000000000000000000000000000000000000
1470 parents--debug: 1:b608e9d1a3f0273ccf70fb85fd6866b3482bf965 -1:0000000000000000000000000000000000000000
1476 parents--debug: 1:b608e9d1a3f0273ccf70fb85fd6866b3482bf965 -1:0000000000000000000000000000000000000000
1471 parents--debug: 0:1e4e1b8f71e05681d422154f5421e385fec3454f -1:0000000000000000000000000000000000000000
1477 parents--debug: 0:1e4e1b8f71e05681d422154f5421e385fec3454f -1:0000000000000000000000000000000000000000
1472 parents--debug: -1:0000000000000000000000000000000000000000 -1:0000000000000000000000000000000000000000
1478 parents--debug: -1:0000000000000000000000000000000000000000 -1:0000000000000000000000000000000000000000
1473 rev: 8
1479 rev: 8
1474 rev: 7
1480 rev: 7
1475 rev: 6
1481 rev: 6
1476 rev: 5
1482 rev: 5
1477 rev: 4
1483 rev: 4
1478 rev: 3
1484 rev: 3
1479 rev: 2
1485 rev: 2
1480 rev: 1
1486 rev: 1
1481 rev: 0
1487 rev: 0
1482 rev--verbose: 8
1488 rev--verbose: 8
1483 rev--verbose: 7
1489 rev--verbose: 7
1484 rev--verbose: 6
1490 rev--verbose: 6
1485 rev--verbose: 5
1491 rev--verbose: 5
1486 rev--verbose: 4
1492 rev--verbose: 4
1487 rev--verbose: 3
1493 rev--verbose: 3
1488 rev--verbose: 2
1494 rev--verbose: 2
1489 rev--verbose: 1
1495 rev--verbose: 1
1490 rev--verbose: 0
1496 rev--verbose: 0
1491 rev--debug: 8
1497 rev--debug: 8
1492 rev--debug: 7
1498 rev--debug: 7
1493 rev--debug: 6
1499 rev--debug: 6
1494 rev--debug: 5
1500 rev--debug: 5
1495 rev--debug: 4
1501 rev--debug: 4
1496 rev--debug: 3
1502 rev--debug: 3
1497 rev--debug: 2
1503 rev--debug: 2
1498 rev--debug: 1
1504 rev--debug: 1
1499 rev--debug: 0
1505 rev--debug: 0
1500 tags: tip
1506 tags: tip
1501 tags:
1507 tags:
1502 tags:
1508 tags:
1503 tags:
1509 tags:
1504 tags:
1510 tags:
1505 tags:
1511 tags:
1506 tags:
1512 tags:
1507 tags:
1513 tags:
1508 tags:
1514 tags:
1509 tags--verbose: tip
1515 tags--verbose: tip
1510 tags--verbose:
1516 tags--verbose:
1511 tags--verbose:
1517 tags--verbose:
1512 tags--verbose:
1518 tags--verbose:
1513 tags--verbose:
1519 tags--verbose:
1514 tags--verbose:
1520 tags--verbose:
1515 tags--verbose:
1521 tags--verbose:
1516 tags--verbose:
1522 tags--verbose:
1517 tags--verbose:
1523 tags--verbose:
1518 tags--debug: tip
1524 tags--debug: tip
1519 tags--debug:
1525 tags--debug:
1520 tags--debug:
1526 tags--debug:
1521 tags--debug:
1527 tags--debug:
1522 tags--debug:
1528 tags--debug:
1523 tags--debug:
1529 tags--debug:
1524 tags--debug:
1530 tags--debug:
1525 tags--debug:
1531 tags--debug:
1526 tags--debug:
1532 tags--debug:
1527 diffstat: 3: +2/-1
1533 diffstat: 3: +2/-1
1528 diffstat: 1: +1/-0
1534 diffstat: 1: +1/-0
1529 diffstat: 0: +0/-0
1535 diffstat: 0: +0/-0
1530 diffstat: 1: +1/-0
1536 diffstat: 1: +1/-0
1531 diffstat: 0: +0/-0
1537 diffstat: 0: +0/-0
1532 diffstat: 1: +1/-0
1538 diffstat: 1: +1/-0
1533 diffstat: 1: +4/-0
1539 diffstat: 1: +4/-0
1534 diffstat: 1: +2/-0
1540 diffstat: 1: +2/-0
1535 diffstat: 1: +1/-0
1541 diffstat: 1: +1/-0
1536 diffstat--verbose: 3: +2/-1
1542 diffstat--verbose: 3: +2/-1
1537 diffstat--verbose: 1: +1/-0
1543 diffstat--verbose: 1: +1/-0
1538 diffstat--verbose: 0: +0/-0
1544 diffstat--verbose: 0: +0/-0
1539 diffstat--verbose: 1: +1/-0
1545 diffstat--verbose: 1: +1/-0
1540 diffstat--verbose: 0: +0/-0
1546 diffstat--verbose: 0: +0/-0
1541 diffstat--verbose: 1: +1/-0
1547 diffstat--verbose: 1: +1/-0
1542 diffstat--verbose: 1: +4/-0
1548 diffstat--verbose: 1: +4/-0
1543 diffstat--verbose: 1: +2/-0
1549 diffstat--verbose: 1: +2/-0
1544 diffstat--verbose: 1: +1/-0
1550 diffstat--verbose: 1: +1/-0
1545 diffstat--debug: 3: +2/-1
1551 diffstat--debug: 3: +2/-1
1546 diffstat--debug: 1: +1/-0
1552 diffstat--debug: 1: +1/-0
1547 diffstat--debug: 0: +0/-0
1553 diffstat--debug: 0: +0/-0
1548 diffstat--debug: 1: +1/-0
1554 diffstat--debug: 1: +1/-0
1549 diffstat--debug: 0: +0/-0
1555 diffstat--debug: 0: +0/-0
1550 diffstat--debug: 1: +1/-0
1556 diffstat--debug: 1: +1/-0
1551 diffstat--debug: 1: +4/-0
1557 diffstat--debug: 1: +4/-0
1552 diffstat--debug: 1: +2/-0
1558 diffstat--debug: 1: +2/-0
1553 diffstat--debug: 1: +1/-0
1559 diffstat--debug: 1: +1/-0
1554 extras: branch=default
1560 extras: branch=default
1555 extras: branch=default
1561 extras: branch=default
1556 extras: branch=default
1562 extras: branch=default
1557 extras: branch=default
1563 extras: branch=default
1558 extras: branch=foo
1564 extras: branch=foo
1559 extras: branch=default
1565 extras: branch=default
1560 extras: branch=default
1566 extras: branch=default
1561 extras: branch=default
1567 extras: branch=default
1562 extras: branch=default
1568 extras: branch=default
1563 extras--verbose: branch=default
1569 extras--verbose: branch=default
1564 extras--verbose: branch=default
1570 extras--verbose: branch=default
1565 extras--verbose: branch=default
1571 extras--verbose: branch=default
1566 extras--verbose: branch=default
1572 extras--verbose: branch=default
1567 extras--verbose: branch=foo
1573 extras--verbose: branch=foo
1568 extras--verbose: branch=default
1574 extras--verbose: branch=default
1569 extras--verbose: branch=default
1575 extras--verbose: branch=default
1570 extras--verbose: branch=default
1576 extras--verbose: branch=default
1571 extras--verbose: branch=default
1577 extras--verbose: branch=default
1572 extras--debug: branch=default
1578 extras--debug: branch=default
1573 extras--debug: branch=default
1579 extras--debug: branch=default
1574 extras--debug: branch=default
1580 extras--debug: branch=default
1575 extras--debug: branch=default
1581 extras--debug: branch=default
1576 extras--debug: branch=foo
1582 extras--debug: branch=foo
1577 extras--debug: branch=default
1583 extras--debug: branch=default
1578 extras--debug: branch=default
1584 extras--debug: branch=default
1579 extras--debug: branch=default
1585 extras--debug: branch=default
1580 extras--debug: branch=default
1586 extras--debug: branch=default
1581 p1rev: 7
1587 p1rev: 7
1582 p1rev: -1
1588 p1rev: -1
1583 p1rev: 5
1589 p1rev: 5
1584 p1rev: 3
1590 p1rev: 3
1585 p1rev: 3
1591 p1rev: 3
1586 p1rev: 2
1592 p1rev: 2
1587 p1rev: 1
1593 p1rev: 1
1588 p1rev: 0
1594 p1rev: 0
1589 p1rev: -1
1595 p1rev: -1
1590 p1rev--verbose: 7
1596 p1rev--verbose: 7
1591 p1rev--verbose: -1
1597 p1rev--verbose: -1
1592 p1rev--verbose: 5
1598 p1rev--verbose: 5
1593 p1rev--verbose: 3
1599 p1rev--verbose: 3
1594 p1rev--verbose: 3
1600 p1rev--verbose: 3
1595 p1rev--verbose: 2
1601 p1rev--verbose: 2
1596 p1rev--verbose: 1
1602 p1rev--verbose: 1
1597 p1rev--verbose: 0
1603 p1rev--verbose: 0
1598 p1rev--verbose: -1
1604 p1rev--verbose: -1
1599 p1rev--debug: 7
1605 p1rev--debug: 7
1600 p1rev--debug: -1
1606 p1rev--debug: -1
1601 p1rev--debug: 5
1607 p1rev--debug: 5
1602 p1rev--debug: 3
1608 p1rev--debug: 3
1603 p1rev--debug: 3
1609 p1rev--debug: 3
1604 p1rev--debug: 2
1610 p1rev--debug: 2
1605 p1rev--debug: 1
1611 p1rev--debug: 1
1606 p1rev--debug: 0
1612 p1rev--debug: 0
1607 p1rev--debug: -1
1613 p1rev--debug: -1
1608 p2rev: -1
1614 p2rev: -1
1609 p2rev: -1
1615 p2rev: -1
1610 p2rev: 4
1616 p2rev: 4
1611 p2rev: -1
1617 p2rev: -1
1612 p2rev: -1
1618 p2rev: -1
1613 p2rev: -1
1619 p2rev: -1
1614 p2rev: -1
1620 p2rev: -1
1615 p2rev: -1
1621 p2rev: -1
1616 p2rev: -1
1622 p2rev: -1
1617 p2rev--verbose: -1
1623 p2rev--verbose: -1
1618 p2rev--verbose: -1
1624 p2rev--verbose: -1
1619 p2rev--verbose: 4
1625 p2rev--verbose: 4
1620 p2rev--verbose: -1
1626 p2rev--verbose: -1
1621 p2rev--verbose: -1
1627 p2rev--verbose: -1
1622 p2rev--verbose: -1
1628 p2rev--verbose: -1
1623 p2rev--verbose: -1
1629 p2rev--verbose: -1
1624 p2rev--verbose: -1
1630 p2rev--verbose: -1
1625 p2rev--verbose: -1
1631 p2rev--verbose: -1
1626 p2rev--debug: -1
1632 p2rev--debug: -1
1627 p2rev--debug: -1
1633 p2rev--debug: -1
1628 p2rev--debug: 4
1634 p2rev--debug: 4
1629 p2rev--debug: -1
1635 p2rev--debug: -1
1630 p2rev--debug: -1
1636 p2rev--debug: -1
1631 p2rev--debug: -1
1637 p2rev--debug: -1
1632 p2rev--debug: -1
1638 p2rev--debug: -1
1633 p2rev--debug: -1
1639 p2rev--debug: -1
1634 p2rev--debug: -1
1640 p2rev--debug: -1
1635 p1node: 29114dbae42b9f078cf2714dbe3a86bba8ec7453
1641 p1node: 29114dbae42b9f078cf2714dbe3a86bba8ec7453
1636 p1node: 0000000000000000000000000000000000000000
1642 p1node: 0000000000000000000000000000000000000000
1637 p1node: 13207e5a10d9fd28ec424934298e176197f2c67f
1643 p1node: 13207e5a10d9fd28ec424934298e176197f2c67f
1638 p1node: 10e46f2dcbf4823578cf180f33ecf0b957964c47
1644 p1node: 10e46f2dcbf4823578cf180f33ecf0b957964c47
1639 p1node: 10e46f2dcbf4823578cf180f33ecf0b957964c47
1645 p1node: 10e46f2dcbf4823578cf180f33ecf0b957964c47
1640 p1node: 97054abb4ab824450e9164180baf491ae0078465
1646 p1node: 97054abb4ab824450e9164180baf491ae0078465
1641 p1node: b608e9d1a3f0273ccf70fb85fd6866b3482bf965
1647 p1node: b608e9d1a3f0273ccf70fb85fd6866b3482bf965
1642 p1node: 1e4e1b8f71e05681d422154f5421e385fec3454f
1648 p1node: 1e4e1b8f71e05681d422154f5421e385fec3454f
1643 p1node: 0000000000000000000000000000000000000000
1649 p1node: 0000000000000000000000000000000000000000
1644 p1node--verbose: 29114dbae42b9f078cf2714dbe3a86bba8ec7453
1650 p1node--verbose: 29114dbae42b9f078cf2714dbe3a86bba8ec7453
1645 p1node--verbose: 0000000000000000000000000000000000000000
1651 p1node--verbose: 0000000000000000000000000000000000000000
1646 p1node--verbose: 13207e5a10d9fd28ec424934298e176197f2c67f
1652 p1node--verbose: 13207e5a10d9fd28ec424934298e176197f2c67f
1647 p1node--verbose: 10e46f2dcbf4823578cf180f33ecf0b957964c47
1653 p1node--verbose: 10e46f2dcbf4823578cf180f33ecf0b957964c47
1648 p1node--verbose: 10e46f2dcbf4823578cf180f33ecf0b957964c47
1654 p1node--verbose: 10e46f2dcbf4823578cf180f33ecf0b957964c47
1649 p1node--verbose: 97054abb4ab824450e9164180baf491ae0078465
1655 p1node--verbose: 97054abb4ab824450e9164180baf491ae0078465
1650 p1node--verbose: b608e9d1a3f0273ccf70fb85fd6866b3482bf965
1656 p1node--verbose: b608e9d1a3f0273ccf70fb85fd6866b3482bf965
1651 p1node--verbose: 1e4e1b8f71e05681d422154f5421e385fec3454f
1657 p1node--verbose: 1e4e1b8f71e05681d422154f5421e385fec3454f
1652 p1node--verbose: 0000000000000000000000000000000000000000
1658 p1node--verbose: 0000000000000000000000000000000000000000
1653 p1node--debug: 29114dbae42b9f078cf2714dbe3a86bba8ec7453
1659 p1node--debug: 29114dbae42b9f078cf2714dbe3a86bba8ec7453
1654 p1node--debug: 0000000000000000000000000000000000000000
1660 p1node--debug: 0000000000000000000000000000000000000000
1655 p1node--debug: 13207e5a10d9fd28ec424934298e176197f2c67f
1661 p1node--debug: 13207e5a10d9fd28ec424934298e176197f2c67f
1656 p1node--debug: 10e46f2dcbf4823578cf180f33ecf0b957964c47
1662 p1node--debug: 10e46f2dcbf4823578cf180f33ecf0b957964c47
1657 p1node--debug: 10e46f2dcbf4823578cf180f33ecf0b957964c47
1663 p1node--debug: 10e46f2dcbf4823578cf180f33ecf0b957964c47
1658 p1node--debug: 97054abb4ab824450e9164180baf491ae0078465
1664 p1node--debug: 97054abb4ab824450e9164180baf491ae0078465
1659 p1node--debug: b608e9d1a3f0273ccf70fb85fd6866b3482bf965
1665 p1node--debug: b608e9d1a3f0273ccf70fb85fd6866b3482bf965
1660 p1node--debug: 1e4e1b8f71e05681d422154f5421e385fec3454f
1666 p1node--debug: 1e4e1b8f71e05681d422154f5421e385fec3454f
1661 p1node--debug: 0000000000000000000000000000000000000000
1667 p1node--debug: 0000000000000000000000000000000000000000
1662 p2node: 0000000000000000000000000000000000000000
1668 p2node: 0000000000000000000000000000000000000000
1663 p2node: 0000000000000000000000000000000000000000
1669 p2node: 0000000000000000000000000000000000000000
1664 p2node: bbe44766e73d5f11ed2177f1838de10c53ef3e74
1670 p2node: bbe44766e73d5f11ed2177f1838de10c53ef3e74
1665 p2node: 0000000000000000000000000000000000000000
1671 p2node: 0000000000000000000000000000000000000000
1666 p2node: 0000000000000000000000000000000000000000
1672 p2node: 0000000000000000000000000000000000000000
1667 p2node: 0000000000000000000000000000000000000000
1673 p2node: 0000000000000000000000000000000000000000
1668 p2node: 0000000000000000000000000000000000000000
1674 p2node: 0000000000000000000000000000000000000000
1669 p2node: 0000000000000000000000000000000000000000
1675 p2node: 0000000000000000000000000000000000000000
1670 p2node: 0000000000000000000000000000000000000000
1676 p2node: 0000000000000000000000000000000000000000
1671 p2node--verbose: 0000000000000000000000000000000000000000
1677 p2node--verbose: 0000000000000000000000000000000000000000
1672 p2node--verbose: 0000000000000000000000000000000000000000
1678 p2node--verbose: 0000000000000000000000000000000000000000
1673 p2node--verbose: bbe44766e73d5f11ed2177f1838de10c53ef3e74
1679 p2node--verbose: bbe44766e73d5f11ed2177f1838de10c53ef3e74
1674 p2node--verbose: 0000000000000000000000000000000000000000
1680 p2node--verbose: 0000000000000000000000000000000000000000
1675 p2node--verbose: 0000000000000000000000000000000000000000
1681 p2node--verbose: 0000000000000000000000000000000000000000
1676 p2node--verbose: 0000000000000000000000000000000000000000
1682 p2node--verbose: 0000000000000000000000000000000000000000
1677 p2node--verbose: 0000000000000000000000000000000000000000
1683 p2node--verbose: 0000000000000000000000000000000000000000
1678 p2node--verbose: 0000000000000000000000000000000000000000
1684 p2node--verbose: 0000000000000000000000000000000000000000
1679 p2node--verbose: 0000000000000000000000000000000000000000
1685 p2node--verbose: 0000000000000000000000000000000000000000
1680 p2node--debug: 0000000000000000000000000000000000000000
1686 p2node--debug: 0000000000000000000000000000000000000000
1681 p2node--debug: 0000000000000000000000000000000000000000
1687 p2node--debug: 0000000000000000000000000000000000000000
1682 p2node--debug: bbe44766e73d5f11ed2177f1838de10c53ef3e74
1688 p2node--debug: bbe44766e73d5f11ed2177f1838de10c53ef3e74
1683 p2node--debug: 0000000000000000000000000000000000000000
1689 p2node--debug: 0000000000000000000000000000000000000000
1684 p2node--debug: 0000000000000000000000000000000000000000
1690 p2node--debug: 0000000000000000000000000000000000000000
1685 p2node--debug: 0000000000000000000000000000000000000000
1691 p2node--debug: 0000000000000000000000000000000000000000
1686 p2node--debug: 0000000000000000000000000000000000000000
1692 p2node--debug: 0000000000000000000000000000000000000000
1687 p2node--debug: 0000000000000000000000000000000000000000
1693 p2node--debug: 0000000000000000000000000000000000000000
1688 p2node--debug: 0000000000000000000000000000000000000000
1694 p2node--debug: 0000000000000000000000000000000000000000
1689
1695
1690 Filters work:
1696 Filters work:
1691
1697
1692 $ hg log --template '{author|domain}\n'
1698 $ hg log --template '{author|domain}\n'
1693
1699
1694 hostname
1700 hostname
1695
1701
1696
1702
1697
1703
1698
1704
1699 place
1705 place
1700 place
1706 place
1701 hostname
1707 hostname
1702
1708
1703 $ hg log --template '{author|person}\n'
1709 $ hg log --template '{author|person}\n'
1704 test
1710 test
1705 User Name
1711 User Name
1706 person
1712 person
1707 person
1713 person
1708 person
1714 person
1709 person
1715 person
1710 other
1716 other
1711 A. N. Other
1717 A. N. Other
1712 User Name
1718 User Name
1713
1719
1714 $ hg log --template '{author|user}\n'
1720 $ hg log --template '{author|user}\n'
1715 test
1721 test
1716 user
1722 user
1717 person
1723 person
1718 person
1724 person
1719 person
1725 person
1720 person
1726 person
1721 other
1727 other
1722 other
1728 other
1723 user
1729 user
1724
1730
1725 $ hg log --template '{date|date}\n'
1731 $ hg log --template '{date|date}\n'
1726 Wed Jan 01 10:01:00 2020 +0000
1732 Wed Jan 01 10:01:00 2020 +0000
1727 Mon Jan 12 13:46:40 1970 +0000
1733 Mon Jan 12 13:46:40 1970 +0000
1728 Sun Jan 18 08:40:01 1970 +0000
1734 Sun Jan 18 08:40:01 1970 +0000
1729 Sun Jan 18 08:40:00 1970 +0000
1735 Sun Jan 18 08:40:00 1970 +0000
1730 Sat Jan 17 04:53:20 1970 +0000
1736 Sat Jan 17 04:53:20 1970 +0000
1731 Fri Jan 16 01:06:40 1970 +0000
1737 Fri Jan 16 01:06:40 1970 +0000
1732 Wed Jan 14 21:20:00 1970 +0000
1738 Wed Jan 14 21:20:00 1970 +0000
1733 Tue Jan 13 17:33:20 1970 +0000
1739 Tue Jan 13 17:33:20 1970 +0000
1734 Mon Jan 12 13:46:40 1970 +0000
1740 Mon Jan 12 13:46:40 1970 +0000
1735
1741
1736 $ hg log --template '{date|isodate}\n'
1742 $ hg log --template '{date|isodate}\n'
1737 2020-01-01 10:01 +0000
1743 2020-01-01 10:01 +0000
1738 1970-01-12 13:46 +0000
1744 1970-01-12 13:46 +0000
1739 1970-01-18 08:40 +0000
1745 1970-01-18 08:40 +0000
1740 1970-01-18 08:40 +0000
1746 1970-01-18 08:40 +0000
1741 1970-01-17 04:53 +0000
1747 1970-01-17 04:53 +0000
1742 1970-01-16 01:06 +0000
1748 1970-01-16 01:06 +0000
1743 1970-01-14 21:20 +0000
1749 1970-01-14 21:20 +0000
1744 1970-01-13 17:33 +0000
1750 1970-01-13 17:33 +0000
1745 1970-01-12 13:46 +0000
1751 1970-01-12 13:46 +0000
1746
1752
1747 $ hg log --template '{date|isodatesec}\n'
1753 $ hg log --template '{date|isodatesec}\n'
1748 2020-01-01 10:01:00 +0000
1754 2020-01-01 10:01:00 +0000
1749 1970-01-12 13:46:40 +0000
1755 1970-01-12 13:46:40 +0000
1750 1970-01-18 08:40:01 +0000
1756 1970-01-18 08:40:01 +0000
1751 1970-01-18 08:40:00 +0000
1757 1970-01-18 08:40:00 +0000
1752 1970-01-17 04:53:20 +0000
1758 1970-01-17 04:53:20 +0000
1753 1970-01-16 01:06:40 +0000
1759 1970-01-16 01:06:40 +0000
1754 1970-01-14 21:20:00 +0000
1760 1970-01-14 21:20:00 +0000
1755 1970-01-13 17:33:20 +0000
1761 1970-01-13 17:33:20 +0000
1756 1970-01-12 13:46:40 +0000
1762 1970-01-12 13:46:40 +0000
1757
1763
1758 $ hg log --template '{date|rfc822date}\n'
1764 $ hg log --template '{date|rfc822date}\n'
1759 Wed, 01 Jan 2020 10:01:00 +0000
1765 Wed, 01 Jan 2020 10:01:00 +0000
1760 Mon, 12 Jan 1970 13:46:40 +0000
1766 Mon, 12 Jan 1970 13:46:40 +0000
1761 Sun, 18 Jan 1970 08:40:01 +0000
1767 Sun, 18 Jan 1970 08:40:01 +0000
1762 Sun, 18 Jan 1970 08:40:00 +0000
1768 Sun, 18 Jan 1970 08:40:00 +0000
1763 Sat, 17 Jan 1970 04:53:20 +0000
1769 Sat, 17 Jan 1970 04:53:20 +0000
1764 Fri, 16 Jan 1970 01:06:40 +0000
1770 Fri, 16 Jan 1970 01:06:40 +0000
1765 Wed, 14 Jan 1970 21:20:00 +0000
1771 Wed, 14 Jan 1970 21:20:00 +0000
1766 Tue, 13 Jan 1970 17:33:20 +0000
1772 Tue, 13 Jan 1970 17:33:20 +0000
1767 Mon, 12 Jan 1970 13:46:40 +0000
1773 Mon, 12 Jan 1970 13:46:40 +0000
1768
1774
1769 $ hg log --template '{desc|firstline}\n'
1775 $ hg log --template '{desc|firstline}\n'
1770 third
1776 third
1771 second
1777 second
1772 merge
1778 merge
1773 new head
1779 new head
1774 new branch
1780 new branch
1775 no user, no domain
1781 no user, no domain
1776 no person
1782 no person
1777 other 1
1783 other 1
1778 line 1
1784 line 1
1779
1785
1780 $ hg log --template '{node|short}\n'
1786 $ hg log --template '{node|short}\n'
1781 95c24699272e
1787 95c24699272e
1782 29114dbae42b
1788 29114dbae42b
1783 d41e714fe50d
1789 d41e714fe50d
1784 13207e5a10d9
1790 13207e5a10d9
1785 bbe44766e73d
1791 bbe44766e73d
1786 10e46f2dcbf4
1792 10e46f2dcbf4
1787 97054abb4ab8
1793 97054abb4ab8
1788 b608e9d1a3f0
1794 b608e9d1a3f0
1789 1e4e1b8f71e0
1795 1e4e1b8f71e0
1790
1796
1791 $ hg log --template '<changeset author="{author|xmlescape}"/>\n'
1797 $ hg log --template '<changeset author="{author|xmlescape}"/>\n'
1792 <changeset author="test"/>
1798 <changeset author="test"/>
1793 <changeset author="User Name &lt;user@hostname&gt;"/>
1799 <changeset author="User Name &lt;user@hostname&gt;"/>
1794 <changeset author="person"/>
1800 <changeset author="person"/>
1795 <changeset author="person"/>
1801 <changeset author="person"/>
1796 <changeset author="person"/>
1802 <changeset author="person"/>
1797 <changeset author="person"/>
1803 <changeset author="person"/>
1798 <changeset author="other@place"/>
1804 <changeset author="other@place"/>
1799 <changeset author="A. N. Other &lt;other@place&gt;"/>
1805 <changeset author="A. N. Other &lt;other@place&gt;"/>
1800 <changeset author="User Name &lt;user@hostname&gt;"/>
1806 <changeset author="User Name &lt;user@hostname&gt;"/>
1801
1807
1802 $ hg log --template '{rev}: {children}\n'
1808 $ hg log --template '{rev}: {children}\n'
1803 8:
1809 8:
1804 7: 8:95c24699272e
1810 7: 8:95c24699272e
1805 6:
1811 6:
1806 5: 6:d41e714fe50d
1812 5: 6:d41e714fe50d
1807 4: 6:d41e714fe50d
1813 4: 6:d41e714fe50d
1808 3: 4:bbe44766e73d 5:13207e5a10d9
1814 3: 4:bbe44766e73d 5:13207e5a10d9
1809 2: 3:10e46f2dcbf4
1815 2: 3:10e46f2dcbf4
1810 1: 2:97054abb4ab8
1816 1: 2:97054abb4ab8
1811 0: 1:b608e9d1a3f0
1817 0: 1:b608e9d1a3f0
1812
1818
1813 Formatnode filter works:
1819 Formatnode filter works:
1814
1820
1815 $ hg -q log -r 0 --template '{node|formatnode}\n'
1821 $ hg -q log -r 0 --template '{node|formatnode}\n'
1816 1e4e1b8f71e0
1822 1e4e1b8f71e0
1817
1823
1818 $ hg log -r 0 --template '{node|formatnode}\n'
1824 $ hg log -r 0 --template '{node|formatnode}\n'
1819 1e4e1b8f71e0
1825 1e4e1b8f71e0
1820
1826
1821 $ hg -v log -r 0 --template '{node|formatnode}\n'
1827 $ hg -v log -r 0 --template '{node|formatnode}\n'
1822 1e4e1b8f71e0
1828 1e4e1b8f71e0
1823
1829
1824 $ hg --debug log -r 0 --template '{node|formatnode}\n'
1830 $ hg --debug log -r 0 --template '{node|formatnode}\n'
1825 1e4e1b8f71e05681d422154f5421e385fec3454f
1831 1e4e1b8f71e05681d422154f5421e385fec3454f
1826
1832
1827 Age filter:
1833 Age filter:
1828
1834
1829 $ hg log --template '{date|age}\n' > /dev/null || exit 1
1835 $ hg log --template '{date|age}\n' > /dev/null || exit 1
1830
1836
1831 >>> from datetime import datetime, timedelta
1837 >>> from datetime import datetime, timedelta
1832 >>> fp = open('a', 'w')
1838 >>> fp = open('a', 'w')
1833 >>> n = datetime.now() + timedelta(366 * 7)
1839 >>> n = datetime.now() + timedelta(366 * 7)
1834 >>> fp.write('%d-%d-%d 00:00' % (n.year, n.month, n.day))
1840 >>> fp.write('%d-%d-%d 00:00' % (n.year, n.month, n.day))
1835 >>> fp.close()
1841 >>> fp.close()
1836 $ hg add a
1842 $ hg add a
1837 $ hg commit -m future -d "`cat a`"
1843 $ hg commit -m future -d "`cat a`"
1838
1844
1839 $ hg log -l1 --template '{date|age}\n'
1845 $ hg log -l1 --template '{date|age}\n'
1840 7 years from now
1846 7 years from now
1841
1847
1842 Count filter:
1848 Count filter:
1843
1849
1844 $ hg log -l1 --template '{node|count} {node|short|count}\n'
1850 $ hg log -l1 --template '{node|count} {node|short|count}\n'
1845 40 12
1851 40 12
1846
1852
1847 $ hg log -l1 --template '{revset("null^")|count} {revset(".")|count} {revset("0::3")|count}\n'
1853 $ hg log -l1 --template '{revset("null^")|count} {revset(".")|count} {revset("0::3")|count}\n'
1848 0 1 4
1854 0 1 4
1849
1855
1850 $ hg log -G --template '{rev}: children: {children|count}, \
1856 $ hg log -G --template '{rev}: children: {children|count}, \
1851 > tags: {tags|count}, file_adds: {file_adds|count}, \
1857 > tags: {tags|count}, file_adds: {file_adds|count}, \
1852 > ancestors: {revset("ancestors(%s)", rev)|count}'
1858 > ancestors: {revset("ancestors(%s)", rev)|count}'
1853 @ 9: children: 0, tags: 1, file_adds: 1, ancestors: 3
1859 @ 9: children: 0, tags: 1, file_adds: 1, ancestors: 3
1854 |
1860 |
1855 o 8: children: 1, tags: 0, file_adds: 2, ancestors: 2
1861 o 8: children: 1, tags: 0, file_adds: 2, ancestors: 2
1856 |
1862 |
1857 o 7: children: 1, tags: 0, file_adds: 1, ancestors: 1
1863 o 7: children: 1, tags: 0, file_adds: 1, ancestors: 1
1858
1864
1859 o 6: children: 0, tags: 0, file_adds: 0, ancestors: 7
1865 o 6: children: 0, tags: 0, file_adds: 0, ancestors: 7
1860 |\
1866 |\
1861 | o 5: children: 1, tags: 0, file_adds: 1, ancestors: 5
1867 | o 5: children: 1, tags: 0, file_adds: 1, ancestors: 5
1862 | |
1868 | |
1863 o | 4: children: 1, tags: 0, file_adds: 0, ancestors: 5
1869 o | 4: children: 1, tags: 0, file_adds: 0, ancestors: 5
1864 |/
1870 |/
1865 o 3: children: 2, tags: 0, file_adds: 0, ancestors: 4
1871 o 3: children: 2, tags: 0, file_adds: 0, ancestors: 4
1866 |
1872 |
1867 o 2: children: 1, tags: 0, file_adds: 1, ancestors: 3
1873 o 2: children: 1, tags: 0, file_adds: 1, ancestors: 3
1868 |
1874 |
1869 o 1: children: 1, tags: 0, file_adds: 1, ancestors: 2
1875 o 1: children: 1, tags: 0, file_adds: 1, ancestors: 2
1870 |
1876 |
1871 o 0: children: 1, tags: 0, file_adds: 1, ancestors: 1
1877 o 0: children: 1, tags: 0, file_adds: 1, ancestors: 1
1872
1878
1873
1879
1874 Upper/lower filters:
1880 Upper/lower filters:
1875
1881
1876 $ hg log -r0 --template '{branch|upper}\n'
1882 $ hg log -r0 --template '{branch|upper}\n'
1877 DEFAULT
1883 DEFAULT
1878 $ hg log -r0 --template '{author|lower}\n'
1884 $ hg log -r0 --template '{author|lower}\n'
1879 user name <user@hostname>
1885 user name <user@hostname>
1880 $ hg log -r0 --template '{date|upper}\n'
1886 $ hg log -r0 --template '{date|upper}\n'
1881 abort: template filter 'upper' is not compatible with keyword 'date'
1887 abort: template filter 'upper' is not compatible with keyword 'date'
1882 [255]
1888 [255]
1883
1889
1884 Error on syntax:
1890 Error on syntax:
1885
1891
1886 $ echo 'x = "f' >> t
1892 $ echo 'x = "f' >> t
1887 $ hg log
1893 $ hg log
1888 abort: t:3: unmatched quotes
1894 abort: t:3: unmatched quotes
1889 [255]
1895 [255]
1890
1896
1891 Behind the scenes, this will throw TypeError
1897 Behind the scenes, this will throw TypeError
1892
1898
1893 $ hg log -l 3 --template '{date|obfuscate}\n'
1899 $ hg log -l 3 --template '{date|obfuscate}\n'
1894 abort: template filter 'obfuscate' is not compatible with keyword 'date'
1900 abort: template filter 'obfuscate' is not compatible with keyword 'date'
1895 [255]
1901 [255]
1896
1902
1897 Behind the scenes, this will throw a ValueError
1903 Behind the scenes, this will throw a ValueError
1898
1904
1899 $ hg log -l 3 --template 'line: {desc|shortdate}\n'
1905 $ hg log -l 3 --template 'line: {desc|shortdate}\n'
1900 abort: template filter 'shortdate' is not compatible with keyword 'desc'
1906 abort: template filter 'shortdate' is not compatible with keyword 'desc'
1901 [255]
1907 [255]
1902
1908
1903 Behind the scenes, this will throw AttributeError
1909 Behind the scenes, this will throw AttributeError
1904
1910
1905 $ hg log -l 3 --template 'line: {date|escape}\n'
1911 $ hg log -l 3 --template 'line: {date|escape}\n'
1906 abort: template filter 'escape' is not compatible with keyword 'date'
1912 abort: template filter 'escape' is not compatible with keyword 'date'
1907 [255]
1913 [255]
1908
1914
1909 Behind the scenes, this will throw ValueError
1915 Behind the scenes, this will throw ValueError
1910
1916
1911 $ hg tip --template '{author|email|date}\n'
1917 $ hg tip --template '{author|email|date}\n'
1912 abort: template filter 'datefilter' is not compatible with keyword 'author'
1918 abort: template filter 'datefilter' is not compatible with keyword 'author'
1913 [255]
1919 [255]
1914
1920
1915 Thrown an error if a template function doesn't exist
1921 Thrown an error if a template function doesn't exist
1916
1922
1917 $ hg tip --template '{foo()}\n'
1923 $ hg tip --template '{foo()}\n'
1918 hg: parse error: unknown function 'foo'
1924 hg: parse error: unknown function 'foo'
1919 [255]
1925 [255]
1920
1926
1921 Pass generator object created by template function to filter
1927 Pass generator object created by template function to filter
1922
1928
1923 $ hg log -l 1 --template '{if(author, author)|user}\n'
1929 $ hg log -l 1 --template '{if(author, author)|user}\n'
1924 test
1930 test
1925
1931
1926 Test diff function:
1932 Test diff function:
1927
1933
1928 $ hg diff -c 8
1934 $ hg diff -c 8
1929 diff -r 29114dbae42b -r 95c24699272e fourth
1935 diff -r 29114dbae42b -r 95c24699272e fourth
1930 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1936 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1931 +++ b/fourth Wed Jan 01 10:01:00 2020 +0000
1937 +++ b/fourth Wed Jan 01 10:01:00 2020 +0000
1932 @@ -0,0 +1,1 @@
1938 @@ -0,0 +1,1 @@
1933 +second
1939 +second
1934 diff -r 29114dbae42b -r 95c24699272e second
1940 diff -r 29114dbae42b -r 95c24699272e second
1935 --- a/second Mon Jan 12 13:46:40 1970 +0000
1941 --- a/second Mon Jan 12 13:46:40 1970 +0000
1936 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
1942 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
1937 @@ -1,1 +0,0 @@
1943 @@ -1,1 +0,0 @@
1938 -second
1944 -second
1939 diff -r 29114dbae42b -r 95c24699272e third
1945 diff -r 29114dbae42b -r 95c24699272e third
1940 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1946 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1941 +++ b/third Wed Jan 01 10:01:00 2020 +0000
1947 +++ b/third Wed Jan 01 10:01:00 2020 +0000
1942 @@ -0,0 +1,1 @@
1948 @@ -0,0 +1,1 @@
1943 +third
1949 +third
1944
1950
1945 $ hg log -r 8 -T "{diff()}"
1951 $ hg log -r 8 -T "{diff()}"
1946 diff -r 29114dbae42b -r 95c24699272e fourth
1952 diff -r 29114dbae42b -r 95c24699272e fourth
1947 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1953 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1948 +++ b/fourth Wed Jan 01 10:01:00 2020 +0000
1954 +++ b/fourth Wed Jan 01 10:01:00 2020 +0000
1949 @@ -0,0 +1,1 @@
1955 @@ -0,0 +1,1 @@
1950 +second
1956 +second
1951 diff -r 29114dbae42b -r 95c24699272e second
1957 diff -r 29114dbae42b -r 95c24699272e second
1952 --- a/second Mon Jan 12 13:46:40 1970 +0000
1958 --- a/second Mon Jan 12 13:46:40 1970 +0000
1953 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
1959 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
1954 @@ -1,1 +0,0 @@
1960 @@ -1,1 +0,0 @@
1955 -second
1961 -second
1956 diff -r 29114dbae42b -r 95c24699272e third
1962 diff -r 29114dbae42b -r 95c24699272e third
1957 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1963 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1958 +++ b/third Wed Jan 01 10:01:00 2020 +0000
1964 +++ b/third Wed Jan 01 10:01:00 2020 +0000
1959 @@ -0,0 +1,1 @@
1965 @@ -0,0 +1,1 @@
1960 +third
1966 +third
1961
1967
1962 $ hg log -r 8 -T "{diff('glob:f*')}"
1968 $ hg log -r 8 -T "{diff('glob:f*')}"
1963 diff -r 29114dbae42b -r 95c24699272e fourth
1969 diff -r 29114dbae42b -r 95c24699272e fourth
1964 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1970 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1965 +++ b/fourth Wed Jan 01 10:01:00 2020 +0000
1971 +++ b/fourth Wed Jan 01 10:01:00 2020 +0000
1966 @@ -0,0 +1,1 @@
1972 @@ -0,0 +1,1 @@
1967 +second
1973 +second
1968
1974
1969 $ hg log -r 8 -T "{diff('', 'glob:f*')}"
1975 $ hg log -r 8 -T "{diff('', 'glob:f*')}"
1970 diff -r 29114dbae42b -r 95c24699272e second
1976 diff -r 29114dbae42b -r 95c24699272e second
1971 --- a/second Mon Jan 12 13:46:40 1970 +0000
1977 --- a/second Mon Jan 12 13:46:40 1970 +0000
1972 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
1978 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
1973 @@ -1,1 +0,0 @@
1979 @@ -1,1 +0,0 @@
1974 -second
1980 -second
1975 diff -r 29114dbae42b -r 95c24699272e third
1981 diff -r 29114dbae42b -r 95c24699272e third
1976 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1982 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1977 +++ b/third Wed Jan 01 10:01:00 2020 +0000
1983 +++ b/third Wed Jan 01 10:01:00 2020 +0000
1978 @@ -0,0 +1,1 @@
1984 @@ -0,0 +1,1 @@
1979 +third
1985 +third
1980
1986
1981 $ cd ..
1987 $ cd ..
1982
1988
1983
1989
1984 latesttag:
1990 latesttag:
1985
1991
1986 $ hg init latesttag
1992 $ hg init latesttag
1987 $ cd latesttag
1993 $ cd latesttag
1988
1994
1989 $ echo a > file
1995 $ echo a > file
1990 $ hg ci -Am a -d '0 0'
1996 $ hg ci -Am a -d '0 0'
1991 adding file
1997 adding file
1992
1998
1993 $ echo b >> file
1999 $ echo b >> file
1994 $ hg ci -m b -d '1 0'
2000 $ hg ci -m b -d '1 0'
1995
2001
1996 $ echo c >> head1
2002 $ echo c >> head1
1997 $ hg ci -Am h1c -d '2 0'
2003 $ hg ci -Am h1c -d '2 0'
1998 adding head1
2004 adding head1
1999
2005
2000 $ hg update -q 1
2006 $ hg update -q 1
2001 $ echo d >> head2
2007 $ echo d >> head2
2002 $ hg ci -Am h2d -d '3 0'
2008 $ hg ci -Am h2d -d '3 0'
2003 adding head2
2009 adding head2
2004 created new head
2010 created new head
2005
2011
2006 $ echo e >> head2
2012 $ echo e >> head2
2007 $ hg ci -m h2e -d '4 0'
2013 $ hg ci -m h2e -d '4 0'
2008
2014
2009 $ hg merge -q
2015 $ hg merge -q
2010 $ hg ci -m merge -d '5 -3600'
2016 $ hg ci -m merge -d '5 -3600'
2011
2017
2012 No tag set:
2018 No tag set:
2013
2019
2014 $ hg log --template '{rev}: {latesttag}+{latesttagdistance}\n'
2020 $ hg log --template '{rev}: {latesttag}+{latesttagdistance}\n'
2015 5: null+5
2021 5: null+5
2016 4: null+4
2022 4: null+4
2017 3: null+3
2023 3: null+3
2018 2: null+3
2024 2: null+3
2019 1: null+2
2025 1: null+2
2020 0: null+1
2026 0: null+1
2021
2027
2022 One common tag: longest path wins:
2028 One common tag: longest path wins:
2023
2029
2024 $ hg tag -r 1 -m t1 -d '6 0' t1
2030 $ hg tag -r 1 -m t1 -d '6 0' t1
2025 $ hg log --template '{rev}: {latesttag}+{latesttagdistance}\n'
2031 $ hg log --template '{rev}: {latesttag}+{latesttagdistance}\n'
2026 6: t1+4
2032 6: t1+4
2027 5: t1+3
2033 5: t1+3
2028 4: t1+2
2034 4: t1+2
2029 3: t1+1
2035 3: t1+1
2030 2: t1+1
2036 2: t1+1
2031 1: t1+0
2037 1: t1+0
2032 0: null+1
2038 0: null+1
2033
2039
2034 One ancestor tag: more recent wins:
2040 One ancestor tag: more recent wins:
2035
2041
2036 $ hg tag -r 2 -m t2 -d '7 0' t2
2042 $ hg tag -r 2 -m t2 -d '7 0' t2
2037 $ hg log --template '{rev}: {latesttag}+{latesttagdistance}\n'
2043 $ hg log --template '{rev}: {latesttag}+{latesttagdistance}\n'
2038 7: t2+3
2044 7: t2+3
2039 6: t2+2
2045 6: t2+2
2040 5: t2+1
2046 5: t2+1
2041 4: t1+2
2047 4: t1+2
2042 3: t1+1
2048 3: t1+1
2043 2: t2+0
2049 2: t2+0
2044 1: t1+0
2050 1: t1+0
2045 0: null+1
2051 0: null+1
2046
2052
2047 Two branch tags: more recent wins:
2053 Two branch tags: more recent wins:
2048
2054
2049 $ hg tag -r 3 -m t3 -d '8 0' t3
2055 $ hg tag -r 3 -m t3 -d '8 0' t3
2050 $ hg log --template '{rev}: {latesttag}+{latesttagdistance}\n'
2056 $ hg log --template '{rev}: {latesttag}+{latesttagdistance}\n'
2051 8: t3+5
2057 8: t3+5
2052 7: t3+4
2058 7: t3+4
2053 6: t3+3
2059 6: t3+3
2054 5: t3+2
2060 5: t3+2
2055 4: t3+1
2061 4: t3+1
2056 3: t3+0
2062 3: t3+0
2057 2: t2+0
2063 2: t2+0
2058 1: t1+0
2064 1: t1+0
2059 0: null+1
2065 0: null+1
2060
2066
2061 Merged tag overrides:
2067 Merged tag overrides:
2062
2068
2063 $ hg tag -r 5 -m t5 -d '9 0' t5
2069 $ hg tag -r 5 -m t5 -d '9 0' t5
2064 $ hg tag -r 3 -m at3 -d '10 0' at3
2070 $ hg tag -r 3 -m at3 -d '10 0' at3
2065 $ hg log --template '{rev}: {latesttag}+{latesttagdistance}\n'
2071 $ hg log --template '{rev}: {latesttag}+{latesttagdistance}\n'
2066 10: t5+5
2072 10: t5+5
2067 9: t5+4
2073 9: t5+4
2068 8: t5+3
2074 8: t5+3
2069 7: t5+2
2075 7: t5+2
2070 6: t5+1
2076 6: t5+1
2071 5: t5+0
2077 5: t5+0
2072 4: at3:t3+1
2078 4: at3:t3+1
2073 3: at3:t3+0
2079 3: at3:t3+0
2074 2: t2+0
2080 2: t2+0
2075 1: t1+0
2081 1: t1+0
2076 0: null+1
2082 0: null+1
2077
2083
2078 $ cd ..
2084 $ cd ..
2079
2085
2080
2086
2081 Style path expansion: issue1948 - ui.style option doesn't work on OSX
2087 Style path expansion: issue1948 - ui.style option doesn't work on OSX
2082 if it is a relative path
2088 if it is a relative path
2083
2089
2084 $ mkdir -p home/styles
2090 $ mkdir -p home/styles
2085
2091
2086 $ cat > home/styles/teststyle <<EOF
2092 $ cat > home/styles/teststyle <<EOF
2087 > changeset = 'test {rev}:{node|short}\n'
2093 > changeset = 'test {rev}:{node|short}\n'
2088 > EOF
2094 > EOF
2089
2095
2090 $ HOME=`pwd`/home; export HOME
2096 $ HOME=`pwd`/home; export HOME
2091
2097
2092 $ cat > latesttag/.hg/hgrc <<EOF
2098 $ cat > latesttag/.hg/hgrc <<EOF
2093 > [ui]
2099 > [ui]
2094 > style = ~/styles/teststyle
2100 > style = ~/styles/teststyle
2095 > EOF
2101 > EOF
2096
2102
2097 $ hg -R latesttag tip
2103 $ hg -R latesttag tip
2098 test 10:9b4a630e5f5f
2104 test 10:9b4a630e5f5f
2099
2105
2100 Test recursive showlist template (issue1989):
2106 Test recursive showlist template (issue1989):
2101
2107
2102 $ cat > style1989 <<EOF
2108 $ cat > style1989 <<EOF
2103 > changeset = '{file_mods}{manifest}{extras}'
2109 > changeset = '{file_mods}{manifest}{extras}'
2104 > file_mod = 'M|{author|person}\n'
2110 > file_mod = 'M|{author|person}\n'
2105 > manifest = '{rev},{author}\n'
2111 > manifest = '{rev},{author}\n'
2106 > extra = '{key}: {author}\n'
2112 > extra = '{key}: {author}\n'
2107 > EOF
2113 > EOF
2108
2114
2109 $ hg -R latesttag log -r tip --style=style1989
2115 $ hg -R latesttag log -r tip --style=style1989
2110 M|test
2116 M|test
2111 10,test
2117 10,test
2112 branch: test
2118 branch: test
2113
2119
2114 Test new-style inline templating:
2120 Test new-style inline templating:
2115
2121
2116 $ hg log -R latesttag -r tip --template 'modified files: {file_mods % " {file}\n"}\n'
2122 $ hg log -R latesttag -r tip --template 'modified files: {file_mods % " {file}\n"}\n'
2117 modified files: .hgtags
2123 modified files: .hgtags
2118
2124
2119 Test the sub function of templating for expansion:
2125 Test the sub function of templating for expansion:
2120
2126
2121 $ hg log -R latesttag -r 10 --template '{sub("[0-9]", "x", "{rev}")}\n'
2127 $ hg log -R latesttag -r 10 --template '{sub("[0-9]", "x", "{rev}")}\n'
2122 xx
2128 xx
2123
2129
2124 Test the strip function with chars specified:
2130 Test the strip function with chars specified:
2125
2131
2126 $ hg log -R latesttag --template '{desc}\n'
2132 $ hg log -R latesttag --template '{desc}\n'
2127 at3
2133 at3
2128 t5
2134 t5
2129 t3
2135 t3
2130 t2
2136 t2
2131 t1
2137 t1
2132 merge
2138 merge
2133 h2e
2139 h2e
2134 h2d
2140 h2d
2135 h1c
2141 h1c
2136 b
2142 b
2137 a
2143 a
2138
2144
2139 $ hg log -R latesttag --template '{strip(desc, "te")}\n'
2145 $ hg log -R latesttag --template '{strip(desc, "te")}\n'
2140 at3
2146 at3
2141 5
2147 5
2142 3
2148 3
2143 2
2149 2
2144 1
2150 1
2145 merg
2151 merg
2146 h2
2152 h2
2147 h2d
2153 h2d
2148 h1c
2154 h1c
2149 b
2155 b
2150 a
2156 a
2151
2157
2152 Test date format:
2158 Test date format:
2153
2159
2154 $ hg log -R latesttag --template 'date: {date(date, "%y %m %d %S %z")}\n'
2160 $ hg log -R latesttag --template 'date: {date(date, "%y %m %d %S %z")}\n'
2155 date: 70 01 01 10 +0000
2161 date: 70 01 01 10 +0000
2156 date: 70 01 01 09 +0000
2162 date: 70 01 01 09 +0000
2157 date: 70 01 01 08 +0000
2163 date: 70 01 01 08 +0000
2158 date: 70 01 01 07 +0000
2164 date: 70 01 01 07 +0000
2159 date: 70 01 01 06 +0000
2165 date: 70 01 01 06 +0000
2160 date: 70 01 01 05 +0100
2166 date: 70 01 01 05 +0100
2161 date: 70 01 01 04 +0000
2167 date: 70 01 01 04 +0000
2162 date: 70 01 01 03 +0000
2168 date: 70 01 01 03 +0000
2163 date: 70 01 01 02 +0000
2169 date: 70 01 01 02 +0000
2164 date: 70 01 01 01 +0000
2170 date: 70 01 01 01 +0000
2165 date: 70 01 01 00 +0000
2171 date: 70 01 01 00 +0000
2166
2172
2167 Test string escaping:
2173 Test string escaping:
2168
2174
2169 $ hg log -R latesttag -r 0 --template '>\n<>\\n<{if(rev, "[>\n<>\\n<]")}>\n<>\\n<\n'
2175 $ hg log -R latesttag -r 0 --template '>\n<>\\n<{if(rev, "[>\n<>\\n<]")}>\n<>\\n<\n'
2170 >
2176 >
2171 <>\n<[>
2177 <>\n<[>
2172 <>\n<]>
2178 <>\n<]>
2173 <>\n<
2179 <>\n<
2174
2180
2175 "string-escape"-ed "\x5c\x786e" becomes r"\x6e" (once) or r"n" (twice)
2181 "string-escape"-ed "\x5c\x786e" becomes r"\x6e" (once) or r"n" (twice)
2176
2182
2177 $ hg log -R a -r 0 --template '{if("1", "\x5c\x786e", "NG")}\n'
2183 $ hg log -R a -r 0 --template '{if("1", "\x5c\x786e", "NG")}\n'
2178 \x6e
2184 \x6e
2179 $ hg log -R a -r 0 --template '{if("1", r"\x5c\x786e", "NG")}\n'
2185 $ hg log -R a -r 0 --template '{if("1", r"\x5c\x786e", "NG")}\n'
2180 \x5c\x786e
2186 \x5c\x786e
2181 $ hg log -R a -r 0 --template '{if("", "NG", "\x5c\x786e")}\n'
2187 $ hg log -R a -r 0 --template '{if("", "NG", "\x5c\x786e")}\n'
2182 \x6e
2188 \x6e
2183 $ hg log -R a -r 0 --template '{if("", "NG", r"\x5c\x786e")}\n'
2189 $ hg log -R a -r 0 --template '{if("", "NG", r"\x5c\x786e")}\n'
2184 \x5c\x786e
2190 \x5c\x786e
2185
2191
2186 $ hg log -R a -r 2 --template '{ifeq("no perso\x6e", desc, "\x5c\x786e", "NG")}\n'
2192 $ hg log -R a -r 2 --template '{ifeq("no perso\x6e", desc, "\x5c\x786e", "NG")}\n'
2187 \x6e
2193 \x6e
2188 $ hg log -R a -r 2 --template '{ifeq(r"no perso\x6e", desc, "NG", r"\x5c\x786e")}\n'
2194 $ hg log -R a -r 2 --template '{ifeq(r"no perso\x6e", desc, "NG", r"\x5c\x786e")}\n'
2189 \x5c\x786e
2195 \x5c\x786e
2190 $ hg log -R a -r 2 --template '{ifeq(desc, "no perso\x6e", "\x5c\x786e", "NG")}\n'
2196 $ hg log -R a -r 2 --template '{ifeq(desc, "no perso\x6e", "\x5c\x786e", "NG")}\n'
2191 \x6e
2197 \x6e
2192 $ hg log -R a -r 2 --template '{ifeq(desc, r"no perso\x6e", "NG", r"\x5c\x786e")}\n'
2198 $ hg log -R a -r 2 --template '{ifeq(desc, r"no perso\x6e", "NG", r"\x5c\x786e")}\n'
2193 \x5c\x786e
2199 \x5c\x786e
2194
2200
2195 $ hg log -R a -r 8 --template '{join(files, "\n")}\n'
2201 $ hg log -R a -r 8 --template '{join(files, "\n")}\n'
2196 fourth
2202 fourth
2197 second
2203 second
2198 third
2204 third
2199 $ hg log -R a -r 8 --template '{join(files, r"\n")}\n'
2205 $ hg log -R a -r 8 --template '{join(files, r"\n")}\n'
2200 fourth\nsecond\nthird
2206 fourth\nsecond\nthird
2201
2207
2202 $ hg log -R a -r 2 --template '{rstdoc("1st\n\n2nd", "htm\x6c")}'
2208 $ hg log -R a -r 2 --template '{rstdoc("1st\n\n2nd", "htm\x6c")}'
2203 <p>
2209 <p>
2204 1st
2210 1st
2205 </p>
2211 </p>
2206 <p>
2212 <p>
2207 2nd
2213 2nd
2208 </p>
2214 </p>
2209 $ hg log -R a -r 2 --template '{rstdoc(r"1st\n\n2nd", "html")}'
2215 $ hg log -R a -r 2 --template '{rstdoc(r"1st\n\n2nd", "html")}'
2210 <p>
2216 <p>
2211 1st\n\n2nd
2217 1st\n\n2nd
2212 </p>
2218 </p>
2213 $ hg log -R a -r 2 --template '{rstdoc("1st\n\n2nd", r"htm\x6c")}'
2219 $ hg log -R a -r 2 --template '{rstdoc("1st\n\n2nd", r"htm\x6c")}'
2214 1st
2220 1st
2215
2221
2216 2nd
2222 2nd
2217
2223
2218 $ hg log -R a -r 2 --template '{strip(desc, "\x6e")}\n'
2224 $ hg log -R a -r 2 --template '{strip(desc, "\x6e")}\n'
2219 o perso
2225 o perso
2220 $ hg log -R a -r 2 --template '{strip(desc, r"\x6e")}\n'
2226 $ hg log -R a -r 2 --template '{strip(desc, r"\x6e")}\n'
2221 no person
2227 no person
2222 $ hg log -R a -r 2 --template '{strip("no perso\x6e", "\x6e")}\n'
2228 $ hg log -R a -r 2 --template '{strip("no perso\x6e", "\x6e")}\n'
2223 o perso
2229 o perso
2224 $ hg log -R a -r 2 --template '{strip(r"no perso\x6e", r"\x6e")}\n'
2230 $ hg log -R a -r 2 --template '{strip(r"no perso\x6e", r"\x6e")}\n'
2225 no perso
2231 no perso
2226
2232
2227 $ hg log -R a -r 2 --template '{sub("\\x6e", "\x2d", desc)}\n'
2233 $ hg log -R a -r 2 --template '{sub("\\x6e", "\x2d", desc)}\n'
2228 -o perso-
2234 -o perso-
2229 $ hg log -R a -r 2 --template '{sub(r"\\x6e", "-", desc)}\n'
2235 $ hg log -R a -r 2 --template '{sub(r"\\x6e", "-", desc)}\n'
2230 no person
2236 no person
2231 $ hg log -R a -r 2 --template '{sub("n", r"\x2d", desc)}\n'
2237 $ hg log -R a -r 2 --template '{sub("n", r"\x2d", desc)}\n'
2232 \x2do perso\x2d
2238 \x2do perso\x2d
2233 $ hg log -R a -r 2 --template '{sub("n", "\x2d", "no perso\x6e")}\n'
2239 $ hg log -R a -r 2 --template '{sub("n", "\x2d", "no perso\x6e")}\n'
2234 -o perso-
2240 -o perso-
2235 $ hg log -R a -r 2 --template '{sub("n", r"\x2d", r"no perso\x6e")}\n'
2241 $ hg log -R a -r 2 --template '{sub("n", r"\x2d", r"no perso\x6e")}\n'
2236 \x2do perso\x6e
2242 \x2do perso\x6e
2237
2243
2238 $ hg log -R a -r 8 --template '{files % "{file}\n"}'
2244 $ hg log -R a -r 8 --template '{files % "{file}\n"}'
2239 fourth
2245 fourth
2240 second
2246 second
2241 third
2247 third
2242 $ hg log -R a -r 8 --template '{files % r"{file}\n"}\n'
2248 $ hg log -R a -r 8 --template '{files % r"{file}\n"}\n'
2243 fourth\nsecond\nthird\n
2249 fourth\nsecond\nthird\n
2244
2250
2245 Test string escaping in nested expression:
2251 Test string escaping in nested expression:
2246
2252
2247 $ hg log -R a -r 8 --template '{ifeq(r"\x6e", if("1", "\x5c\x786e"), join(files, "\x5c\x786e"))}\n'
2253 $ hg log -R a -r 8 --template '{ifeq(r"\x6e", if("1", "\x5c\x786e"), join(files, "\x5c\x786e"))}\n'
2248 fourth\x6esecond\x6ethird
2254 fourth\x6esecond\x6ethird
2249 $ hg log -R a -r 8 --template '{ifeq(if("1", r"\x6e"), "\x5c\x786e", join(files, "\x5c\x786e"))}\n'
2255 $ hg log -R a -r 8 --template '{ifeq(if("1", r"\x6e"), "\x5c\x786e", join(files, "\x5c\x786e"))}\n'
2250 fourth\x6esecond\x6ethird
2256 fourth\x6esecond\x6ethird
2251
2257
2252 $ hg log -R a -r 8 --template '{join(files, ifeq(branch, "default", "\x5c\x786e"))}\n'
2258 $ hg log -R a -r 8 --template '{join(files, ifeq(branch, "default", "\x5c\x786e"))}\n'
2253 fourth\x6esecond\x6ethird
2259 fourth\x6esecond\x6ethird
2254 $ hg log -R a -r 8 --template '{join(files, ifeq(branch, "default", r"\x5c\x786e"))}\n'
2260 $ hg log -R a -r 8 --template '{join(files, ifeq(branch, "default", r"\x5c\x786e"))}\n'
2255 fourth\x5c\x786esecond\x5c\x786ethird
2261 fourth\x5c\x786esecond\x5c\x786ethird
2256
2262
2257 $ hg log -R a -r 3:4 --template '{rev}:{sub(if("1", "\x6e"), ifeq(branch, "foo", r"\x5c\x786e", "\x5c\x786e"), desc)}\n'
2263 $ hg log -R a -r 3:4 --template '{rev}:{sub(if("1", "\x6e"), ifeq(branch, "foo", r"\x5c\x786e", "\x5c\x786e"), desc)}\n'
2258 3:\x6eo user, \x6eo domai\x6e
2264 3:\x6eo user, \x6eo domai\x6e
2259 4:\x5c\x786eew bra\x5c\x786ech
2265 4:\x5c\x786eew bra\x5c\x786ech
2260
2266
2261 Test recursive evaluation:
2267 Test recursive evaluation:
2262
2268
2263 $ hg init r
2269 $ hg init r
2264 $ cd r
2270 $ cd r
2265 $ echo a > a
2271 $ echo a > a
2266 $ hg ci -Am '{rev}'
2272 $ hg ci -Am '{rev}'
2267 adding a
2273 adding a
2268 $ hg log -r 0 --template '{if(rev, desc)}\n'
2274 $ hg log -r 0 --template '{if(rev, desc)}\n'
2269 {rev}
2275 {rev}
2270 $ hg log -r 0 --template '{if(rev, "{author} {rev}")}\n'
2276 $ hg log -r 0 --template '{if(rev, "{author} {rev}")}\n'
2271 test 0
2277 test 0
2272
2278
2273 $ hg branch -q 'text.{rev}'
2279 $ hg branch -q 'text.{rev}'
2274 $ echo aa >> aa
2280 $ echo aa >> aa
2275 $ hg ci -u '{node|short}' -m 'desc to be wrapped desc to be wrapped'
2281 $ hg ci -u '{node|short}' -m 'desc to be wrapped desc to be wrapped'
2276
2282
2277 $ hg log -l1 --template '{fill(desc, "20", author, branch)}'
2283 $ hg log -l1 --template '{fill(desc, "20", author, branch)}'
2278 {node|short}desc to
2284 {node|short}desc to
2279 text.{rev}be wrapped
2285 text.{rev}be wrapped
2280 text.{rev}desc to be
2286 text.{rev}desc to be
2281 text.{rev}wrapped (no-eol)
2287 text.{rev}wrapped (no-eol)
2282 $ hg log -l1 --template '{fill(desc, "20", "{node|short}:", "text.{rev}:")}'
2288 $ hg log -l1 --template '{fill(desc, "20", "{node|short}:", "text.{rev}:")}'
2283 bcc7ff960b8e:desc to
2289 bcc7ff960b8e:desc to
2284 text.1:be wrapped
2290 text.1:be wrapped
2285 text.1:desc to be
2291 text.1:desc to be
2286 text.1:wrapped (no-eol)
2292 text.1:wrapped (no-eol)
2287
2293
2288 $ hg log -l 1 --template '{sub(r"[0-9]", "-", author)}'
2294 $ hg log -l 1 --template '{sub(r"[0-9]", "-", author)}'
2289 {node|short} (no-eol)
2295 {node|short} (no-eol)
2290 $ hg log -l 1 --template '{sub(r"[0-9]", "-", "{node|short}")}'
2296 $ hg log -l 1 --template '{sub(r"[0-9]", "-", "{node|short}")}'
2291 bcc-ff---b-e (no-eol)
2297 bcc-ff---b-e (no-eol)
2292
2298
2293 $ cat >> .hg/hgrc <<EOF
2299 $ cat >> .hg/hgrc <<EOF
2294 > [extensions]
2300 > [extensions]
2295 > color=
2301 > color=
2296 > [color]
2302 > [color]
2297 > mode=ansi
2303 > mode=ansi
2298 > text.{rev} = red
2304 > text.{rev} = red
2299 > text.1 = green
2305 > text.1 = green
2300 > EOF
2306 > EOF
2301 $ hg log --color=always -l 1 --template '{label(branch, "text\n")}'
2307 $ hg log --color=always -l 1 --template '{label(branch, "text\n")}'
2302 \x1b[0;31mtext\x1b[0m (esc)
2308 \x1b[0;31mtext\x1b[0m (esc)
2303 $ hg log --color=always -l 1 --template '{label("text.{rev}", "text\n")}'
2309 $ hg log --color=always -l 1 --template '{label("text.{rev}", "text\n")}'
2304 \x1b[0;32mtext\x1b[0m (esc)
2310 \x1b[0;32mtext\x1b[0m (esc)
2305
2311
2306 Test branches inside if statement:
2312 Test branches inside if statement:
2307
2313
2308 $ hg log -r 0 --template '{if(branches, "yes", "no")}\n'
2314 $ hg log -r 0 --template '{if(branches, "yes", "no")}\n'
2309 no
2315 no
2310
2316
2311 Test get function:
2317 Test get function:
2312
2318
2313 $ hg log -r 0 --template '{get(extras, "branch")}\n'
2319 $ hg log -r 0 --template '{get(extras, "branch")}\n'
2314 default
2320 default
2315 $ hg log -r 0 --template '{get(files, "should_fail")}\n'
2321 $ hg log -r 0 --template '{get(files, "should_fail")}\n'
2316 hg: parse error: get() expects a dict as first argument
2322 hg: parse error: get() expects a dict as first argument
2317 [255]
2323 [255]
2318
2324
2319 Test shortest(node) function:
2325 Test shortest(node) function:
2320
2326
2321 $ echo b > b
2327 $ echo b > b
2322 $ hg ci -qAm b
2328 $ hg ci -qAm b
2323 $ hg log --template '{shortest(node)}\n'
2329 $ hg log --template '{shortest(node)}\n'
2324 e777
2330 e777
2325 bcc7
2331 bcc7
2326 f776
2332 f776
2327 $ hg log --template '{shortest(node, 10)}\n'
2333 $ hg log --template '{shortest(node, 10)}\n'
2328 e777603221
2334 e777603221
2329 bcc7ff960b
2335 bcc7ff960b
2330 f7769ec2ab
2336 f7769ec2ab
2331
2337
2332 Test pad function
2338 Test pad function
2333
2339
2334 $ hg log --template '{pad(rev, 20)} {author|user}\n'
2340 $ hg log --template '{pad(rev, 20)} {author|user}\n'
2335 2 test
2341 2 test
2336 1 {node|short}
2342 1 {node|short}
2337 0 test
2343 0 test
2338
2344
2339 $ hg log --template '{pad(rev, 20, " ", True)} {author|user}\n'
2345 $ hg log --template '{pad(rev, 20, " ", True)} {author|user}\n'
2340 2 test
2346 2 test
2341 1 {node|short}
2347 1 {node|short}
2342 0 test
2348 0 test
2343
2349
2344 $ hg log --template '{pad(rev, 20, "-", False)} {author|user}\n'
2350 $ hg log --template '{pad(rev, 20, "-", False)} {author|user}\n'
2345 2------------------- test
2351 2------------------- test
2346 1------------------- {node|short}
2352 1------------------- {node|short}
2347 0------------------- test
2353 0------------------- test
2348
2354
2349 Test ifcontains function
2355 Test ifcontains function
2350
2356
2351 $ hg log --template '{rev} {ifcontains(rev, "2 two 0", "is in the string", "is not")}\n'
2357 $ hg log --template '{rev} {ifcontains(rev, "2 two 0", "is in the string", "is not")}\n'
2352 2 is in the string
2358 2 is in the string
2353 1 is not
2359 1 is not
2354 0 is in the string
2360 0 is in the string
2355
2361
2356 $ hg log --template '{rev} {ifcontains("a", file_adds, "added a", "did not add a")}\n'
2362 $ hg log --template '{rev} {ifcontains("a", file_adds, "added a", "did not add a")}\n'
2357 2 did not add a
2363 2 did not add a
2358 1 did not add a
2364 1 did not add a
2359 0 added a
2365 0 added a
2360
2366
2361 Test revset function
2367 Test revset function
2362
2368
2363 $ hg log --template '{rev} {ifcontains(rev, revset("."), "current rev", "not current rev")}\n'
2369 $ hg log --template '{rev} {ifcontains(rev, revset("."), "current rev", "not current rev")}\n'
2364 2 current rev
2370 2 current rev
2365 1 not current rev
2371 1 not current rev
2366 0 not current rev
2372 0 not current rev
2367
2373
2368 $ hg log --template '{rev} {ifcontains(rev, revset(". + .^"), "match rev", "not match rev")}\n'
2374 $ hg log --template '{rev} {ifcontains(rev, revset(". + .^"), "match rev", "not match rev")}\n'
2369 2 match rev
2375 2 match rev
2370 1 match rev
2376 1 match rev
2371 0 not match rev
2377 0 not match rev
2372
2378
2373 $ hg log --template '{rev} Parents: {revset("parents(%s)", rev)}\n'
2379 $ hg log --template '{rev} Parents: {revset("parents(%s)", rev)}\n'
2374 2 Parents: 1
2380 2 Parents: 1
2375 1 Parents: 0
2381 1 Parents: 0
2376 0 Parents:
2382 0 Parents:
2377
2383
2378 $ cat >> .hg/hgrc <<EOF
2384 $ cat >> .hg/hgrc <<EOF
2379 > [revsetalias]
2385 > [revsetalias]
2380 > myparents(\$1) = parents(\$1)
2386 > myparents(\$1) = parents(\$1)
2381 > EOF
2387 > EOF
2382 $ hg log --template '{rev} Parents: {revset("myparents(%s)", rev)}\n'
2388 $ hg log --template '{rev} Parents: {revset("myparents(%s)", rev)}\n'
2383 2 Parents: 1
2389 2 Parents: 1
2384 1 Parents: 0
2390 1 Parents: 0
2385 0 Parents:
2391 0 Parents:
2386
2392
2387 $ hg log --template 'Rev: {rev}\n{revset("::%s", rev) % "Ancestor: {revision}\n"}\n'
2393 $ hg log --template 'Rev: {rev}\n{revset("::%s", rev) % "Ancestor: {revision}\n"}\n'
2388 Rev: 2
2394 Rev: 2
2389 Ancestor: 0
2395 Ancestor: 0
2390 Ancestor: 1
2396 Ancestor: 1
2391 Ancestor: 2
2397 Ancestor: 2
2392
2398
2393 Rev: 1
2399 Rev: 1
2394 Ancestor: 0
2400 Ancestor: 0
2395 Ancestor: 1
2401 Ancestor: 1
2396
2402
2397 Rev: 0
2403 Rev: 0
2398 Ancestor: 0
2404 Ancestor: 0
2399
2405
2400 Test current bookmark templating
2406 Test current bookmark templating
2401
2407
2402 $ hg book foo
2408 $ hg book foo
2403 $ hg book bar
2409 $ hg book bar
2404 $ hg log --template "{rev} {bookmarks % '{bookmark}{ifeq(bookmark, current, \"*\")} '}\n"
2410 $ hg log --template "{rev} {bookmarks % '{bookmark}{ifeq(bookmark, current, \"*\")} '}\n"
2405 2 bar* foo
2411 2 bar* foo
2406 1
2412 1
2407 0
2413 0
2408 $ hg log --template "{rev} {currentbookmark}\n"
2414 $ hg log --template "{rev} {currentbookmark}\n"
2409 2 bar
2415 2 bar
2410 1
2416 1
2411 0
2417 0
2412 $ hg bookmarks --inactive bar
2418 $ hg bookmarks --inactive bar
2413 $ hg log --template "{rev} {currentbookmark}\n"
2419 $ hg log --template "{rev} {currentbookmark}\n"
2414 2
2420 2
2415 1
2421 1
2416 0
2422 0
2417 $ hg book -r1 baz
2423 $ hg book -r1 baz
2418 $ hg log --template "{rev} {join(bookmarks, ' ')}\n"
2424 $ hg log --template "{rev} {join(bookmarks, ' ')}\n"
2419 2 bar foo
2425 2 bar foo
2420 1 baz
2426 1 baz
2421 0
2427 0
2422 $ hg log --template "{rev} {ifcontains('foo', bookmarks, 't', 'f')}\n"
2428 $ hg log --template "{rev} {ifcontains('foo', bookmarks, 't', 'f')}\n"
2423 2 t
2429 2 t
2424 1 f
2430 1 f
2425 0 f
2431 0 f
2426
2432
2427 Test stringify on sub expressions
2433 Test stringify on sub expressions
2428
2434
2429 $ cd ..
2435 $ cd ..
2430 $ hg log -R a -r 8 --template '{join(files, if("1", if("1", ", ")))}\n'
2436 $ hg log -R a -r 8 --template '{join(files, if("1", if("1", ", ")))}\n'
2431 fourth, second, third
2437 fourth, second, third
2432 $ hg log -R a -r 8 --template '{strip(if("1", if("1", "-abc-")), if("1", if("1", "-")))}\n'
2438 $ hg log -R a -r 8 --template '{strip(if("1", if("1", "-abc-")), if("1", if("1", "-")))}\n'
2433 abc
2439 abc
2434
2440
2435 Test splitlines
2441 Test splitlines
2436
2442
2437 $ hg log -Gv -R a --template "{splitlines(desc) % 'foo {line}\n'}"
2443 $ hg log -Gv -R a --template "{splitlines(desc) % 'foo {line}\n'}"
2438 @ foo future
2444 @ foo future
2439 |
2445 |
2440 o foo third
2446 o foo third
2441 |
2447 |
2442 o foo second
2448 o foo second
2443
2449
2444 o foo merge
2450 o foo merge
2445 |\
2451 |\
2446 | o foo new head
2452 | o foo new head
2447 | |
2453 | |
2448 o | foo new branch
2454 o | foo new branch
2449 |/
2455 |/
2450 o foo no user, no domain
2456 o foo no user, no domain
2451 |
2457 |
2452 o foo no person
2458 o foo no person
2453 |
2459 |
2454 o foo other 1
2460 o foo other 1
2455 | foo other 2
2461 | foo other 2
2456 | foo
2462 | foo
2457 | foo other 3
2463 | foo other 3
2458 o foo line 1
2464 o foo line 1
2459 foo line 2
2465 foo line 2
2460
2466
2461 Test startswith
2467 Test startswith
2462 $ hg log -Gv -R a --template "{startswith(desc)}"
2468 $ hg log -Gv -R a --template "{startswith(desc)}"
2463 hg: parse error: startswith expects two arguments
2469 hg: parse error: startswith expects two arguments
2464 [255]
2470 [255]
2465
2471
2466 $ hg log -Gv -R a --template "{startswith('line', desc)}"
2472 $ hg log -Gv -R a --template "{startswith('line', desc)}"
2467 @
2473 @
2468 |
2474 |
2469 o
2475 o
2470 |
2476 |
2471 o
2477 o
2472
2478
2473 o
2479 o
2474 |\
2480 |\
2475 | o
2481 | o
2476 | |
2482 | |
2477 o |
2483 o |
2478 |/
2484 |/
2479 o
2485 o
2480 |
2486 |
2481 o
2487 o
2482 |
2488 |
2483 o
2489 o
2484 |
2490 |
2485 o line 1
2491 o line 1
2486 line 2
2492 line 2
2487
2493
2488 Test bad template with better error message
2494 Test bad template with better error message
2489
2495
2490 $ hg log -Gv -R a --template '{desc|user()}'
2496 $ hg log -Gv -R a --template '{desc|user()}'
2491 hg: parse error: expected a symbol, got 'func'
2497 hg: parse error: expected a symbol, got 'func'
2492 [255]
2498 [255]
2493
2499
2494 Test word function (including index out of bounds graceful failure)
2500 Test word function (including index out of bounds graceful failure)
2495
2501
2496 $ hg log -Gv -R a --template "{word('1', desc)}"
2502 $ hg log -Gv -R a --template "{word('1', desc)}"
2497 @
2503 @
2498 |
2504 |
2499 o
2505 o
2500 |
2506 |
2501 o
2507 o
2502
2508
2503 o
2509 o
2504 |\
2510 |\
2505 | o head
2511 | o head
2506 | |
2512 | |
2507 o | branch
2513 o | branch
2508 |/
2514 |/
2509 o user,
2515 o user,
2510 |
2516 |
2511 o person
2517 o person
2512 |
2518 |
2513 o 1
2519 o 1
2514 |
2520 |
2515 o 1
2521 o 1
2516
2522
2517
2523
2518 Test word third parameter used as splitter
2524 Test word third parameter used as splitter
2519
2525
2520 $ hg log -Gv -R a --template "{word('0', desc, 'o')}"
2526 $ hg log -Gv -R a --template "{word('0', desc, 'o')}"
2521 @ future
2527 @ future
2522 |
2528 |
2523 o third
2529 o third
2524 |
2530 |
2525 o sec
2531 o sec
2526
2532
2527 o merge
2533 o merge
2528 |\
2534 |\
2529 | o new head
2535 | o new head
2530 | |
2536 | |
2531 o | new branch
2537 o | new branch
2532 |/
2538 |/
2533 o n
2539 o n
2534 |
2540 |
2535 o n
2541 o n
2536 |
2542 |
2537 o
2543 o
2538 |
2544 |
2539 o line 1
2545 o line 1
2540 line 2
2546 line 2
2541
2547
2542 Test word error messages for not enough and too many arguments
2548 Test word error messages for not enough and too many arguments
2543
2549
2544 $ hg log -Gv -R a --template "{word('0')}"
2550 $ hg log -Gv -R a --template "{word('0')}"
2545 hg: parse error: word expects two or three arguments, got 1
2551 hg: parse error: word expects two or three arguments, got 1
2546 [255]
2552 [255]
2547
2553
2548 $ hg log -Gv -R a --template "{word('0', desc, 'o', 'h', 'b', 'o', 'y')}"
2554 $ hg log -Gv -R a --template "{word('0', desc, 'o', 'h', 'b', 'o', 'y')}"
2549 hg: parse error: word expects two or three arguments, got 7
2555 hg: parse error: word expects two or three arguments, got 7
2550 [255]
2556 [255]
General Comments 0
You need to be logged in to leave comments. Login now