Show More
@@ -1,1942 +1,1962 b'' | |||
|
1 | 1 | Test template map files and styles |
|
2 | 2 | ================================== |
|
3 | 3 | |
|
4 | 4 | $ hg init a |
|
5 | 5 | $ cd a |
|
6 | 6 | $ echo a > a |
|
7 | 7 | $ hg add a |
|
8 | 8 | $ echo line 1 > b |
|
9 | 9 | $ echo line 2 >> b |
|
10 | 10 | $ hg commit -l b -d '1000000 0' -u 'User Name <user@hostname>' |
|
11 | 11 | |
|
12 | 12 | $ hg add b |
|
13 | 13 | $ echo other 1 > c |
|
14 | 14 | $ echo other 2 >> c |
|
15 | 15 | $ echo >> c |
|
16 | 16 | $ echo other 3 >> c |
|
17 | 17 | $ hg commit -l c -d '1100000 0' -u 'A. N. Other <other@place>' |
|
18 | 18 | |
|
19 | 19 | $ hg add c |
|
20 | 20 | $ hg commit -m 'no person' -d '1200000 0' -u 'other@place' |
|
21 | 21 | $ echo c >> c |
|
22 | 22 | $ hg commit -m 'no user, no domain' -d '1300000 0' -u 'person' |
|
23 | 23 | |
|
24 | 24 | $ echo foo > .hg/branch |
|
25 | 25 | $ hg commit -m 'new branch' -d '1400000 0' -u 'person' |
|
26 | 26 | |
|
27 | 27 | $ hg co -q 3 |
|
28 | 28 | $ echo other 4 >> d |
|
29 | 29 | $ hg add d |
|
30 | 30 | $ hg commit -m 'new head' -d '1500000 0' -u 'person' |
|
31 | 31 | |
|
32 | 32 | $ hg merge -q foo |
|
33 | 33 | $ hg commit -m 'merge' -d '1500001 0' -u 'person' |
|
34 | 34 | |
|
35 | 35 | Second branch starting at nullrev: |
|
36 | 36 | |
|
37 | 37 | $ hg update null |
|
38 | 38 | 0 files updated, 0 files merged, 4 files removed, 0 files unresolved |
|
39 | 39 | $ echo second > second |
|
40 | 40 | $ hg add second |
|
41 | 41 | $ hg commit -m second -d '1000000 0' -u 'User Name <user@hostname>' |
|
42 | 42 | created new head |
|
43 | 43 | |
|
44 | 44 | $ echo third > third |
|
45 | 45 | $ hg add third |
|
46 | 46 | $ hg mv second fourth |
|
47 | 47 | $ hg commit -m third -d "2020-01-01 10:01" |
|
48 | 48 | |
|
49 | 49 | Make sure user/global hgrc does not affect tests |
|
50 | 50 | |
|
51 | 51 | $ echo '[ui]' > .hg/hgrc |
|
52 | 52 | $ echo 'logtemplate =' >> .hg/hgrc |
|
53 | 53 | $ echo 'style =' >> .hg/hgrc |
|
54 | 54 | |
|
55 | 55 | Add some simple styles to settings |
|
56 | 56 | |
|
57 | 57 | $ cat <<'EOF' >> .hg/hgrc |
|
58 | 58 | > [templates] |
|
59 | 59 | > simple = "{rev}\n" |
|
60 | 60 | > simple2 = {rev}\n |
|
61 | 61 | > rev = "should not precede {rev} keyword\n" |
|
62 | 62 | > EOF |
|
63 | 63 | |
|
64 | 64 | $ hg log -l1 -Tsimple |
|
65 | 65 | 8 |
|
66 | 66 | $ hg log -l1 -Tsimple2 |
|
67 | 67 | 8 |
|
68 | 68 | $ hg log -l1 -Trev |
|
69 | 69 | should not precede 8 keyword |
|
70 | 70 | $ hg log -l1 -T '{simple}' |
|
71 | 71 | 8 |
|
72 | 72 | |
|
73 | 73 | Map file shouldn't see user templates: |
|
74 | 74 | |
|
75 | 75 | $ cat <<EOF > tmpl |
|
76 | 76 | > changeset = 'nothing expanded:{simple}\n' |
|
77 | 77 | > EOF |
|
78 | 78 | $ hg log -l1 --style ./tmpl |
|
79 | 79 | nothing expanded: |
|
80 | 80 | |
|
81 | 81 | Test templates and style maps in files: |
|
82 | 82 | |
|
83 | 83 | $ echo "{rev}" > tmpl |
|
84 | 84 | $ hg log -l1 -T./tmpl |
|
85 | 85 | 8 |
|
86 | 86 | $ hg log -l1 -Tblah/blah |
|
87 | 87 | blah/blah (no-eol) |
|
88 | 88 | |
|
89 | 89 | $ printf 'changeset = "{rev}\\n"\n' > map-simple |
|
90 | 90 | $ hg log -l1 -T./map-simple |
|
91 | 91 | 8 |
|
92 | 92 | |
|
93 | 93 | a map file may have [templates] and [templatealias] sections: |
|
94 | 94 | |
|
95 | 95 | $ cat <<'EOF' > map-simple |
|
96 | 96 | > [templates] |
|
97 | 97 | > changeset = "{a}\n" |
|
98 | 98 | > [templatealias] |
|
99 | 99 | > a = rev |
|
100 | 100 | > EOF |
|
101 | 101 | $ hg log -l1 -T./map-simple |
|
102 | 102 | 8 |
|
103 | 103 | |
|
104 | 104 | so it can be included in hgrc |
|
105 | 105 | |
|
106 | 106 | $ cat <<EOF > myhgrc |
|
107 | 107 | > %include $HGRCPATH |
|
108 | 108 | > %include map-simple |
|
109 | 109 | > [templates] |
|
110 | 110 | > foo = "{changeset}" |
|
111 | 111 | > EOF |
|
112 | 112 | $ HGRCPATH=./myhgrc hg log -l1 -Tfoo |
|
113 | 113 | 8 |
|
114 | 114 | $ HGRCPATH=./myhgrc hg log -l1 -T'{a}\n' |
|
115 | 115 | 8 |
|
116 | 116 | |
|
117 | 117 | Test template map inheritance |
|
118 | 118 | |
|
119 | 119 | $ echo "__base__ = map-cmdline.default" > map-simple |
|
120 | 120 | $ printf 'cset = "changeset: ***{rev}***\\n"\n' >> map-simple |
|
121 | 121 | $ hg log -l1 -T./map-simple |
|
122 | 122 | changeset: ***8*** |
|
123 | 123 | tag: tip |
|
124 | 124 | user: test |
|
125 | 125 | date: Wed Jan 01 10:01:00 2020 +0000 |
|
126 | 126 | summary: third |
|
127 | 127 | |
|
128 | Test map inheritance with non-existent base | |
|
129 | ||
|
130 | $ echo "__base__ = non-existent" > map-base-nonexistent | |
|
131 | $ printf 'cset = "changeset: ***{rev}***\\n"\n' >> map-simple | |
|
132 | $ hg log -l1 -T./map-base-nonexistent | |
|
133 | abort: style '$TESTTMP/a/non-existent' not found | |
|
134 | (available styles: bisect, changelog, compact, default, phases, show, status, xml) | |
|
135 | [255] | |
|
136 | ||
|
128 | 137 | Test including a built-in template map |
|
129 | 138 | |
|
130 | 139 | $ cat <<'EOF' > map-include-builtin |
|
131 | 140 | > %include map-cmdline.default |
|
132 | 141 | > [templates] |
|
133 | 142 | > changeset = "{changeset_quiet}\n" |
|
134 | 143 | > EOF |
|
135 | 144 | $ hg log -l1 -T./map-include-builtin |
|
136 | 145 | 8:95c24699272e |
|
137 | 146 | |
|
138 | 147 | |
|
148 | Test including a nonexistent template map | |
|
149 | BROKEN: This should probably be an error just like the bad __base__ above | |
|
150 | ||
|
151 | $ cat <<'EOF' > map-include-nonexistent | |
|
152 | > %include nonexistent | |
|
153 | > [templates] | |
|
154 | > changeset = "test\n" | |
|
155 | > EOF | |
|
156 | $ hg log -l1 -T./map-include-nonexistent | |
|
157 | test | |
|
158 | ||
|
139 | 159 | Test docheader, docfooter and separator in template map |
|
140 | 160 | |
|
141 | 161 | $ cat <<'EOF' > map-myjson |
|
142 | 162 | > docheader = '\{\n' |
|
143 | 163 | > docfooter = '\n}\n' |
|
144 | 164 | > separator = ',\n' |
|
145 | 165 | > changeset = ' {dict(rev, node|short)|json}' |
|
146 | 166 | > EOF |
|
147 | 167 | $ hg log -l2 -T./map-myjson |
|
148 | 168 | { |
|
149 | 169 | {"node": "95c24699272e", "rev": 8}, |
|
150 | 170 | {"node": "29114dbae42b", "rev": 7} |
|
151 | 171 | } |
|
152 | 172 | |
|
153 | 173 | Test docheader, docfooter and separator in [templates] section |
|
154 | 174 | |
|
155 | 175 | $ cat <<'EOF' >> .hg/hgrc |
|
156 | 176 | > [templates] |
|
157 | 177 | > myjson = ' {dict(rev, node|short)|json}' |
|
158 | 178 | > myjson:docheader = '\{\n' |
|
159 | 179 | > myjson:docfooter = '\n}\n' |
|
160 | 180 | > myjson:separator = ',\n' |
|
161 | 181 | > :docheader = 'should not be selected as a docheader for literal templates\n' |
|
162 | 182 | > EOF |
|
163 | 183 | $ hg log -l2 -Tmyjson |
|
164 | 184 | { |
|
165 | 185 | {"node": "95c24699272e", "rev": 8}, |
|
166 | 186 | {"node": "29114dbae42b", "rev": 7} |
|
167 | 187 | } |
|
168 | 188 | $ hg log -l1 -T'{rev}\n' |
|
169 | 189 | 8 |
|
170 | 190 | |
|
171 | 191 | Template should precede style option |
|
172 | 192 | |
|
173 | 193 | $ hg log -l1 --style default -T '{rev}\n' |
|
174 | 194 | 8 |
|
175 | 195 | |
|
176 | 196 | Add a commit with empty description, to ensure that the templates |
|
177 | 197 | below will omit the description line. |
|
178 | 198 | |
|
179 | 199 | $ echo c >> c |
|
180 | 200 | $ hg add c |
|
181 | 201 | $ hg commit -qm ' ' |
|
182 | 202 | |
|
183 | 203 | Default style is like normal output. Phases style should be the same |
|
184 | 204 | as default style, except for extra phase lines. |
|
185 | 205 | |
|
186 | 206 | $ hg log > log.out |
|
187 | 207 | $ hg log --style default > style.out |
|
188 | 208 | $ cmp log.out style.out || diff -u log.out style.out |
|
189 | 209 | $ hg log -T phases > phases.out |
|
190 | 210 | $ diff -U 0 log.out phases.out | egrep -v '^---|^\+\+\+|^@@' |
|
191 | 211 | +phase: draft |
|
192 | 212 | +phase: draft |
|
193 | 213 | +phase: draft |
|
194 | 214 | +phase: draft |
|
195 | 215 | +phase: draft |
|
196 | 216 | +phase: draft |
|
197 | 217 | +phase: draft |
|
198 | 218 | +phase: draft |
|
199 | 219 | +phase: draft |
|
200 | 220 | +phase: draft |
|
201 | 221 | |
|
202 | 222 | $ hg log -v > log.out |
|
203 | 223 | $ hg log -v --style default > style.out |
|
204 | 224 | $ cmp log.out style.out || diff -u log.out style.out |
|
205 | 225 | $ hg log -v -T phases > phases.out |
|
206 | 226 | $ diff -U 0 log.out phases.out | egrep -v '^---|^\+\+\+|^@@' |
|
207 | 227 | +phase: draft |
|
208 | 228 | +phase: draft |
|
209 | 229 | +phase: draft |
|
210 | 230 | +phase: draft |
|
211 | 231 | +phase: draft |
|
212 | 232 | +phase: draft |
|
213 | 233 | +phase: draft |
|
214 | 234 | +phase: draft |
|
215 | 235 | +phase: draft |
|
216 | 236 | +phase: draft |
|
217 | 237 | |
|
218 | 238 | $ hg log -q > log.out |
|
219 | 239 | $ hg log -q --style default > style.out |
|
220 | 240 | $ cmp log.out style.out || diff -u log.out style.out |
|
221 | 241 | $ hg log -q -T phases > phases.out |
|
222 | 242 | $ cmp log.out phases.out || diff -u log.out phases.out |
|
223 | 243 | |
|
224 | 244 | $ hg log --debug > log.out |
|
225 | 245 | $ hg log --debug --style default > style.out |
|
226 | 246 | $ cmp log.out style.out || diff -u log.out style.out |
|
227 | 247 | $ hg log --debug -T phases > phases.out |
|
228 | 248 | $ cmp log.out phases.out || diff -u log.out phases.out |
|
229 | 249 | |
|
230 | 250 | Default style of working-directory revision should also be the same (but |
|
231 | 251 | date may change while running tests): |
|
232 | 252 | |
|
233 | 253 | $ hg log -r 'wdir()' | sed 's|^date:.*|date:|' > log.out |
|
234 | 254 | $ hg log -r 'wdir()' --style default | sed 's|^date:.*|date:|' > style.out |
|
235 | 255 | $ cmp log.out style.out || diff -u log.out style.out |
|
236 | 256 | |
|
237 | 257 | $ hg log -r 'wdir()' -v | sed 's|^date:.*|date:|' > log.out |
|
238 | 258 | $ hg log -r 'wdir()' -v --style default | sed 's|^date:.*|date:|' > style.out |
|
239 | 259 | $ cmp log.out style.out || diff -u log.out style.out |
|
240 | 260 | |
|
241 | 261 | $ hg log -r 'wdir()' -q > log.out |
|
242 | 262 | $ hg log -r 'wdir()' -q --style default > style.out |
|
243 | 263 | $ cmp log.out style.out || diff -u log.out style.out |
|
244 | 264 | |
|
245 | 265 | $ hg log -r 'wdir()' --debug | sed 's|^date:.*|date:|' > log.out |
|
246 | 266 | $ hg log -r 'wdir()' --debug --style default \ |
|
247 | 267 | > | sed 's|^date:.*|date:|' > style.out |
|
248 | 268 | $ cmp log.out style.out || diff -u log.out style.out |
|
249 | 269 | |
|
250 | 270 | Default style should also preserve color information (issue2866): |
|
251 | 271 | |
|
252 | 272 | $ cp $HGRCPATH $HGRCPATH-bak |
|
253 | 273 | $ cat <<EOF >> $HGRCPATH |
|
254 | 274 | > [extensions] |
|
255 | 275 | > color= |
|
256 | 276 | > EOF |
|
257 | 277 | |
|
258 | 278 | $ hg --color=debug log > log.out |
|
259 | 279 | $ hg --color=debug log --style default > style.out |
|
260 | 280 | $ cmp log.out style.out || diff -u log.out style.out |
|
261 | 281 | $ hg --color=debug log -T phases > phases.out |
|
262 | 282 | $ diff -U 0 log.out phases.out | egrep -v '^---|^\+\+\+|^@@' |
|
263 | 283 | +[log.phase|phase: draft] |
|
264 | 284 | +[log.phase|phase: draft] |
|
265 | 285 | +[log.phase|phase: draft] |
|
266 | 286 | +[log.phase|phase: draft] |
|
267 | 287 | +[log.phase|phase: draft] |
|
268 | 288 | +[log.phase|phase: draft] |
|
269 | 289 | +[log.phase|phase: draft] |
|
270 | 290 | +[log.phase|phase: draft] |
|
271 | 291 | +[log.phase|phase: draft] |
|
272 | 292 | +[log.phase|phase: draft] |
|
273 | 293 | |
|
274 | 294 | $ hg --color=debug -v log > log.out |
|
275 | 295 | $ hg --color=debug -v log --style default > style.out |
|
276 | 296 | $ cmp log.out style.out || diff -u log.out style.out |
|
277 | 297 | $ hg --color=debug -v log -T phases > phases.out |
|
278 | 298 | $ diff -U 0 log.out phases.out | egrep -v '^---|^\+\+\+|^@@' |
|
279 | 299 | +[log.phase|phase: draft] |
|
280 | 300 | +[log.phase|phase: draft] |
|
281 | 301 | +[log.phase|phase: draft] |
|
282 | 302 | +[log.phase|phase: draft] |
|
283 | 303 | +[log.phase|phase: draft] |
|
284 | 304 | +[log.phase|phase: draft] |
|
285 | 305 | +[log.phase|phase: draft] |
|
286 | 306 | +[log.phase|phase: draft] |
|
287 | 307 | +[log.phase|phase: draft] |
|
288 | 308 | +[log.phase|phase: draft] |
|
289 | 309 | |
|
290 | 310 | $ hg --color=debug -q log > log.out |
|
291 | 311 | $ hg --color=debug -q log --style default > style.out |
|
292 | 312 | $ cmp log.out style.out || diff -u log.out style.out |
|
293 | 313 | $ hg --color=debug -q log -T phases > phases.out |
|
294 | 314 | $ cmp log.out phases.out || diff -u log.out phases.out |
|
295 | 315 | |
|
296 | 316 | $ hg --color=debug --debug log > log.out |
|
297 | 317 | $ hg --color=debug --debug log --style default > style.out |
|
298 | 318 | $ cmp log.out style.out || diff -u log.out style.out |
|
299 | 319 | $ hg --color=debug --debug log -T phases > phases.out |
|
300 | 320 | $ cmp log.out phases.out || diff -u log.out phases.out |
|
301 | 321 | |
|
302 | 322 | $ mv $HGRCPATH-bak $HGRCPATH |
|
303 | 323 | |
|
304 | 324 | Remove commit with empty commit message, so as to not pollute further |
|
305 | 325 | tests. |
|
306 | 326 | |
|
307 | 327 | $ hg --config extensions.strip= strip -q . |
|
308 | 328 | |
|
309 | 329 | Revision with no copies (used to print a traceback): |
|
310 | 330 | |
|
311 | 331 | $ hg tip -v --template '\n' |
|
312 | 332 | |
|
313 | 333 | |
|
314 | 334 | Compact style works: |
|
315 | 335 | |
|
316 | 336 | $ hg log -Tcompact |
|
317 | 337 | 8[tip] 95c24699272e 2020-01-01 10:01 +0000 test |
|
318 | 338 | third |
|
319 | 339 | |
|
320 | 340 | 7:-1 29114dbae42b 1970-01-12 13:46 +0000 user |
|
321 | 341 | second |
|
322 | 342 | |
|
323 | 343 | 6:5,4 d41e714fe50d 1970-01-18 08:40 +0000 person |
|
324 | 344 | merge |
|
325 | 345 | |
|
326 | 346 | 5:3 13207e5a10d9 1970-01-18 08:40 +0000 person |
|
327 | 347 | new head |
|
328 | 348 | |
|
329 | 349 | 4 bbe44766e73d 1970-01-17 04:53 +0000 person |
|
330 | 350 | new branch |
|
331 | 351 | |
|
332 | 352 | 3 10e46f2dcbf4 1970-01-16 01:06 +0000 person |
|
333 | 353 | no user, no domain |
|
334 | 354 | |
|
335 | 355 | 2 97054abb4ab8 1970-01-14 21:20 +0000 other |
|
336 | 356 | no person |
|
337 | 357 | |
|
338 | 358 | 1 b608e9d1a3f0 1970-01-13 17:33 +0000 other |
|
339 | 359 | other 1 |
|
340 | 360 | |
|
341 | 361 | 0 1e4e1b8f71e0 1970-01-12 13:46 +0000 user |
|
342 | 362 | line 1 |
|
343 | 363 | |
|
344 | 364 | |
|
345 | 365 | $ hg log -v --style compact |
|
346 | 366 | 8[tip] 95c24699272e 2020-01-01 10:01 +0000 test |
|
347 | 367 | third |
|
348 | 368 | |
|
349 | 369 | 7:-1 29114dbae42b 1970-01-12 13:46 +0000 User Name <user@hostname> |
|
350 | 370 | second |
|
351 | 371 | |
|
352 | 372 | 6:5,4 d41e714fe50d 1970-01-18 08:40 +0000 person |
|
353 | 373 | merge |
|
354 | 374 | |
|
355 | 375 | 5:3 13207e5a10d9 1970-01-18 08:40 +0000 person |
|
356 | 376 | new head |
|
357 | 377 | |
|
358 | 378 | 4 bbe44766e73d 1970-01-17 04:53 +0000 person |
|
359 | 379 | new branch |
|
360 | 380 | |
|
361 | 381 | 3 10e46f2dcbf4 1970-01-16 01:06 +0000 person |
|
362 | 382 | no user, no domain |
|
363 | 383 | |
|
364 | 384 | 2 97054abb4ab8 1970-01-14 21:20 +0000 other@place |
|
365 | 385 | no person |
|
366 | 386 | |
|
367 | 387 | 1 b608e9d1a3f0 1970-01-13 17:33 +0000 A. N. Other <other@place> |
|
368 | 388 | other 1 |
|
369 | 389 | other 2 |
|
370 | 390 | |
|
371 | 391 | other 3 |
|
372 | 392 | |
|
373 | 393 | 0 1e4e1b8f71e0 1970-01-12 13:46 +0000 User Name <user@hostname> |
|
374 | 394 | line 1 |
|
375 | 395 | line 2 |
|
376 | 396 | |
|
377 | 397 | |
|
378 | 398 | $ hg log --debug --style compact |
|
379 | 399 | 8[tip]:7,-1 95c24699272e 2020-01-01 10:01 +0000 test |
|
380 | 400 | third |
|
381 | 401 | |
|
382 | 402 | 7:-1,-1 29114dbae42b 1970-01-12 13:46 +0000 User Name <user@hostname> |
|
383 | 403 | second |
|
384 | 404 | |
|
385 | 405 | 6:5,4 d41e714fe50d 1970-01-18 08:40 +0000 person |
|
386 | 406 | merge |
|
387 | 407 | |
|
388 | 408 | 5:3,-1 13207e5a10d9 1970-01-18 08:40 +0000 person |
|
389 | 409 | new head |
|
390 | 410 | |
|
391 | 411 | 4:3,-1 bbe44766e73d 1970-01-17 04:53 +0000 person |
|
392 | 412 | new branch |
|
393 | 413 | |
|
394 | 414 | 3:2,-1 10e46f2dcbf4 1970-01-16 01:06 +0000 person |
|
395 | 415 | no user, no domain |
|
396 | 416 | |
|
397 | 417 | 2:1,-1 97054abb4ab8 1970-01-14 21:20 +0000 other@place |
|
398 | 418 | no person |
|
399 | 419 | |
|
400 | 420 | 1:0,-1 b608e9d1a3f0 1970-01-13 17:33 +0000 A. N. Other <other@place> |
|
401 | 421 | other 1 |
|
402 | 422 | other 2 |
|
403 | 423 | |
|
404 | 424 | other 3 |
|
405 | 425 | |
|
406 | 426 | 0:-1,-1 1e4e1b8f71e0 1970-01-12 13:46 +0000 User Name <user@hostname> |
|
407 | 427 | line 1 |
|
408 | 428 | line 2 |
|
409 | 429 | |
|
410 | 430 | |
|
411 | 431 | Test xml styles: |
|
412 | 432 | |
|
413 | 433 | $ hg log --style xml -r 'not all()' |
|
414 | 434 | <?xml version="1.0"?> |
|
415 | 435 | <log> |
|
416 | 436 | </log> |
|
417 | 437 | |
|
418 | 438 | $ hg log --style xml |
|
419 | 439 | <?xml version="1.0"?> |
|
420 | 440 | <log> |
|
421 | 441 | <logentry revision="8" node="95c24699272ef57d062b8bccc32c878bf841784a"> |
|
422 | 442 | <tag>tip</tag> |
|
423 | 443 | <author email="test">test</author> |
|
424 | 444 | <date>2020-01-01T10:01:00+00:00</date> |
|
425 | 445 | <msg xml:space="preserve">third</msg> |
|
426 | 446 | </logentry> |
|
427 | 447 | <logentry revision="7" node="29114dbae42b9f078cf2714dbe3a86bba8ec7453"> |
|
428 | 448 | <parent revision="-1" node="0000000000000000000000000000000000000000" /> |
|
429 | 449 | <author email="user@hostname">User Name</author> |
|
430 | 450 | <date>1970-01-12T13:46:40+00:00</date> |
|
431 | 451 | <msg xml:space="preserve">second</msg> |
|
432 | 452 | </logentry> |
|
433 | 453 | <logentry revision="6" node="d41e714fe50d9e4a5f11b4d595d543481b5f980b"> |
|
434 | 454 | <parent revision="5" node="13207e5a10d9fd28ec424934298e176197f2c67f" /> |
|
435 | 455 | <parent revision="4" node="bbe44766e73d5f11ed2177f1838de10c53ef3e74" /> |
|
436 | 456 | <author email="person">person</author> |
|
437 | 457 | <date>1970-01-18T08:40:01+00:00</date> |
|
438 | 458 | <msg xml:space="preserve">merge</msg> |
|
439 | 459 | </logentry> |
|
440 | 460 | <logentry revision="5" node="13207e5a10d9fd28ec424934298e176197f2c67f"> |
|
441 | 461 | <parent revision="3" node="10e46f2dcbf4823578cf180f33ecf0b957964c47" /> |
|
442 | 462 | <author email="person">person</author> |
|
443 | 463 | <date>1970-01-18T08:40:00+00:00</date> |
|
444 | 464 | <msg xml:space="preserve">new head</msg> |
|
445 | 465 | </logentry> |
|
446 | 466 | <logentry revision="4" node="bbe44766e73d5f11ed2177f1838de10c53ef3e74"> |
|
447 | 467 | <branch>foo</branch> |
|
448 | 468 | <author email="person">person</author> |
|
449 | 469 | <date>1970-01-17T04:53:20+00:00</date> |
|
450 | 470 | <msg xml:space="preserve">new branch</msg> |
|
451 | 471 | </logentry> |
|
452 | 472 | <logentry revision="3" node="10e46f2dcbf4823578cf180f33ecf0b957964c47"> |
|
453 | 473 | <author email="person">person</author> |
|
454 | 474 | <date>1970-01-16T01:06:40+00:00</date> |
|
455 | 475 | <msg xml:space="preserve">no user, no domain</msg> |
|
456 | 476 | </logentry> |
|
457 | 477 | <logentry revision="2" node="97054abb4ab824450e9164180baf491ae0078465"> |
|
458 | 478 | <author email="other@place">other</author> |
|
459 | 479 | <date>1970-01-14T21:20:00+00:00</date> |
|
460 | 480 | <msg xml:space="preserve">no person</msg> |
|
461 | 481 | </logentry> |
|
462 | 482 | <logentry revision="1" node="b608e9d1a3f0273ccf70fb85fd6866b3482bf965"> |
|
463 | 483 | <author email="other@place">A. N. Other</author> |
|
464 | 484 | <date>1970-01-13T17:33:20+00:00</date> |
|
465 | 485 | <msg xml:space="preserve">other 1 |
|
466 | 486 | other 2 |
|
467 | 487 | |
|
468 | 488 | other 3</msg> |
|
469 | 489 | </logentry> |
|
470 | 490 | <logentry revision="0" node="1e4e1b8f71e05681d422154f5421e385fec3454f"> |
|
471 | 491 | <author email="user@hostname">User Name</author> |
|
472 | 492 | <date>1970-01-12T13:46:40+00:00</date> |
|
473 | 493 | <msg xml:space="preserve">line 1 |
|
474 | 494 | line 2</msg> |
|
475 | 495 | </logentry> |
|
476 | 496 | </log> |
|
477 | 497 | |
|
478 | 498 | $ hg log -v --style xml |
|
479 | 499 | <?xml version="1.0"?> |
|
480 | 500 | <log> |
|
481 | 501 | <logentry revision="8" node="95c24699272ef57d062b8bccc32c878bf841784a"> |
|
482 | 502 | <tag>tip</tag> |
|
483 | 503 | <author email="test">test</author> |
|
484 | 504 | <date>2020-01-01T10:01:00+00:00</date> |
|
485 | 505 | <msg xml:space="preserve">third</msg> |
|
486 | 506 | <paths> |
|
487 | 507 | <path action="A">fourth</path> |
|
488 | 508 | <path action="A">third</path> |
|
489 | 509 | <path action="R">second</path> |
|
490 | 510 | </paths> |
|
491 | 511 | <copies> |
|
492 | 512 | <copy source="second">fourth</copy> |
|
493 | 513 | </copies> |
|
494 | 514 | </logentry> |
|
495 | 515 | <logentry revision="7" node="29114dbae42b9f078cf2714dbe3a86bba8ec7453"> |
|
496 | 516 | <parent revision="-1" node="0000000000000000000000000000000000000000" /> |
|
497 | 517 | <author email="user@hostname">User Name</author> |
|
498 | 518 | <date>1970-01-12T13:46:40+00:00</date> |
|
499 | 519 | <msg xml:space="preserve">second</msg> |
|
500 | 520 | <paths> |
|
501 | 521 | <path action="A">second</path> |
|
502 | 522 | </paths> |
|
503 | 523 | </logentry> |
|
504 | 524 | <logentry revision="6" node="d41e714fe50d9e4a5f11b4d595d543481b5f980b"> |
|
505 | 525 | <parent revision="5" node="13207e5a10d9fd28ec424934298e176197f2c67f" /> |
|
506 | 526 | <parent revision="4" node="bbe44766e73d5f11ed2177f1838de10c53ef3e74" /> |
|
507 | 527 | <author email="person">person</author> |
|
508 | 528 | <date>1970-01-18T08:40:01+00:00</date> |
|
509 | 529 | <msg xml:space="preserve">merge</msg> |
|
510 | 530 | <paths> |
|
511 | 531 | </paths> |
|
512 | 532 | </logentry> |
|
513 | 533 | <logentry revision="5" node="13207e5a10d9fd28ec424934298e176197f2c67f"> |
|
514 | 534 | <parent revision="3" node="10e46f2dcbf4823578cf180f33ecf0b957964c47" /> |
|
515 | 535 | <author email="person">person</author> |
|
516 | 536 | <date>1970-01-18T08:40:00+00:00</date> |
|
517 | 537 | <msg xml:space="preserve">new head</msg> |
|
518 | 538 | <paths> |
|
519 | 539 | <path action="A">d</path> |
|
520 | 540 | </paths> |
|
521 | 541 | </logentry> |
|
522 | 542 | <logentry revision="4" node="bbe44766e73d5f11ed2177f1838de10c53ef3e74"> |
|
523 | 543 | <branch>foo</branch> |
|
524 | 544 | <author email="person">person</author> |
|
525 | 545 | <date>1970-01-17T04:53:20+00:00</date> |
|
526 | 546 | <msg xml:space="preserve">new branch</msg> |
|
527 | 547 | <paths> |
|
528 | 548 | </paths> |
|
529 | 549 | </logentry> |
|
530 | 550 | <logentry revision="3" node="10e46f2dcbf4823578cf180f33ecf0b957964c47"> |
|
531 | 551 | <author email="person">person</author> |
|
532 | 552 | <date>1970-01-16T01:06:40+00:00</date> |
|
533 | 553 | <msg xml:space="preserve">no user, no domain</msg> |
|
534 | 554 | <paths> |
|
535 | 555 | <path action="M">c</path> |
|
536 | 556 | </paths> |
|
537 | 557 | </logentry> |
|
538 | 558 | <logentry revision="2" node="97054abb4ab824450e9164180baf491ae0078465"> |
|
539 | 559 | <author email="other@place">other</author> |
|
540 | 560 | <date>1970-01-14T21:20:00+00:00</date> |
|
541 | 561 | <msg xml:space="preserve">no person</msg> |
|
542 | 562 | <paths> |
|
543 | 563 | <path action="A">c</path> |
|
544 | 564 | </paths> |
|
545 | 565 | </logentry> |
|
546 | 566 | <logentry revision="1" node="b608e9d1a3f0273ccf70fb85fd6866b3482bf965"> |
|
547 | 567 | <author email="other@place">A. N. Other</author> |
|
548 | 568 | <date>1970-01-13T17:33:20+00:00</date> |
|
549 | 569 | <msg xml:space="preserve">other 1 |
|
550 | 570 | other 2 |
|
551 | 571 | |
|
552 | 572 | other 3</msg> |
|
553 | 573 | <paths> |
|
554 | 574 | <path action="A">b</path> |
|
555 | 575 | </paths> |
|
556 | 576 | </logentry> |
|
557 | 577 | <logentry revision="0" node="1e4e1b8f71e05681d422154f5421e385fec3454f"> |
|
558 | 578 | <author email="user@hostname">User Name</author> |
|
559 | 579 | <date>1970-01-12T13:46:40+00:00</date> |
|
560 | 580 | <msg xml:space="preserve">line 1 |
|
561 | 581 | line 2</msg> |
|
562 | 582 | <paths> |
|
563 | 583 | <path action="A">a</path> |
|
564 | 584 | </paths> |
|
565 | 585 | </logentry> |
|
566 | 586 | </log> |
|
567 | 587 | |
|
568 | 588 | $ hg log --debug --style xml |
|
569 | 589 | <?xml version="1.0"?> |
|
570 | 590 | <log> |
|
571 | 591 | <logentry revision="8" node="95c24699272ef57d062b8bccc32c878bf841784a"> |
|
572 | 592 | <tag>tip</tag> |
|
573 | 593 | <parent revision="7" node="29114dbae42b9f078cf2714dbe3a86bba8ec7453" /> |
|
574 | 594 | <parent revision="-1" node="0000000000000000000000000000000000000000" /> |
|
575 | 595 | <author email="test">test</author> |
|
576 | 596 | <date>2020-01-01T10:01:00+00:00</date> |
|
577 | 597 | <msg xml:space="preserve">third</msg> |
|
578 | 598 | <paths> |
|
579 | 599 | <path action="A">fourth</path> |
|
580 | 600 | <path action="A">third</path> |
|
581 | 601 | <path action="R">second</path> |
|
582 | 602 | </paths> |
|
583 | 603 | <copies> |
|
584 | 604 | <copy source="second">fourth</copy> |
|
585 | 605 | </copies> |
|
586 | 606 | <extra key="branch">default</extra> |
|
587 | 607 | </logentry> |
|
588 | 608 | <logentry revision="7" node="29114dbae42b9f078cf2714dbe3a86bba8ec7453"> |
|
589 | 609 | <parent revision="-1" node="0000000000000000000000000000000000000000" /> |
|
590 | 610 | <parent revision="-1" node="0000000000000000000000000000000000000000" /> |
|
591 | 611 | <author email="user@hostname">User Name</author> |
|
592 | 612 | <date>1970-01-12T13:46:40+00:00</date> |
|
593 | 613 | <msg xml:space="preserve">second</msg> |
|
594 | 614 | <paths> |
|
595 | 615 | <path action="A">second</path> |
|
596 | 616 | </paths> |
|
597 | 617 | <extra key="branch">default</extra> |
|
598 | 618 | </logentry> |
|
599 | 619 | <logentry revision="6" node="d41e714fe50d9e4a5f11b4d595d543481b5f980b"> |
|
600 | 620 | <parent revision="5" node="13207e5a10d9fd28ec424934298e176197f2c67f" /> |
|
601 | 621 | <parent revision="4" node="bbe44766e73d5f11ed2177f1838de10c53ef3e74" /> |
|
602 | 622 | <author email="person">person</author> |
|
603 | 623 | <date>1970-01-18T08:40:01+00:00</date> |
|
604 | 624 | <msg xml:space="preserve">merge</msg> |
|
605 | 625 | <paths> |
|
606 | 626 | </paths> |
|
607 | 627 | <extra key="branch">default</extra> |
|
608 | 628 | </logentry> |
|
609 | 629 | <logentry revision="5" node="13207e5a10d9fd28ec424934298e176197f2c67f"> |
|
610 | 630 | <parent revision="3" node="10e46f2dcbf4823578cf180f33ecf0b957964c47" /> |
|
611 | 631 | <parent revision="-1" node="0000000000000000000000000000000000000000" /> |
|
612 | 632 | <author email="person">person</author> |
|
613 | 633 | <date>1970-01-18T08:40:00+00:00</date> |
|
614 | 634 | <msg xml:space="preserve">new head</msg> |
|
615 | 635 | <paths> |
|
616 | 636 | <path action="A">d</path> |
|
617 | 637 | </paths> |
|
618 | 638 | <extra key="branch">default</extra> |
|
619 | 639 | </logentry> |
|
620 | 640 | <logentry revision="4" node="bbe44766e73d5f11ed2177f1838de10c53ef3e74"> |
|
621 | 641 | <branch>foo</branch> |
|
622 | 642 | <parent revision="3" node="10e46f2dcbf4823578cf180f33ecf0b957964c47" /> |
|
623 | 643 | <parent revision="-1" node="0000000000000000000000000000000000000000" /> |
|
624 | 644 | <author email="person">person</author> |
|
625 | 645 | <date>1970-01-17T04:53:20+00:00</date> |
|
626 | 646 | <msg xml:space="preserve">new branch</msg> |
|
627 | 647 | <paths> |
|
628 | 648 | </paths> |
|
629 | 649 | <extra key="branch">foo</extra> |
|
630 | 650 | </logentry> |
|
631 | 651 | <logentry revision="3" node="10e46f2dcbf4823578cf180f33ecf0b957964c47"> |
|
632 | 652 | <parent revision="2" node="97054abb4ab824450e9164180baf491ae0078465" /> |
|
633 | 653 | <parent revision="-1" node="0000000000000000000000000000000000000000" /> |
|
634 | 654 | <author email="person">person</author> |
|
635 | 655 | <date>1970-01-16T01:06:40+00:00</date> |
|
636 | 656 | <msg xml:space="preserve">no user, no domain</msg> |
|
637 | 657 | <paths> |
|
638 | 658 | <path action="M">c</path> |
|
639 | 659 | </paths> |
|
640 | 660 | <extra key="branch">default</extra> |
|
641 | 661 | </logentry> |
|
642 | 662 | <logentry revision="2" node="97054abb4ab824450e9164180baf491ae0078465"> |
|
643 | 663 | <parent revision="1" node="b608e9d1a3f0273ccf70fb85fd6866b3482bf965" /> |
|
644 | 664 | <parent revision="-1" node="0000000000000000000000000000000000000000" /> |
|
645 | 665 | <author email="other@place">other</author> |
|
646 | 666 | <date>1970-01-14T21:20:00+00:00</date> |
|
647 | 667 | <msg xml:space="preserve">no person</msg> |
|
648 | 668 | <paths> |
|
649 | 669 | <path action="A">c</path> |
|
650 | 670 | </paths> |
|
651 | 671 | <extra key="branch">default</extra> |
|
652 | 672 | </logentry> |
|
653 | 673 | <logentry revision="1" node="b608e9d1a3f0273ccf70fb85fd6866b3482bf965"> |
|
654 | 674 | <parent revision="0" node="1e4e1b8f71e05681d422154f5421e385fec3454f" /> |
|
655 | 675 | <parent revision="-1" node="0000000000000000000000000000000000000000" /> |
|
656 | 676 | <author email="other@place">A. N. Other</author> |
|
657 | 677 | <date>1970-01-13T17:33:20+00:00</date> |
|
658 | 678 | <msg xml:space="preserve">other 1 |
|
659 | 679 | other 2 |
|
660 | 680 | |
|
661 | 681 | other 3</msg> |
|
662 | 682 | <paths> |
|
663 | 683 | <path action="A">b</path> |
|
664 | 684 | </paths> |
|
665 | 685 | <extra key="branch">default</extra> |
|
666 | 686 | </logentry> |
|
667 | 687 | <logentry revision="0" node="1e4e1b8f71e05681d422154f5421e385fec3454f"> |
|
668 | 688 | <parent revision="-1" node="0000000000000000000000000000000000000000" /> |
|
669 | 689 | <parent revision="-1" node="0000000000000000000000000000000000000000" /> |
|
670 | 690 | <author email="user@hostname">User Name</author> |
|
671 | 691 | <date>1970-01-12T13:46:40+00:00</date> |
|
672 | 692 | <msg xml:space="preserve">line 1 |
|
673 | 693 | line 2</msg> |
|
674 | 694 | <paths> |
|
675 | 695 | <path action="A">a</path> |
|
676 | 696 | </paths> |
|
677 | 697 | <extra key="branch">default</extra> |
|
678 | 698 | </logentry> |
|
679 | 699 | </log> |
|
680 | 700 | |
|
681 | 701 | |
|
682 | 702 | test CBOR style: |
|
683 | 703 | |
|
684 | 704 | $ cat <<'EOF' > "$TESTTMP/decodecborarray.py" |
|
685 | 705 | > from __future__ import absolute_import |
|
686 | 706 | > from mercurial import ( |
|
687 | 707 | > dispatch, |
|
688 | 708 | > ) |
|
689 | 709 | > from mercurial.utils import ( |
|
690 | 710 | > cborutil, |
|
691 | 711 | > procutil, |
|
692 | 712 | > stringutil, |
|
693 | 713 | > ) |
|
694 | 714 | > dispatch.initstdio() |
|
695 | 715 | > data = procutil.stdin.read() |
|
696 | 716 | > # our CBOR decoder doesn't support parsing indefinite-length arrays, |
|
697 | 717 | > # but the log output is indefinite stream by nature. |
|
698 | 718 | > assert data[:1] == cborutil.BEGIN_INDEFINITE_ARRAY |
|
699 | 719 | > assert data[-1:] == cborutil.BREAK |
|
700 | 720 | > items = cborutil.decodeall(data[1:-1]) |
|
701 | 721 | > procutil.stdout.write(stringutil.pprint(items, indent=1) + b'\n') |
|
702 | 722 | > EOF |
|
703 | 723 | |
|
704 | 724 | $ hg log -k nosuch -Tcbor | "$PYTHON" "$TESTTMP/decodecborarray.py" |
|
705 | 725 | [] |
|
706 | 726 | |
|
707 | 727 | $ hg log -qr0:1 -Tcbor | "$PYTHON" "$TESTTMP/decodecborarray.py" |
|
708 | 728 | [ |
|
709 | 729 | { |
|
710 | 730 | 'node': '1e4e1b8f71e05681d422154f5421e385fec3454f', |
|
711 | 731 | 'rev': 0 |
|
712 | 732 | }, |
|
713 | 733 | { |
|
714 | 734 | 'node': 'b608e9d1a3f0273ccf70fb85fd6866b3482bf965', |
|
715 | 735 | 'rev': 1 |
|
716 | 736 | } |
|
717 | 737 | ] |
|
718 | 738 | |
|
719 | 739 | $ hg log -vpr . -Tcbor --stat | "$PYTHON" "$TESTTMP/decodecborarray.py" |
|
720 | 740 | [ |
|
721 | 741 | { |
|
722 | 742 | 'bookmarks': [], |
|
723 | 743 | 'branch': 'default', |
|
724 | 744 | 'date': [ |
|
725 | 745 | 1577872860, |
|
726 | 746 | 0 |
|
727 | 747 | ], |
|
728 | 748 | 'desc': 'third', |
|
729 | 749 | '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', |
|
730 | 750 | 'diffstat': ' fourth | 1 +\n second | 1 -\n third | 1 +\n 3 files changed, 2 insertions(+), 1 deletions(-)\n', |
|
731 | 751 | 'files': [ |
|
732 | 752 | 'fourth', |
|
733 | 753 | 'second', |
|
734 | 754 | 'third' |
|
735 | 755 | ], |
|
736 | 756 | 'node': '95c24699272ef57d062b8bccc32c878bf841784a', |
|
737 | 757 | 'parents': [ |
|
738 | 758 | '29114dbae42b9f078cf2714dbe3a86bba8ec7453' |
|
739 | 759 | ], |
|
740 | 760 | 'phase': 'draft', |
|
741 | 761 | 'rev': 8, |
|
742 | 762 | 'tags': [ |
|
743 | 763 | 'tip' |
|
744 | 764 | ], |
|
745 | 765 | 'user': 'test' |
|
746 | 766 | } |
|
747 | 767 | ] |
|
748 | 768 | |
|
749 | 769 | $ hg log -r . -T'cbor(rev, node|short)' | "$PYTHON" "$TESTTMP/decodecborarray.py" |
|
750 | 770 | [ |
|
751 | 771 | { |
|
752 | 772 | 'node': '95c24699272e', |
|
753 | 773 | 'rev': 8 |
|
754 | 774 | } |
|
755 | 775 | ] |
|
756 | 776 | |
|
757 | 777 | $ hg log -r . -T'cbor()' | "$PYTHON" "$TESTTMP/decodecborarray.py" |
|
758 | 778 | [ |
|
759 | 779 | {} |
|
760 | 780 | ] |
|
761 | 781 | |
|
762 | 782 | Test JSON style: |
|
763 | 783 | |
|
764 | 784 | $ hg log -k nosuch -Tjson |
|
765 | 785 | [ |
|
766 | 786 | ] |
|
767 | 787 | |
|
768 | 788 | $ hg log -qr . -Tjson |
|
769 | 789 | [ |
|
770 | 790 | { |
|
771 | 791 | "node": "95c24699272ef57d062b8bccc32c878bf841784a", |
|
772 | 792 | "rev": 8 |
|
773 | 793 | } |
|
774 | 794 | ] |
|
775 | 795 | |
|
776 | 796 | $ hg log -vpr . -Tjson --stat |
|
777 | 797 | [ |
|
778 | 798 | { |
|
779 | 799 | "bookmarks": [], |
|
780 | 800 | "branch": "default", |
|
781 | 801 | "date": [1577872860, 0], |
|
782 | 802 | "desc": "third", |
|
783 | 803 | "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", |
|
784 | 804 | "diffstat": " fourth | 1 +\n second | 1 -\n third | 1 +\n 3 files changed, 2 insertions(+), 1 deletions(-)\n", |
|
785 | 805 | "files": ["fourth", "second", "third"], |
|
786 | 806 | "node": "95c24699272ef57d062b8bccc32c878bf841784a", |
|
787 | 807 | "parents": ["29114dbae42b9f078cf2714dbe3a86bba8ec7453"], |
|
788 | 808 | "phase": "draft", |
|
789 | 809 | "rev": 8, |
|
790 | 810 | "tags": ["tip"], |
|
791 | 811 | "user": "test" |
|
792 | 812 | } |
|
793 | 813 | ] |
|
794 | 814 | |
|
795 | 815 | honor --git but not format-breaking diffopts |
|
796 | 816 | $ hg --config diff.noprefix=True log --git -vpr . -Tjson |
|
797 | 817 | [ |
|
798 | 818 | { |
|
799 | 819 | "bookmarks": [], |
|
800 | 820 | "branch": "default", |
|
801 | 821 | "date": [1577872860, 0], |
|
802 | 822 | "desc": "third", |
|
803 | 823 | "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", |
|
804 | 824 | "files": ["fourth", "second", "third"], |
|
805 | 825 | "node": "95c24699272ef57d062b8bccc32c878bf841784a", |
|
806 | 826 | "parents": ["29114dbae42b9f078cf2714dbe3a86bba8ec7453"], |
|
807 | 827 | "phase": "draft", |
|
808 | 828 | "rev": 8, |
|
809 | 829 | "tags": ["tip"], |
|
810 | 830 | "user": "test" |
|
811 | 831 | } |
|
812 | 832 | ] |
|
813 | 833 | |
|
814 | 834 | $ hg log -T json |
|
815 | 835 | [ |
|
816 | 836 | { |
|
817 | 837 | "bookmarks": [], |
|
818 | 838 | "branch": "default", |
|
819 | 839 | "date": [1577872860, 0], |
|
820 | 840 | "desc": "third", |
|
821 | 841 | "node": "95c24699272ef57d062b8bccc32c878bf841784a", |
|
822 | 842 | "parents": ["29114dbae42b9f078cf2714dbe3a86bba8ec7453"], |
|
823 | 843 | "phase": "draft", |
|
824 | 844 | "rev": 8, |
|
825 | 845 | "tags": ["tip"], |
|
826 | 846 | "user": "test" |
|
827 | 847 | }, |
|
828 | 848 | { |
|
829 | 849 | "bookmarks": [], |
|
830 | 850 | "branch": "default", |
|
831 | 851 | "date": [1000000, 0], |
|
832 | 852 | "desc": "second", |
|
833 | 853 | "node": "29114dbae42b9f078cf2714dbe3a86bba8ec7453", |
|
834 | 854 | "parents": ["0000000000000000000000000000000000000000"], |
|
835 | 855 | "phase": "draft", |
|
836 | 856 | "rev": 7, |
|
837 | 857 | "tags": [], |
|
838 | 858 | "user": "User Name <user@hostname>" |
|
839 | 859 | }, |
|
840 | 860 | { |
|
841 | 861 | "bookmarks": [], |
|
842 | 862 | "branch": "default", |
|
843 | 863 | "date": [1500001, 0], |
|
844 | 864 | "desc": "merge", |
|
845 | 865 | "node": "d41e714fe50d9e4a5f11b4d595d543481b5f980b", |
|
846 | 866 | "parents": ["13207e5a10d9fd28ec424934298e176197f2c67f", "bbe44766e73d5f11ed2177f1838de10c53ef3e74"], |
|
847 | 867 | "phase": "draft", |
|
848 | 868 | "rev": 6, |
|
849 | 869 | "tags": [], |
|
850 | 870 | "user": "person" |
|
851 | 871 | }, |
|
852 | 872 | { |
|
853 | 873 | "bookmarks": [], |
|
854 | 874 | "branch": "default", |
|
855 | 875 | "date": [1500000, 0], |
|
856 | 876 | "desc": "new head", |
|
857 | 877 | "node": "13207e5a10d9fd28ec424934298e176197f2c67f", |
|
858 | 878 | "parents": ["10e46f2dcbf4823578cf180f33ecf0b957964c47"], |
|
859 | 879 | "phase": "draft", |
|
860 | 880 | "rev": 5, |
|
861 | 881 | "tags": [], |
|
862 | 882 | "user": "person" |
|
863 | 883 | }, |
|
864 | 884 | { |
|
865 | 885 | "bookmarks": [], |
|
866 | 886 | "branch": "foo", |
|
867 | 887 | "date": [1400000, 0], |
|
868 | 888 | "desc": "new branch", |
|
869 | 889 | "node": "bbe44766e73d5f11ed2177f1838de10c53ef3e74", |
|
870 | 890 | "parents": ["10e46f2dcbf4823578cf180f33ecf0b957964c47"], |
|
871 | 891 | "phase": "draft", |
|
872 | 892 | "rev": 4, |
|
873 | 893 | "tags": [], |
|
874 | 894 | "user": "person" |
|
875 | 895 | }, |
|
876 | 896 | { |
|
877 | 897 | "bookmarks": [], |
|
878 | 898 | "branch": "default", |
|
879 | 899 | "date": [1300000, 0], |
|
880 | 900 | "desc": "no user, no domain", |
|
881 | 901 | "node": "10e46f2dcbf4823578cf180f33ecf0b957964c47", |
|
882 | 902 | "parents": ["97054abb4ab824450e9164180baf491ae0078465"], |
|
883 | 903 | "phase": "draft", |
|
884 | 904 | "rev": 3, |
|
885 | 905 | "tags": [], |
|
886 | 906 | "user": "person" |
|
887 | 907 | }, |
|
888 | 908 | { |
|
889 | 909 | "bookmarks": [], |
|
890 | 910 | "branch": "default", |
|
891 | 911 | "date": [1200000, 0], |
|
892 | 912 | "desc": "no person", |
|
893 | 913 | "node": "97054abb4ab824450e9164180baf491ae0078465", |
|
894 | 914 | "parents": ["b608e9d1a3f0273ccf70fb85fd6866b3482bf965"], |
|
895 | 915 | "phase": "draft", |
|
896 | 916 | "rev": 2, |
|
897 | 917 | "tags": [], |
|
898 | 918 | "user": "other@place" |
|
899 | 919 | }, |
|
900 | 920 | { |
|
901 | 921 | "bookmarks": [], |
|
902 | 922 | "branch": "default", |
|
903 | 923 | "date": [1100000, 0], |
|
904 | 924 | "desc": "other 1\nother 2\n\nother 3", |
|
905 | 925 | "node": "b608e9d1a3f0273ccf70fb85fd6866b3482bf965", |
|
906 | 926 | "parents": ["1e4e1b8f71e05681d422154f5421e385fec3454f"], |
|
907 | 927 | "phase": "draft", |
|
908 | 928 | "rev": 1, |
|
909 | 929 | "tags": [], |
|
910 | 930 | "user": "A. N. Other <other@place>" |
|
911 | 931 | }, |
|
912 | 932 | { |
|
913 | 933 | "bookmarks": [], |
|
914 | 934 | "branch": "default", |
|
915 | 935 | "date": [1000000, 0], |
|
916 | 936 | "desc": "line 1\nline 2", |
|
917 | 937 | "node": "1e4e1b8f71e05681d422154f5421e385fec3454f", |
|
918 | 938 | "parents": ["0000000000000000000000000000000000000000"], |
|
919 | 939 | "phase": "draft", |
|
920 | 940 | "rev": 0, |
|
921 | 941 | "tags": [], |
|
922 | 942 | "user": "User Name <user@hostname>" |
|
923 | 943 | } |
|
924 | 944 | ] |
|
925 | 945 | |
|
926 | 946 | $ hg heads -v -Tjson |
|
927 | 947 | [ |
|
928 | 948 | { |
|
929 | 949 | "bookmarks": [], |
|
930 | 950 | "branch": "default", |
|
931 | 951 | "date": [1577872860, 0], |
|
932 | 952 | "desc": "third", |
|
933 | 953 | "files": ["fourth", "second", "third"], |
|
934 | 954 | "node": "95c24699272ef57d062b8bccc32c878bf841784a", |
|
935 | 955 | "parents": ["29114dbae42b9f078cf2714dbe3a86bba8ec7453"], |
|
936 | 956 | "phase": "draft", |
|
937 | 957 | "rev": 8, |
|
938 | 958 | "tags": ["tip"], |
|
939 | 959 | "user": "test" |
|
940 | 960 | }, |
|
941 | 961 | { |
|
942 | 962 | "bookmarks": [], |
|
943 | 963 | "branch": "default", |
|
944 | 964 | "date": [1500001, 0], |
|
945 | 965 | "desc": "merge", |
|
946 | 966 | "files": [], |
|
947 | 967 | "node": "d41e714fe50d9e4a5f11b4d595d543481b5f980b", |
|
948 | 968 | "parents": ["13207e5a10d9fd28ec424934298e176197f2c67f", "bbe44766e73d5f11ed2177f1838de10c53ef3e74"], |
|
949 | 969 | "phase": "draft", |
|
950 | 970 | "rev": 6, |
|
951 | 971 | "tags": [], |
|
952 | 972 | "user": "person" |
|
953 | 973 | }, |
|
954 | 974 | { |
|
955 | 975 | "bookmarks": [], |
|
956 | 976 | "branch": "foo", |
|
957 | 977 | "date": [1400000, 0], |
|
958 | 978 | "desc": "new branch", |
|
959 | 979 | "files": [], |
|
960 | 980 | "node": "bbe44766e73d5f11ed2177f1838de10c53ef3e74", |
|
961 | 981 | "parents": ["10e46f2dcbf4823578cf180f33ecf0b957964c47"], |
|
962 | 982 | "phase": "draft", |
|
963 | 983 | "rev": 4, |
|
964 | 984 | "tags": [], |
|
965 | 985 | "user": "person" |
|
966 | 986 | } |
|
967 | 987 | ] |
|
968 | 988 | |
|
969 | 989 | $ hg log --debug -Tjson |
|
970 | 990 | [ |
|
971 | 991 | { |
|
972 | 992 | "added": ["fourth", "third"], |
|
973 | 993 | "bookmarks": [], |
|
974 | 994 | "branch": "default", |
|
975 | 995 | "date": [1577872860, 0], |
|
976 | 996 | "desc": "third", |
|
977 | 997 | "extra": {"branch": "default"}, |
|
978 | 998 | "manifest": "94961b75a2da554b4df6fb599e5bfc7d48de0c64", |
|
979 | 999 | "modified": [], |
|
980 | 1000 | "node": "95c24699272ef57d062b8bccc32c878bf841784a", |
|
981 | 1001 | "parents": ["29114dbae42b9f078cf2714dbe3a86bba8ec7453"], |
|
982 | 1002 | "phase": "draft", |
|
983 | 1003 | "removed": ["second"], |
|
984 | 1004 | "rev": 8, |
|
985 | 1005 | "tags": ["tip"], |
|
986 | 1006 | "user": "test" |
|
987 | 1007 | }, |
|
988 | 1008 | { |
|
989 | 1009 | "added": ["second"], |
|
990 | 1010 | "bookmarks": [], |
|
991 | 1011 | "branch": "default", |
|
992 | 1012 | "date": [1000000, 0], |
|
993 | 1013 | "desc": "second", |
|
994 | 1014 | "extra": {"branch": "default"}, |
|
995 | 1015 | "manifest": "f2dbc354b94e5ec0b4f10680ee0cee816101d0bf", |
|
996 | 1016 | "modified": [], |
|
997 | 1017 | "node": "29114dbae42b9f078cf2714dbe3a86bba8ec7453", |
|
998 | 1018 | "parents": ["0000000000000000000000000000000000000000"], |
|
999 | 1019 | "phase": "draft", |
|
1000 | 1020 | "removed": [], |
|
1001 | 1021 | "rev": 7, |
|
1002 | 1022 | "tags": [], |
|
1003 | 1023 | "user": "User Name <user@hostname>" |
|
1004 | 1024 | }, |
|
1005 | 1025 | { |
|
1006 | 1026 | "added": [], |
|
1007 | 1027 | "bookmarks": [], |
|
1008 | 1028 | "branch": "default", |
|
1009 | 1029 | "date": [1500001, 0], |
|
1010 | 1030 | "desc": "merge", |
|
1011 | 1031 | "extra": {"branch": "default"}, |
|
1012 | 1032 | "manifest": "4dc3def4f9b4c6e8de820f6ee74737f91e96a216", |
|
1013 | 1033 | "modified": [], |
|
1014 | 1034 | "node": "d41e714fe50d9e4a5f11b4d595d543481b5f980b", |
|
1015 | 1035 | "parents": ["13207e5a10d9fd28ec424934298e176197f2c67f", "bbe44766e73d5f11ed2177f1838de10c53ef3e74"], |
|
1016 | 1036 | "phase": "draft", |
|
1017 | 1037 | "removed": [], |
|
1018 | 1038 | "rev": 6, |
|
1019 | 1039 | "tags": [], |
|
1020 | 1040 | "user": "person" |
|
1021 | 1041 | }, |
|
1022 | 1042 | { |
|
1023 | 1043 | "added": ["d"], |
|
1024 | 1044 | "bookmarks": [], |
|
1025 | 1045 | "branch": "default", |
|
1026 | 1046 | "date": [1500000, 0], |
|
1027 | 1047 | "desc": "new head", |
|
1028 | 1048 | "extra": {"branch": "default"}, |
|
1029 | 1049 | "manifest": "4dc3def4f9b4c6e8de820f6ee74737f91e96a216", |
|
1030 | 1050 | "modified": [], |
|
1031 | 1051 | "node": "13207e5a10d9fd28ec424934298e176197f2c67f", |
|
1032 | 1052 | "parents": ["10e46f2dcbf4823578cf180f33ecf0b957964c47"], |
|
1033 | 1053 | "phase": "draft", |
|
1034 | 1054 | "removed": [], |
|
1035 | 1055 | "rev": 5, |
|
1036 | 1056 | "tags": [], |
|
1037 | 1057 | "user": "person" |
|
1038 | 1058 | }, |
|
1039 | 1059 | { |
|
1040 | 1060 | "added": [], |
|
1041 | 1061 | "bookmarks": [], |
|
1042 | 1062 | "branch": "foo", |
|
1043 | 1063 | "date": [1400000, 0], |
|
1044 | 1064 | "desc": "new branch", |
|
1045 | 1065 | "extra": {"branch": "foo"}, |
|
1046 | 1066 | "manifest": "cb5a1327723bada42f117e4c55a303246eaf9ccc", |
|
1047 | 1067 | "modified": [], |
|
1048 | 1068 | "node": "bbe44766e73d5f11ed2177f1838de10c53ef3e74", |
|
1049 | 1069 | "parents": ["10e46f2dcbf4823578cf180f33ecf0b957964c47"], |
|
1050 | 1070 | "phase": "draft", |
|
1051 | 1071 | "removed": [], |
|
1052 | 1072 | "rev": 4, |
|
1053 | 1073 | "tags": [], |
|
1054 | 1074 | "user": "person" |
|
1055 | 1075 | }, |
|
1056 | 1076 | { |
|
1057 | 1077 | "added": [], |
|
1058 | 1078 | "bookmarks": [], |
|
1059 | 1079 | "branch": "default", |
|
1060 | 1080 | "date": [1300000, 0], |
|
1061 | 1081 | "desc": "no user, no domain", |
|
1062 | 1082 | "extra": {"branch": "default"}, |
|
1063 | 1083 | "manifest": "cb5a1327723bada42f117e4c55a303246eaf9ccc", |
|
1064 | 1084 | "modified": ["c"], |
|
1065 | 1085 | "node": "10e46f2dcbf4823578cf180f33ecf0b957964c47", |
|
1066 | 1086 | "parents": ["97054abb4ab824450e9164180baf491ae0078465"], |
|
1067 | 1087 | "phase": "draft", |
|
1068 | 1088 | "removed": [], |
|
1069 | 1089 | "rev": 3, |
|
1070 | 1090 | "tags": [], |
|
1071 | 1091 | "user": "person" |
|
1072 | 1092 | }, |
|
1073 | 1093 | { |
|
1074 | 1094 | "added": ["c"], |
|
1075 | 1095 | "bookmarks": [], |
|
1076 | 1096 | "branch": "default", |
|
1077 | 1097 | "date": [1200000, 0], |
|
1078 | 1098 | "desc": "no person", |
|
1079 | 1099 | "extra": {"branch": "default"}, |
|
1080 | 1100 | "manifest": "6e0e82995c35d0d57a52aca8da4e56139e06b4b1", |
|
1081 | 1101 | "modified": [], |
|
1082 | 1102 | "node": "97054abb4ab824450e9164180baf491ae0078465", |
|
1083 | 1103 | "parents": ["b608e9d1a3f0273ccf70fb85fd6866b3482bf965"], |
|
1084 | 1104 | "phase": "draft", |
|
1085 | 1105 | "removed": [], |
|
1086 | 1106 | "rev": 2, |
|
1087 | 1107 | "tags": [], |
|
1088 | 1108 | "user": "other@place" |
|
1089 | 1109 | }, |
|
1090 | 1110 | { |
|
1091 | 1111 | "added": ["b"], |
|
1092 | 1112 | "bookmarks": [], |
|
1093 | 1113 | "branch": "default", |
|
1094 | 1114 | "date": [1100000, 0], |
|
1095 | 1115 | "desc": "other 1\nother 2\n\nother 3", |
|
1096 | 1116 | "extra": {"branch": "default"}, |
|
1097 | 1117 | "manifest": "4e8d705b1e53e3f9375e0e60dc7b525d8211fe55", |
|
1098 | 1118 | "modified": [], |
|
1099 | 1119 | "node": "b608e9d1a3f0273ccf70fb85fd6866b3482bf965", |
|
1100 | 1120 | "parents": ["1e4e1b8f71e05681d422154f5421e385fec3454f"], |
|
1101 | 1121 | "phase": "draft", |
|
1102 | 1122 | "removed": [], |
|
1103 | 1123 | "rev": 1, |
|
1104 | 1124 | "tags": [], |
|
1105 | 1125 | "user": "A. N. Other <other@place>" |
|
1106 | 1126 | }, |
|
1107 | 1127 | { |
|
1108 | 1128 | "added": ["a"], |
|
1109 | 1129 | "bookmarks": [], |
|
1110 | 1130 | "branch": "default", |
|
1111 | 1131 | "date": [1000000, 0], |
|
1112 | 1132 | "desc": "line 1\nline 2", |
|
1113 | 1133 | "extra": {"branch": "default"}, |
|
1114 | 1134 | "manifest": "a0c8bcbbb45c63b90b70ad007bf38961f64f2af0", |
|
1115 | 1135 | "modified": [], |
|
1116 | 1136 | "node": "1e4e1b8f71e05681d422154f5421e385fec3454f", |
|
1117 | 1137 | "parents": ["0000000000000000000000000000000000000000"], |
|
1118 | 1138 | "phase": "draft", |
|
1119 | 1139 | "removed": [], |
|
1120 | 1140 | "rev": 0, |
|
1121 | 1141 | "tags": [], |
|
1122 | 1142 | "user": "User Name <user@hostname>" |
|
1123 | 1143 | } |
|
1124 | 1144 | ] |
|
1125 | 1145 | |
|
1126 | 1146 | $ hg log -l2 -T'json(rev, parents)' |
|
1127 | 1147 | [ |
|
1128 | 1148 | {"parents": ["29114dbae42b9f078cf2714dbe3a86bba8ec7453"], "rev": 8}, |
|
1129 | 1149 | {"parents": ["0000000000000000000000000000000000000000"], "rev": 7} |
|
1130 | 1150 | ] |
|
1131 | 1151 | |
|
1132 | 1152 | $ hg log -qr. -T'json(rev, parents)' |
|
1133 | 1153 | [ |
|
1134 | 1154 | {"parents": ["29114dbae42b9f078cf2714dbe3a86bba8ec7453"], "rev": 8} |
|
1135 | 1155 | ] |
|
1136 | 1156 | |
|
1137 | 1157 | $ hg log -r. -T'json(diff)' |
|
1138 | 1158 | [ |
|
1139 | 1159 | {"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"} |
|
1140 | 1160 | ] |
|
1141 | 1161 | |
|
1142 | 1162 | $ hg log -r. -T'json(diffstat)' |
|
1143 | 1163 | [ |
|
1144 | 1164 | {"diffstat": " fourth | 1 +\n second | 1 -\n third | 1 +\n 3 files changed, 2 insertions(+), 1 deletions(-)\n"} |
|
1145 | 1165 | ] |
|
1146 | 1166 | |
|
1147 | 1167 | $ hg log -r. -T'json(manifest)' |
|
1148 | 1168 | [ |
|
1149 | 1169 | {"manifest": "94961b75a2da554b4df6fb599e5bfc7d48de0c64"} |
|
1150 | 1170 | ] |
|
1151 | 1171 | |
|
1152 | 1172 | $ hg log -r. -T'json(extra)' |
|
1153 | 1173 | [ |
|
1154 | 1174 | {"extra": {"branch": "default"}} |
|
1155 | 1175 | ] |
|
1156 | 1176 | |
|
1157 | 1177 | $ hg log -r3 -T'json(modified)' |
|
1158 | 1178 | [ |
|
1159 | 1179 | {"modified": ["c"]} |
|
1160 | 1180 | ] |
|
1161 | 1181 | |
|
1162 | 1182 | $ hg log -r. -T'json(added)' |
|
1163 | 1183 | [ |
|
1164 | 1184 | {"added": ["fourth", "third"]} |
|
1165 | 1185 | ] |
|
1166 | 1186 | |
|
1167 | 1187 | $ hg log -r. -T'json(removed)' |
|
1168 | 1188 | [ |
|
1169 | 1189 | {"removed": ["second"]} |
|
1170 | 1190 | ] |
|
1171 | 1191 | |
|
1172 | 1192 | $ hg log -r. -T'json(files)' |
|
1173 | 1193 | [ |
|
1174 | 1194 | {"files": ["fourth", "second", "third"]} |
|
1175 | 1195 | ] |
|
1176 | 1196 | |
|
1177 | 1197 | --copies is the exception. copies dict is built only when --copies switch |
|
1178 | 1198 | is on: |
|
1179 | 1199 | |
|
1180 | 1200 | $ hg log -r'.^:' -T'json(copies)' --copies |
|
1181 | 1201 | [ |
|
1182 | 1202 | {"copies": {}}, |
|
1183 | 1203 | {"copies": {"fourth": "second"}} |
|
1184 | 1204 | ] |
|
1185 | 1205 | |
|
1186 | 1206 | $ hg log -r. -T'json()' |
|
1187 | 1207 | [ |
|
1188 | 1208 | {} |
|
1189 | 1209 | ] |
|
1190 | 1210 | |
|
1191 | 1211 | Other unsupported formatter styles: |
|
1192 | 1212 | |
|
1193 | 1213 | $ hg log -qr . -Tpickle |
|
1194 | 1214 | abort: "pickle" not in template map |
|
1195 | 1215 | [255] |
|
1196 | 1216 | $ hg log -qr . -Tdebug |
|
1197 | 1217 | abort: "debug" not in template map |
|
1198 | 1218 | [255] |
|
1199 | 1219 | |
|
1200 | 1220 | Unparsable function-style references: |
|
1201 | 1221 | |
|
1202 | 1222 | $ hg log -qr . -T'json(-)' |
|
1203 | 1223 | hg: parse error at 6: not a prefix: ) |
|
1204 | 1224 | (json(-) |
|
1205 | 1225 | ^ here) |
|
1206 | 1226 | [255] |
|
1207 | 1227 | |
|
1208 | 1228 | For backward compatibility, the following examples are not parsed as |
|
1209 | 1229 | function-style references: |
|
1210 | 1230 | |
|
1211 | 1231 | $ hg log -qr . -T'cbor(rev' |
|
1212 | 1232 | cbor(rev (no-eol) |
|
1213 | 1233 | $ hg log -qr . -T'json (rev)' |
|
1214 | 1234 | json (rev) (no-eol) |
|
1215 | 1235 | $ hg log -qr . -T'json(x="{rev}")' |
|
1216 | 1236 | json(x="8") (no-eol) |
|
1217 | 1237 | |
|
1218 | 1238 | Error if style not readable: |
|
1219 | 1239 | |
|
1220 | 1240 | #if unix-permissions no-root |
|
1221 | 1241 | $ touch q |
|
1222 | 1242 | $ chmod 0 q |
|
1223 | 1243 | $ hg log --style ./q |
|
1224 | 1244 | abort: Permission denied: './q' |
|
1225 | 1245 | [255] |
|
1226 | 1246 | #endif |
|
1227 | 1247 | |
|
1228 | 1248 | Error if no style: |
|
1229 | 1249 | |
|
1230 | 1250 | $ hg log --style notexist |
|
1231 | 1251 | abort: style 'notexist' not found |
|
1232 | 1252 | (available styles: bisect, changelog, compact, default, phases, show, status, xml) |
|
1233 | 1253 | [255] |
|
1234 | 1254 | |
|
1235 | 1255 | $ hg log -T list |
|
1236 | 1256 | available styles: bisect, changelog, compact, default, phases, show, status, xml |
|
1237 | 1257 | abort: specify a template |
|
1238 | 1258 | [255] |
|
1239 | 1259 | |
|
1240 | 1260 | Error if style missing key: |
|
1241 | 1261 | |
|
1242 | 1262 | $ echo 'q = q' > t |
|
1243 | 1263 | $ hg log --style ./t |
|
1244 | 1264 | abort: "changeset" not in template map |
|
1245 | 1265 | [255] |
|
1246 | 1266 | |
|
1247 | 1267 | Error if style missing value: |
|
1248 | 1268 | |
|
1249 | 1269 | $ echo 'changeset =' > t |
|
1250 | 1270 | $ hg log --style t |
|
1251 | 1271 | hg: parse error at t:1: missing value |
|
1252 | 1272 | [255] |
|
1253 | 1273 | |
|
1254 | 1274 | Error if include fails: |
|
1255 | 1275 | |
|
1256 | 1276 | $ echo 'changeset = q' >> t |
|
1257 | 1277 | #if unix-permissions no-root |
|
1258 | 1278 | $ hg log --style ./t |
|
1259 | 1279 | abort: template file ./q: Permission denied |
|
1260 | 1280 | [255] |
|
1261 | 1281 | $ rm -f q |
|
1262 | 1282 | #endif |
|
1263 | 1283 | |
|
1264 | 1284 | Include works: |
|
1265 | 1285 | |
|
1266 | 1286 | $ echo '{rev}' > q |
|
1267 | 1287 | $ hg log --style ./t |
|
1268 | 1288 | 8 |
|
1269 | 1289 | 7 |
|
1270 | 1290 | 6 |
|
1271 | 1291 | 5 |
|
1272 | 1292 | 4 |
|
1273 | 1293 | 3 |
|
1274 | 1294 | 2 |
|
1275 | 1295 | 1 |
|
1276 | 1296 | 0 |
|
1277 | 1297 | |
|
1278 | 1298 | $ hg phase -r 5 --public |
|
1279 | 1299 | $ hg phase -r 7 --secret --force |
|
1280 | 1300 | |
|
1281 | 1301 | Missing non-standard names give no error (backward compatibility): |
|
1282 | 1302 | |
|
1283 | 1303 | $ echo "changeset = '{c}'" > t |
|
1284 | 1304 | $ hg log --style ./t |
|
1285 | 1305 | |
|
1286 | 1306 | Defining non-standard name works: |
|
1287 | 1307 | |
|
1288 | 1308 | $ cat <<EOF > t |
|
1289 | 1309 | > changeset = '{c}' |
|
1290 | 1310 | > c = q |
|
1291 | 1311 | > EOF |
|
1292 | 1312 | $ hg log --style ./t |
|
1293 | 1313 | 8 |
|
1294 | 1314 | 7 |
|
1295 | 1315 | 6 |
|
1296 | 1316 | 5 |
|
1297 | 1317 | 4 |
|
1298 | 1318 | 3 |
|
1299 | 1319 | 2 |
|
1300 | 1320 | 1 |
|
1301 | 1321 | 0 |
|
1302 | 1322 | |
|
1303 | 1323 | ui.style works: |
|
1304 | 1324 | |
|
1305 | 1325 | $ echo '[ui]' > .hg/hgrc |
|
1306 | 1326 | $ echo 'style = t' >> .hg/hgrc |
|
1307 | 1327 | $ hg log |
|
1308 | 1328 | 8 |
|
1309 | 1329 | 7 |
|
1310 | 1330 | 6 |
|
1311 | 1331 | 5 |
|
1312 | 1332 | 4 |
|
1313 | 1333 | 3 |
|
1314 | 1334 | 2 |
|
1315 | 1335 | 1 |
|
1316 | 1336 | 0 |
|
1317 | 1337 | |
|
1318 | 1338 | Issue338: |
|
1319 | 1339 | |
|
1320 | 1340 | $ hg log --style=changelog > changelog |
|
1321 | 1341 | |
|
1322 | 1342 | $ cat changelog |
|
1323 | 1343 | 2020-01-01 test <test> |
|
1324 | 1344 | |
|
1325 | 1345 | * fourth, second, third: |
|
1326 | 1346 | third |
|
1327 | 1347 | [95c24699272e] [tip] |
|
1328 | 1348 | |
|
1329 | 1349 | 1970-01-12 User Name <user@hostname> |
|
1330 | 1350 | |
|
1331 | 1351 | * second: |
|
1332 | 1352 | second |
|
1333 | 1353 | [29114dbae42b] |
|
1334 | 1354 | |
|
1335 | 1355 | 1970-01-18 person <person> |
|
1336 | 1356 | |
|
1337 | 1357 | * merge |
|
1338 | 1358 | [d41e714fe50d] |
|
1339 | 1359 | |
|
1340 | 1360 | * d: |
|
1341 | 1361 | new head |
|
1342 | 1362 | [13207e5a10d9] |
|
1343 | 1363 | |
|
1344 | 1364 | 1970-01-17 person <person> |
|
1345 | 1365 | |
|
1346 | 1366 | * new branch |
|
1347 | 1367 | [bbe44766e73d] <foo> |
|
1348 | 1368 | |
|
1349 | 1369 | 1970-01-16 person <person> |
|
1350 | 1370 | |
|
1351 | 1371 | * c: |
|
1352 | 1372 | no user, no domain |
|
1353 | 1373 | [10e46f2dcbf4] |
|
1354 | 1374 | |
|
1355 | 1375 | 1970-01-14 other <other@place> |
|
1356 | 1376 | |
|
1357 | 1377 | * c: |
|
1358 | 1378 | no person |
|
1359 | 1379 | [97054abb4ab8] |
|
1360 | 1380 | |
|
1361 | 1381 | 1970-01-13 A. N. Other <other@place> |
|
1362 | 1382 | |
|
1363 | 1383 | * b: |
|
1364 | 1384 | other 1 other 2 |
|
1365 | 1385 | |
|
1366 | 1386 | other 3 |
|
1367 | 1387 | [b608e9d1a3f0] |
|
1368 | 1388 | |
|
1369 | 1389 | 1970-01-12 User Name <user@hostname> |
|
1370 | 1390 | |
|
1371 | 1391 | * a: |
|
1372 | 1392 | line 1 line 2 |
|
1373 | 1393 | [1e4e1b8f71e0] |
|
1374 | 1394 | |
|
1375 | 1395 | |
|
1376 | 1396 | Issue2130: xml output for 'hg heads' is malformed |
|
1377 | 1397 | |
|
1378 | 1398 | $ hg heads --style changelog |
|
1379 | 1399 | 2020-01-01 test <test> |
|
1380 | 1400 | |
|
1381 | 1401 | * fourth, second, third: |
|
1382 | 1402 | third |
|
1383 | 1403 | [95c24699272e] [tip] |
|
1384 | 1404 | |
|
1385 | 1405 | 1970-01-18 person <person> |
|
1386 | 1406 | |
|
1387 | 1407 | * merge |
|
1388 | 1408 | [d41e714fe50d] |
|
1389 | 1409 | |
|
1390 | 1410 | 1970-01-17 person <person> |
|
1391 | 1411 | |
|
1392 | 1412 | * new branch |
|
1393 | 1413 | [bbe44766e73d] <foo> |
|
1394 | 1414 | |
|
1395 | 1415 | |
|
1396 | 1416 | Add a dummy commit to make up for the instability of the above: |
|
1397 | 1417 | |
|
1398 | 1418 | $ echo a > a |
|
1399 | 1419 | $ hg add a |
|
1400 | 1420 | $ hg ci -m future |
|
1401 | 1421 | |
|
1402 | 1422 | Add a commit that does all possible modifications at once |
|
1403 | 1423 | |
|
1404 | 1424 | $ echo modify >> third |
|
1405 | 1425 | $ touch b |
|
1406 | 1426 | $ hg add b |
|
1407 | 1427 | $ hg mv fourth fifth |
|
1408 | 1428 | $ hg rm a |
|
1409 | 1429 | $ hg ci -m "Modify, add, remove, rename" |
|
1410 | 1430 | |
|
1411 | 1431 | Check the status template |
|
1412 | 1432 | |
|
1413 | 1433 | $ cat <<EOF >> $HGRCPATH |
|
1414 | 1434 | > [extensions] |
|
1415 | 1435 | > color= |
|
1416 | 1436 | > EOF |
|
1417 | 1437 | |
|
1418 | 1438 | $ hg log -T status -r 10 |
|
1419 | 1439 | changeset: 10:0f9759ec227a |
|
1420 | 1440 | tag: tip |
|
1421 | 1441 | user: test |
|
1422 | 1442 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1423 | 1443 | summary: Modify, add, remove, rename |
|
1424 | 1444 | files: |
|
1425 | 1445 | M third |
|
1426 | 1446 | A b |
|
1427 | 1447 | A fifth |
|
1428 | 1448 | R a |
|
1429 | 1449 | R fourth |
|
1430 | 1450 | |
|
1431 | 1451 | $ hg log -T status -C -r 10 |
|
1432 | 1452 | changeset: 10:0f9759ec227a |
|
1433 | 1453 | tag: tip |
|
1434 | 1454 | user: test |
|
1435 | 1455 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1436 | 1456 | summary: Modify, add, remove, rename |
|
1437 | 1457 | files: |
|
1438 | 1458 | M third |
|
1439 | 1459 | A b |
|
1440 | 1460 | A fifth |
|
1441 | 1461 | fourth |
|
1442 | 1462 | R a |
|
1443 | 1463 | R fourth |
|
1444 | 1464 | |
|
1445 | 1465 | $ hg log -T status -C -r 10 -v |
|
1446 | 1466 | changeset: 10:0f9759ec227a |
|
1447 | 1467 | tag: tip |
|
1448 | 1468 | user: test |
|
1449 | 1469 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1450 | 1470 | description: |
|
1451 | 1471 | Modify, add, remove, rename |
|
1452 | 1472 | |
|
1453 | 1473 | files: |
|
1454 | 1474 | M third |
|
1455 | 1475 | A b |
|
1456 | 1476 | A fifth |
|
1457 | 1477 | fourth |
|
1458 | 1478 | R a |
|
1459 | 1479 | R fourth |
|
1460 | 1480 | |
|
1461 | 1481 | $ hg log -T status -C -r 10 --debug |
|
1462 | 1482 | changeset: 10:0f9759ec227a4859c2014a345cd8a859022b7c6c |
|
1463 | 1483 | tag: tip |
|
1464 | 1484 | phase: secret |
|
1465 | 1485 | parent: 9:bf9dfba36635106d6a73ccc01e28b762da60e066 |
|
1466 | 1486 | parent: -1:0000000000000000000000000000000000000000 |
|
1467 | 1487 | manifest: 8:89dd546f2de0a9d6d664f58d86097eb97baba567 |
|
1468 | 1488 | user: test |
|
1469 | 1489 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1470 | 1490 | extra: branch=default |
|
1471 | 1491 | description: |
|
1472 | 1492 | Modify, add, remove, rename |
|
1473 | 1493 | |
|
1474 | 1494 | files: |
|
1475 | 1495 | M third |
|
1476 | 1496 | A b |
|
1477 | 1497 | A fifth |
|
1478 | 1498 | fourth |
|
1479 | 1499 | R a |
|
1480 | 1500 | R fourth |
|
1481 | 1501 | |
|
1482 | 1502 | $ hg log -T status -C -r 10 --quiet |
|
1483 | 1503 | 10:0f9759ec227a |
|
1484 | 1504 | $ hg --color=debug log -T status -r 10 |
|
1485 | 1505 | [log.changeset changeset.secret|changeset: 10:0f9759ec227a] |
|
1486 | 1506 | [log.tag|tag: tip] |
|
1487 | 1507 | [log.user|user: test] |
|
1488 | 1508 | [log.date|date: Thu Jan 01 00:00:00 1970 +0000] |
|
1489 | 1509 | [log.summary|summary: Modify, add, remove, rename] |
|
1490 | 1510 | [ui.note log.files|files:] |
|
1491 | 1511 | [status.modified|M third] |
|
1492 | 1512 | [status.added|A b] |
|
1493 | 1513 | [status.added|A fifth] |
|
1494 | 1514 | [status.removed|R a] |
|
1495 | 1515 | [status.removed|R fourth] |
|
1496 | 1516 | |
|
1497 | 1517 | $ hg --color=debug log -T status -C -r 10 |
|
1498 | 1518 | [log.changeset changeset.secret|changeset: 10:0f9759ec227a] |
|
1499 | 1519 | [log.tag|tag: tip] |
|
1500 | 1520 | [log.user|user: test] |
|
1501 | 1521 | [log.date|date: Thu Jan 01 00:00:00 1970 +0000] |
|
1502 | 1522 | [log.summary|summary: Modify, add, remove, rename] |
|
1503 | 1523 | [ui.note log.files|files:] |
|
1504 | 1524 | [status.modified|M third] |
|
1505 | 1525 | [status.added|A b] |
|
1506 | 1526 | [status.added|A fifth] |
|
1507 | 1527 | [status.copied| fourth] |
|
1508 | 1528 | [status.removed|R a] |
|
1509 | 1529 | [status.removed|R fourth] |
|
1510 | 1530 | |
|
1511 | 1531 | $ hg --color=debug log -T status -C -r 10 -v |
|
1512 | 1532 | [log.changeset changeset.secret|changeset: 10:0f9759ec227a] |
|
1513 | 1533 | [log.tag|tag: tip] |
|
1514 | 1534 | [log.user|user: test] |
|
1515 | 1535 | [log.date|date: Thu Jan 01 00:00:00 1970 +0000] |
|
1516 | 1536 | [ui.note log.description|description:] |
|
1517 | 1537 | [ui.note log.description|Modify, add, remove, rename] |
|
1518 | 1538 | |
|
1519 | 1539 | [ui.note log.files|files:] |
|
1520 | 1540 | [status.modified|M third] |
|
1521 | 1541 | [status.added|A b] |
|
1522 | 1542 | [status.added|A fifth] |
|
1523 | 1543 | [status.copied| fourth] |
|
1524 | 1544 | [status.removed|R a] |
|
1525 | 1545 | [status.removed|R fourth] |
|
1526 | 1546 | |
|
1527 | 1547 | $ hg --color=debug log -T status -C -r 10 --debug |
|
1528 | 1548 | [log.changeset changeset.secret|changeset: 10:0f9759ec227a4859c2014a345cd8a859022b7c6c] |
|
1529 | 1549 | [log.tag|tag: tip] |
|
1530 | 1550 | [log.phase|phase: secret] |
|
1531 | 1551 | [log.parent changeset.secret|parent: 9:bf9dfba36635106d6a73ccc01e28b762da60e066] |
|
1532 | 1552 | [log.parent changeset.public|parent: -1:0000000000000000000000000000000000000000] |
|
1533 | 1553 | [ui.debug log.manifest|manifest: 8:89dd546f2de0a9d6d664f58d86097eb97baba567] |
|
1534 | 1554 | [log.user|user: test] |
|
1535 | 1555 | [log.date|date: Thu Jan 01 00:00:00 1970 +0000] |
|
1536 | 1556 | [ui.debug log.extra|extra: branch=default] |
|
1537 | 1557 | [ui.note log.description|description:] |
|
1538 | 1558 | [ui.note log.description|Modify, add, remove, rename] |
|
1539 | 1559 | |
|
1540 | 1560 | [ui.note log.files|files:] |
|
1541 | 1561 | [status.modified|M third] |
|
1542 | 1562 | [status.added|A b] |
|
1543 | 1563 | [status.added|A fifth] |
|
1544 | 1564 | [status.copied| fourth] |
|
1545 | 1565 | [status.removed|R a] |
|
1546 | 1566 | [status.removed|R fourth] |
|
1547 | 1567 | |
|
1548 | 1568 | $ hg --color=debug log -T status -C -r 10 --quiet |
|
1549 | 1569 | [log.node|10:0f9759ec227a] |
|
1550 | 1570 | |
|
1551 | 1571 | Check the bisect template |
|
1552 | 1572 | |
|
1553 | 1573 | $ hg bisect -g 1 |
|
1554 | 1574 | $ hg bisect -b 3 --noupdate |
|
1555 | 1575 | Testing changeset 2:97054abb4ab8 (2 changesets remaining, ~1 tests) |
|
1556 | 1576 | $ hg log -T bisect -r 0:4 |
|
1557 | 1577 | changeset: 0:1e4e1b8f71e0 |
|
1558 | 1578 | bisect: good (implicit) |
|
1559 | 1579 | user: User Name <user@hostname> |
|
1560 | 1580 | date: Mon Jan 12 13:46:40 1970 +0000 |
|
1561 | 1581 | summary: line 1 |
|
1562 | 1582 | |
|
1563 | 1583 | changeset: 1:b608e9d1a3f0 |
|
1564 | 1584 | bisect: good |
|
1565 | 1585 | user: A. N. Other <other@place> |
|
1566 | 1586 | date: Tue Jan 13 17:33:20 1970 +0000 |
|
1567 | 1587 | summary: other 1 |
|
1568 | 1588 | |
|
1569 | 1589 | changeset: 2:97054abb4ab8 |
|
1570 | 1590 | bisect: untested |
|
1571 | 1591 | user: other@place |
|
1572 | 1592 | date: Wed Jan 14 21:20:00 1970 +0000 |
|
1573 | 1593 | summary: no person |
|
1574 | 1594 | |
|
1575 | 1595 | changeset: 3:10e46f2dcbf4 |
|
1576 | 1596 | bisect: bad |
|
1577 | 1597 | user: person |
|
1578 | 1598 | date: Fri Jan 16 01:06:40 1970 +0000 |
|
1579 | 1599 | summary: no user, no domain |
|
1580 | 1600 | |
|
1581 | 1601 | changeset: 4:bbe44766e73d |
|
1582 | 1602 | bisect: bad (implicit) |
|
1583 | 1603 | branch: foo |
|
1584 | 1604 | user: person |
|
1585 | 1605 | date: Sat Jan 17 04:53:20 1970 +0000 |
|
1586 | 1606 | summary: new branch |
|
1587 | 1607 | |
|
1588 | 1608 | $ hg log --debug -T bisect -r 0:4 |
|
1589 | 1609 | changeset: 0:1e4e1b8f71e05681d422154f5421e385fec3454f |
|
1590 | 1610 | bisect: good (implicit) |
|
1591 | 1611 | phase: public |
|
1592 | 1612 | parent: -1:0000000000000000000000000000000000000000 |
|
1593 | 1613 | parent: -1:0000000000000000000000000000000000000000 |
|
1594 | 1614 | manifest: 0:a0c8bcbbb45c63b90b70ad007bf38961f64f2af0 |
|
1595 | 1615 | user: User Name <user@hostname> |
|
1596 | 1616 | date: Mon Jan 12 13:46:40 1970 +0000 |
|
1597 | 1617 | files+: a |
|
1598 | 1618 | extra: branch=default |
|
1599 | 1619 | description: |
|
1600 | 1620 | line 1 |
|
1601 | 1621 | line 2 |
|
1602 | 1622 | |
|
1603 | 1623 | |
|
1604 | 1624 | changeset: 1:b608e9d1a3f0273ccf70fb85fd6866b3482bf965 |
|
1605 | 1625 | bisect: good |
|
1606 | 1626 | phase: public |
|
1607 | 1627 | parent: 0:1e4e1b8f71e05681d422154f5421e385fec3454f |
|
1608 | 1628 | parent: -1:0000000000000000000000000000000000000000 |
|
1609 | 1629 | manifest: 1:4e8d705b1e53e3f9375e0e60dc7b525d8211fe55 |
|
1610 | 1630 | user: A. N. Other <other@place> |
|
1611 | 1631 | date: Tue Jan 13 17:33:20 1970 +0000 |
|
1612 | 1632 | files+: b |
|
1613 | 1633 | extra: branch=default |
|
1614 | 1634 | description: |
|
1615 | 1635 | other 1 |
|
1616 | 1636 | other 2 |
|
1617 | 1637 | |
|
1618 | 1638 | other 3 |
|
1619 | 1639 | |
|
1620 | 1640 | |
|
1621 | 1641 | changeset: 2:97054abb4ab824450e9164180baf491ae0078465 |
|
1622 | 1642 | bisect: untested |
|
1623 | 1643 | phase: public |
|
1624 | 1644 | parent: 1:b608e9d1a3f0273ccf70fb85fd6866b3482bf965 |
|
1625 | 1645 | parent: -1:0000000000000000000000000000000000000000 |
|
1626 | 1646 | manifest: 2:6e0e82995c35d0d57a52aca8da4e56139e06b4b1 |
|
1627 | 1647 | user: other@place |
|
1628 | 1648 | date: Wed Jan 14 21:20:00 1970 +0000 |
|
1629 | 1649 | files+: c |
|
1630 | 1650 | extra: branch=default |
|
1631 | 1651 | description: |
|
1632 | 1652 | no person |
|
1633 | 1653 | |
|
1634 | 1654 | |
|
1635 | 1655 | changeset: 3:10e46f2dcbf4823578cf180f33ecf0b957964c47 |
|
1636 | 1656 | bisect: bad |
|
1637 | 1657 | phase: public |
|
1638 | 1658 | parent: 2:97054abb4ab824450e9164180baf491ae0078465 |
|
1639 | 1659 | parent: -1:0000000000000000000000000000000000000000 |
|
1640 | 1660 | manifest: 3:cb5a1327723bada42f117e4c55a303246eaf9ccc |
|
1641 | 1661 | user: person |
|
1642 | 1662 | date: Fri Jan 16 01:06:40 1970 +0000 |
|
1643 | 1663 | files: c |
|
1644 | 1664 | extra: branch=default |
|
1645 | 1665 | description: |
|
1646 | 1666 | no user, no domain |
|
1647 | 1667 | |
|
1648 | 1668 | |
|
1649 | 1669 | changeset: 4:bbe44766e73d5f11ed2177f1838de10c53ef3e74 |
|
1650 | 1670 | bisect: bad (implicit) |
|
1651 | 1671 | branch: foo |
|
1652 | 1672 | phase: draft |
|
1653 | 1673 | parent: 3:10e46f2dcbf4823578cf180f33ecf0b957964c47 |
|
1654 | 1674 | parent: -1:0000000000000000000000000000000000000000 |
|
1655 | 1675 | manifest: 3:cb5a1327723bada42f117e4c55a303246eaf9ccc |
|
1656 | 1676 | user: person |
|
1657 | 1677 | date: Sat Jan 17 04:53:20 1970 +0000 |
|
1658 | 1678 | extra: branch=foo |
|
1659 | 1679 | description: |
|
1660 | 1680 | new branch |
|
1661 | 1681 | |
|
1662 | 1682 | |
|
1663 | 1683 | $ hg log -v -T bisect -r 0:4 |
|
1664 | 1684 | changeset: 0:1e4e1b8f71e0 |
|
1665 | 1685 | bisect: good (implicit) |
|
1666 | 1686 | user: User Name <user@hostname> |
|
1667 | 1687 | date: Mon Jan 12 13:46:40 1970 +0000 |
|
1668 | 1688 | files: a |
|
1669 | 1689 | description: |
|
1670 | 1690 | line 1 |
|
1671 | 1691 | line 2 |
|
1672 | 1692 | |
|
1673 | 1693 | |
|
1674 | 1694 | changeset: 1:b608e9d1a3f0 |
|
1675 | 1695 | bisect: good |
|
1676 | 1696 | user: A. N. Other <other@place> |
|
1677 | 1697 | date: Tue Jan 13 17:33:20 1970 +0000 |
|
1678 | 1698 | files: b |
|
1679 | 1699 | description: |
|
1680 | 1700 | other 1 |
|
1681 | 1701 | other 2 |
|
1682 | 1702 | |
|
1683 | 1703 | other 3 |
|
1684 | 1704 | |
|
1685 | 1705 | |
|
1686 | 1706 | changeset: 2:97054abb4ab8 |
|
1687 | 1707 | bisect: untested |
|
1688 | 1708 | user: other@place |
|
1689 | 1709 | date: Wed Jan 14 21:20:00 1970 +0000 |
|
1690 | 1710 | files: c |
|
1691 | 1711 | description: |
|
1692 | 1712 | no person |
|
1693 | 1713 | |
|
1694 | 1714 | |
|
1695 | 1715 | changeset: 3:10e46f2dcbf4 |
|
1696 | 1716 | bisect: bad |
|
1697 | 1717 | user: person |
|
1698 | 1718 | date: Fri Jan 16 01:06:40 1970 +0000 |
|
1699 | 1719 | files: c |
|
1700 | 1720 | description: |
|
1701 | 1721 | no user, no domain |
|
1702 | 1722 | |
|
1703 | 1723 | |
|
1704 | 1724 | changeset: 4:bbe44766e73d |
|
1705 | 1725 | bisect: bad (implicit) |
|
1706 | 1726 | branch: foo |
|
1707 | 1727 | user: person |
|
1708 | 1728 | date: Sat Jan 17 04:53:20 1970 +0000 |
|
1709 | 1729 | description: |
|
1710 | 1730 | new branch |
|
1711 | 1731 | |
|
1712 | 1732 | |
|
1713 | 1733 | $ hg --color=debug log -T bisect -r 0:4 |
|
1714 | 1734 | [log.changeset changeset.public|changeset: 0:1e4e1b8f71e0] |
|
1715 | 1735 | [log.bisect bisect.good|bisect: good (implicit)] |
|
1716 | 1736 | [log.user|user: User Name <user@hostname>] |
|
1717 | 1737 | [log.date|date: Mon Jan 12 13:46:40 1970 +0000] |
|
1718 | 1738 | [log.summary|summary: line 1] |
|
1719 | 1739 | |
|
1720 | 1740 | [log.changeset changeset.public|changeset: 1:b608e9d1a3f0] |
|
1721 | 1741 | [log.bisect bisect.good|bisect: good] |
|
1722 | 1742 | [log.user|user: A. N. Other <other@place>] |
|
1723 | 1743 | [log.date|date: Tue Jan 13 17:33:20 1970 +0000] |
|
1724 | 1744 | [log.summary|summary: other 1] |
|
1725 | 1745 | |
|
1726 | 1746 | [log.changeset changeset.public|changeset: 2:97054abb4ab8] |
|
1727 | 1747 | [log.bisect bisect.untested|bisect: untested] |
|
1728 | 1748 | [log.user|user: other@place] |
|
1729 | 1749 | [log.date|date: Wed Jan 14 21:20:00 1970 +0000] |
|
1730 | 1750 | [log.summary|summary: no person] |
|
1731 | 1751 | |
|
1732 | 1752 | [log.changeset changeset.public|changeset: 3:10e46f2dcbf4] |
|
1733 | 1753 | [log.bisect bisect.bad|bisect: bad] |
|
1734 | 1754 | [log.user|user: person] |
|
1735 | 1755 | [log.date|date: Fri Jan 16 01:06:40 1970 +0000] |
|
1736 | 1756 | [log.summary|summary: no user, no domain] |
|
1737 | 1757 | |
|
1738 | 1758 | [log.changeset changeset.draft|changeset: 4:bbe44766e73d] |
|
1739 | 1759 | [log.bisect bisect.bad|bisect: bad (implicit)] |
|
1740 | 1760 | [log.branch|branch: foo] |
|
1741 | 1761 | [log.user|user: person] |
|
1742 | 1762 | [log.date|date: Sat Jan 17 04:53:20 1970 +0000] |
|
1743 | 1763 | [log.summary|summary: new branch] |
|
1744 | 1764 | |
|
1745 | 1765 | $ hg --color=debug log --debug -T bisect -r 0:4 |
|
1746 | 1766 | [log.changeset changeset.public|changeset: 0:1e4e1b8f71e05681d422154f5421e385fec3454f] |
|
1747 | 1767 | [log.bisect bisect.good|bisect: good (implicit)] |
|
1748 | 1768 | [log.phase|phase: public] |
|
1749 | 1769 | [log.parent changeset.public|parent: -1:0000000000000000000000000000000000000000] |
|
1750 | 1770 | [log.parent changeset.public|parent: -1:0000000000000000000000000000000000000000] |
|
1751 | 1771 | [ui.debug log.manifest|manifest: 0:a0c8bcbbb45c63b90b70ad007bf38961f64f2af0] |
|
1752 | 1772 | [log.user|user: User Name <user@hostname>] |
|
1753 | 1773 | [log.date|date: Mon Jan 12 13:46:40 1970 +0000] |
|
1754 | 1774 | [ui.debug log.files|files+: a] |
|
1755 | 1775 | [ui.debug log.extra|extra: branch=default] |
|
1756 | 1776 | [ui.note log.description|description:] |
|
1757 | 1777 | [ui.note log.description|line 1 |
|
1758 | 1778 | line 2] |
|
1759 | 1779 | |
|
1760 | 1780 | |
|
1761 | 1781 | [log.changeset changeset.public|changeset: 1:b608e9d1a3f0273ccf70fb85fd6866b3482bf965] |
|
1762 | 1782 | [log.bisect bisect.good|bisect: good] |
|
1763 | 1783 | [log.phase|phase: public] |
|
1764 | 1784 | [log.parent changeset.public|parent: 0:1e4e1b8f71e05681d422154f5421e385fec3454f] |
|
1765 | 1785 | [log.parent changeset.public|parent: -1:0000000000000000000000000000000000000000] |
|
1766 | 1786 | [ui.debug log.manifest|manifest: 1:4e8d705b1e53e3f9375e0e60dc7b525d8211fe55] |
|
1767 | 1787 | [log.user|user: A. N. Other <other@place>] |
|
1768 | 1788 | [log.date|date: Tue Jan 13 17:33:20 1970 +0000] |
|
1769 | 1789 | [ui.debug log.files|files+: b] |
|
1770 | 1790 | [ui.debug log.extra|extra: branch=default] |
|
1771 | 1791 | [ui.note log.description|description:] |
|
1772 | 1792 | [ui.note log.description|other 1 |
|
1773 | 1793 | other 2 |
|
1774 | 1794 | |
|
1775 | 1795 | other 3] |
|
1776 | 1796 | |
|
1777 | 1797 | |
|
1778 | 1798 | [log.changeset changeset.public|changeset: 2:97054abb4ab824450e9164180baf491ae0078465] |
|
1779 | 1799 | [log.bisect bisect.untested|bisect: untested] |
|
1780 | 1800 | [log.phase|phase: public] |
|
1781 | 1801 | [log.parent changeset.public|parent: 1:b608e9d1a3f0273ccf70fb85fd6866b3482bf965] |
|
1782 | 1802 | [log.parent changeset.public|parent: -1:0000000000000000000000000000000000000000] |
|
1783 | 1803 | [ui.debug log.manifest|manifest: 2:6e0e82995c35d0d57a52aca8da4e56139e06b4b1] |
|
1784 | 1804 | [log.user|user: other@place] |
|
1785 | 1805 | [log.date|date: Wed Jan 14 21:20:00 1970 +0000] |
|
1786 | 1806 | [ui.debug log.files|files+: c] |
|
1787 | 1807 | [ui.debug log.extra|extra: branch=default] |
|
1788 | 1808 | [ui.note log.description|description:] |
|
1789 | 1809 | [ui.note log.description|no person] |
|
1790 | 1810 | |
|
1791 | 1811 | |
|
1792 | 1812 | [log.changeset changeset.public|changeset: 3:10e46f2dcbf4823578cf180f33ecf0b957964c47] |
|
1793 | 1813 | [log.bisect bisect.bad|bisect: bad] |
|
1794 | 1814 | [log.phase|phase: public] |
|
1795 | 1815 | [log.parent changeset.public|parent: 2:97054abb4ab824450e9164180baf491ae0078465] |
|
1796 | 1816 | [log.parent changeset.public|parent: -1:0000000000000000000000000000000000000000] |
|
1797 | 1817 | [ui.debug log.manifest|manifest: 3:cb5a1327723bada42f117e4c55a303246eaf9ccc] |
|
1798 | 1818 | [log.user|user: person] |
|
1799 | 1819 | [log.date|date: Fri Jan 16 01:06:40 1970 +0000] |
|
1800 | 1820 | [ui.debug log.files|files: c] |
|
1801 | 1821 | [ui.debug log.extra|extra: branch=default] |
|
1802 | 1822 | [ui.note log.description|description:] |
|
1803 | 1823 | [ui.note log.description|no user, no domain] |
|
1804 | 1824 | |
|
1805 | 1825 | |
|
1806 | 1826 | [log.changeset changeset.draft|changeset: 4:bbe44766e73d5f11ed2177f1838de10c53ef3e74] |
|
1807 | 1827 | [log.bisect bisect.bad|bisect: bad (implicit)] |
|
1808 | 1828 | [log.branch|branch: foo] |
|
1809 | 1829 | [log.phase|phase: draft] |
|
1810 | 1830 | [log.parent changeset.public|parent: 3:10e46f2dcbf4823578cf180f33ecf0b957964c47] |
|
1811 | 1831 | [log.parent changeset.public|parent: -1:0000000000000000000000000000000000000000] |
|
1812 | 1832 | [ui.debug log.manifest|manifest: 3:cb5a1327723bada42f117e4c55a303246eaf9ccc] |
|
1813 | 1833 | [log.user|user: person] |
|
1814 | 1834 | [log.date|date: Sat Jan 17 04:53:20 1970 +0000] |
|
1815 | 1835 | [ui.debug log.extra|extra: branch=foo] |
|
1816 | 1836 | [ui.note log.description|description:] |
|
1817 | 1837 | [ui.note log.description|new branch] |
|
1818 | 1838 | |
|
1819 | 1839 | |
|
1820 | 1840 | $ hg --color=debug log -v -T bisect -r 0:4 |
|
1821 | 1841 | [log.changeset changeset.public|changeset: 0:1e4e1b8f71e0] |
|
1822 | 1842 | [log.bisect bisect.good|bisect: good (implicit)] |
|
1823 | 1843 | [log.user|user: User Name <user@hostname>] |
|
1824 | 1844 | [log.date|date: Mon Jan 12 13:46:40 1970 +0000] |
|
1825 | 1845 | [ui.note log.files|files: a] |
|
1826 | 1846 | [ui.note log.description|description:] |
|
1827 | 1847 | [ui.note log.description|line 1 |
|
1828 | 1848 | line 2] |
|
1829 | 1849 | |
|
1830 | 1850 | |
|
1831 | 1851 | [log.changeset changeset.public|changeset: 1:b608e9d1a3f0] |
|
1832 | 1852 | [log.bisect bisect.good|bisect: good] |
|
1833 | 1853 | [log.user|user: A. N. Other <other@place>] |
|
1834 | 1854 | [log.date|date: Tue Jan 13 17:33:20 1970 +0000] |
|
1835 | 1855 | [ui.note log.files|files: b] |
|
1836 | 1856 | [ui.note log.description|description:] |
|
1837 | 1857 | [ui.note log.description|other 1 |
|
1838 | 1858 | other 2 |
|
1839 | 1859 | |
|
1840 | 1860 | other 3] |
|
1841 | 1861 | |
|
1842 | 1862 | |
|
1843 | 1863 | [log.changeset changeset.public|changeset: 2:97054abb4ab8] |
|
1844 | 1864 | [log.bisect bisect.untested|bisect: untested] |
|
1845 | 1865 | [log.user|user: other@place] |
|
1846 | 1866 | [log.date|date: Wed Jan 14 21:20:00 1970 +0000] |
|
1847 | 1867 | [ui.note log.files|files: c] |
|
1848 | 1868 | [ui.note log.description|description:] |
|
1849 | 1869 | [ui.note log.description|no person] |
|
1850 | 1870 | |
|
1851 | 1871 | |
|
1852 | 1872 | [log.changeset changeset.public|changeset: 3:10e46f2dcbf4] |
|
1853 | 1873 | [log.bisect bisect.bad|bisect: bad] |
|
1854 | 1874 | [log.user|user: person] |
|
1855 | 1875 | [log.date|date: Fri Jan 16 01:06:40 1970 +0000] |
|
1856 | 1876 | [ui.note log.files|files: c] |
|
1857 | 1877 | [ui.note log.description|description:] |
|
1858 | 1878 | [ui.note log.description|no user, no domain] |
|
1859 | 1879 | |
|
1860 | 1880 | |
|
1861 | 1881 | [log.changeset changeset.draft|changeset: 4:bbe44766e73d] |
|
1862 | 1882 | [log.bisect bisect.bad|bisect: bad (implicit)] |
|
1863 | 1883 | [log.branch|branch: foo] |
|
1864 | 1884 | [log.user|user: person] |
|
1865 | 1885 | [log.date|date: Sat Jan 17 04:53:20 1970 +0000] |
|
1866 | 1886 | [ui.note log.description|description:] |
|
1867 | 1887 | [ui.note log.description|new branch] |
|
1868 | 1888 | |
|
1869 | 1889 | |
|
1870 | 1890 | $ hg bisect --reset |
|
1871 | 1891 | |
|
1872 | 1892 | $ cd .. |
|
1873 | 1893 | |
|
1874 | 1894 | Set up latesttag repository: |
|
1875 | 1895 | |
|
1876 | 1896 | $ hg init latesttag |
|
1877 | 1897 | $ cd latesttag |
|
1878 | 1898 | |
|
1879 | 1899 | $ echo a > file |
|
1880 | 1900 | $ hg ci -Am a -d '0 0' |
|
1881 | 1901 | adding file |
|
1882 | 1902 | |
|
1883 | 1903 | $ echo b >> file |
|
1884 | 1904 | $ hg ci -m b -d '1 0' |
|
1885 | 1905 | |
|
1886 | 1906 | $ echo c >> head1 |
|
1887 | 1907 | $ hg ci -Am h1c -d '2 0' |
|
1888 | 1908 | adding head1 |
|
1889 | 1909 | |
|
1890 | 1910 | $ hg update -q 1 |
|
1891 | 1911 | $ echo d >> head2 |
|
1892 | 1912 | $ hg ci -Am h2d -d '3 0' |
|
1893 | 1913 | adding head2 |
|
1894 | 1914 | created new head |
|
1895 | 1915 | |
|
1896 | 1916 | $ echo e >> head2 |
|
1897 | 1917 | $ hg ci -m h2e -d '4 0' |
|
1898 | 1918 | |
|
1899 | 1919 | $ hg merge -q |
|
1900 | 1920 | $ hg ci -m merge -d '5 -3600' |
|
1901 | 1921 | |
|
1902 | 1922 | $ hg tag -r 1 -m t1 -d '6 0' t1 |
|
1903 | 1923 | $ hg tag -r 2 -m t2 -d '7 0' t2 |
|
1904 | 1924 | $ hg tag -r 3 -m t3 -d '8 0' t3 |
|
1905 | 1925 | $ hg tag -r 4 -m t4 -d '4 0' t4 # older than t2, but should not matter |
|
1906 | 1926 | $ hg tag -r 5 -m t5 -d '9 0' t5 |
|
1907 | 1927 | $ hg tag -r 3 -m at3 -d '10 0' at3 |
|
1908 | 1928 | |
|
1909 | 1929 | $ cd .. |
|
1910 | 1930 | |
|
1911 | 1931 | Style path expansion: issue1948 - ui.style option doesn't work on OSX |
|
1912 | 1932 | if it is a relative path |
|
1913 | 1933 | |
|
1914 | 1934 | $ mkdir -p home/styles |
|
1915 | 1935 | |
|
1916 | 1936 | $ cat > home/styles/teststyle <<EOF |
|
1917 | 1937 | > changeset = 'test {rev}:{node|short}\n' |
|
1918 | 1938 | > EOF |
|
1919 | 1939 | |
|
1920 | 1940 | $ HOME=`pwd`/home; export HOME |
|
1921 | 1941 | |
|
1922 | 1942 | $ cat > latesttag/.hg/hgrc <<EOF |
|
1923 | 1943 | > [ui] |
|
1924 | 1944 | > style = ~/styles/teststyle |
|
1925 | 1945 | > EOF |
|
1926 | 1946 | |
|
1927 | 1947 | $ hg -R latesttag tip |
|
1928 | 1948 | test 11:97e5943b523a |
|
1929 | 1949 | |
|
1930 | 1950 | Test recursive showlist template (issue1989): |
|
1931 | 1951 | |
|
1932 | 1952 | $ cat > style1989 <<EOF |
|
1933 | 1953 | > changeset = '{file_mods}{manifest}{extras}' |
|
1934 | 1954 | > file_mod = 'M|{author|person}\n' |
|
1935 | 1955 | > manifest = '{rev},{author}\n' |
|
1936 | 1956 | > extra = '{key}: {author}\n' |
|
1937 | 1957 | > EOF |
|
1938 | 1958 | |
|
1939 | 1959 | $ hg -R latesttag log -r tip --style=style1989 |
|
1940 | 1960 | M|test |
|
1941 | 1961 | 11, |
|
1942 | 1962 | branch: test |
General Comments 0
You need to be logged in to leave comments.
Login now