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