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