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