##// END OF EJS Templates
test-log: enable for Windows
Adrian Buehlmann -
r16887:91e417e9 default
parent child Browse files
Show More
@@ -1,1239 +1,1239
1 $ "$TESTDIR/hghave" execbit || exit 80
2
3 The g is crafted to have 2 filelog topological heads in a linear
1 The g is crafted to have 2 filelog topological heads in a linear
4 changeset graph
2 changeset graph
5
3
6 $ hg init a
4 $ hg init a
7 $ cd a
5 $ cd a
8 $ echo a > a
6 $ echo a > a
9 $ echo f > f
7 $ echo f > f
10 $ hg ci -Ama -d '1 0'
8 $ hg ci -Ama -d '1 0'
11 adding a
9 adding a
12 adding f
10 adding f
13
11
14 $ hg cp a b
12 $ hg cp a b
15 $ hg cp f g
13 $ hg cp f g
16 $ hg ci -mb -d '2 0'
14 $ hg ci -mb -d '2 0'
17
15
18 $ mkdir dir
16 $ mkdir dir
19 $ hg mv b dir
17 $ hg mv b dir
20 $ echo g >> g
18 $ echo g >> g
21 $ echo f >> f
19 $ echo f >> f
22 $ hg ci -mc -d '3 0'
20 $ hg ci -mc -d '3 0'
23
21
24 $ hg mv a b
22 $ hg mv a b
25 $ hg cp -f f g
23 $ hg cp -f f g
26 $ echo a > d
24 $ echo a > d
27 $ hg add d
25 $ hg add d
28 $ hg ci -md -d '4 0'
26 $ hg ci -md -d '4 0'
29
27
30 $ hg mv dir/b e
28 $ hg mv dir/b e
31 $ hg ci -me -d '5 0'
29 $ hg ci -me -d '5 0'
32
30
33 $ hg log a
31 $ hg log a
34 changeset: 0:9161b9aeaf16
32 changeset: 0:9161b9aeaf16
35 user: test
33 user: test
36 date: Thu Jan 01 00:00:01 1970 +0000
34 date: Thu Jan 01 00:00:01 1970 +0000
37 summary: a
35 summary: a
38
36
39
37
40 -f, directory
38 -f, directory
41
39
42 $ hg log -f dir
40 $ hg log -f dir
43 abort: cannot follow file not in parent revision: "dir"
41 abort: cannot follow file not in parent revision: "dir"
44 [255]
42 [255]
45
43
46 -f, but no args
44 -f, but no args
47
45
48 $ hg log -f
46 $ hg log -f
49 changeset: 4:7e4639b4691b
47 changeset: 4:7e4639b4691b
50 tag: tip
48 tag: tip
51 user: test
49 user: test
52 date: Thu Jan 01 00:00:05 1970 +0000
50 date: Thu Jan 01 00:00:05 1970 +0000
53 summary: e
51 summary: e
54
52
55 changeset: 3:2ca5ba701980
53 changeset: 3:2ca5ba701980
56 user: test
54 user: test
57 date: Thu Jan 01 00:00:04 1970 +0000
55 date: Thu Jan 01 00:00:04 1970 +0000
58 summary: d
56 summary: d
59
57
60 changeset: 2:f8954cd4dc1f
58 changeset: 2:f8954cd4dc1f
61 user: test
59 user: test
62 date: Thu Jan 01 00:00:03 1970 +0000
60 date: Thu Jan 01 00:00:03 1970 +0000
63 summary: c
61 summary: c
64
62
65 changeset: 1:d89b0a12d229
63 changeset: 1:d89b0a12d229
66 user: test
64 user: test
67 date: Thu Jan 01 00:00:02 1970 +0000
65 date: Thu Jan 01 00:00:02 1970 +0000
68 summary: b
66 summary: b
69
67
70 changeset: 0:9161b9aeaf16
68 changeset: 0:9161b9aeaf16
71 user: test
69 user: test
72 date: Thu Jan 01 00:00:01 1970 +0000
70 date: Thu Jan 01 00:00:01 1970 +0000
73 summary: a
71 summary: a
74
72
75
73
76 one rename
74 one rename
77
75
78 $ hg up -q 2
76 $ hg up -q 2
79 $ hg log -vf a
77 $ hg log -vf a
80 changeset: 0:9161b9aeaf16
78 changeset: 0:9161b9aeaf16
81 user: test
79 user: test
82 date: Thu Jan 01 00:00:01 1970 +0000
80 date: Thu Jan 01 00:00:01 1970 +0000
83 files: a f
81 files: a f
84 description:
82 description:
85 a
83 a
86
84
87
85
88
86
89 many renames
87 many renames
90
88
91 $ hg up -q tip
89 $ hg up -q tip
92 $ hg log -vf e
90 $ hg log -vf e
93 changeset: 4:7e4639b4691b
91 changeset: 4:7e4639b4691b
94 tag: tip
92 tag: tip
95 user: test
93 user: test
96 date: Thu Jan 01 00:00:05 1970 +0000
94 date: Thu Jan 01 00:00:05 1970 +0000
97 files: dir/b e
95 files: dir/b e
98 description:
96 description:
99 e
97 e
100
98
101
99
102 changeset: 2:f8954cd4dc1f
100 changeset: 2:f8954cd4dc1f
103 user: test
101 user: test
104 date: Thu Jan 01 00:00:03 1970 +0000
102 date: Thu Jan 01 00:00:03 1970 +0000
105 files: b dir/b f g
103 files: b dir/b f g
106 description:
104 description:
107 c
105 c
108
106
109
107
110 changeset: 1:d89b0a12d229
108 changeset: 1:d89b0a12d229
111 user: test
109 user: test
112 date: Thu Jan 01 00:00:02 1970 +0000
110 date: Thu Jan 01 00:00:02 1970 +0000
113 files: b g
111 files: b g
114 description:
112 description:
115 b
113 b
116
114
117
115
118 changeset: 0:9161b9aeaf16
116 changeset: 0:9161b9aeaf16
119 user: test
117 user: test
120 date: Thu Jan 01 00:00:01 1970 +0000
118 date: Thu Jan 01 00:00:01 1970 +0000
121 files: a f
119 files: a f
122 description:
120 description:
123 a
121 a
124
122
125
123
126
124
127
125
128 log -pf dir/b
126 log -pf dir/b
129
127
130 $ hg up -q 3
128 $ hg up -q 3
131 $ hg log -pf dir/b
129 $ hg log -pf dir/b
132 changeset: 2:f8954cd4dc1f
130 changeset: 2:f8954cd4dc1f
133 user: test
131 user: test
134 date: Thu Jan 01 00:00:03 1970 +0000
132 date: Thu Jan 01 00:00:03 1970 +0000
135 summary: c
133 summary: c
136
134
137 diff -r d89b0a12d229 -r f8954cd4dc1f dir/b
135 diff -r d89b0a12d229 -r f8954cd4dc1f dir/b
138 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
136 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
139 +++ b/dir/b Thu Jan 01 00:00:03 1970 +0000
137 +++ b/dir/b Thu Jan 01 00:00:03 1970 +0000
140 @@ -0,0 +1,1 @@
138 @@ -0,0 +1,1 @@
141 +a
139 +a
142
140
143 changeset: 1:d89b0a12d229
141 changeset: 1:d89b0a12d229
144 user: test
142 user: test
145 date: Thu Jan 01 00:00:02 1970 +0000
143 date: Thu Jan 01 00:00:02 1970 +0000
146 summary: b
144 summary: b
147
145
148 diff -r 9161b9aeaf16 -r d89b0a12d229 b
146 diff -r 9161b9aeaf16 -r d89b0a12d229 b
149 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
147 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
150 +++ b/b Thu Jan 01 00:00:02 1970 +0000
148 +++ b/b Thu Jan 01 00:00:02 1970 +0000
151 @@ -0,0 +1,1 @@
149 @@ -0,0 +1,1 @@
152 +a
150 +a
153
151
154 changeset: 0:9161b9aeaf16
152 changeset: 0:9161b9aeaf16
155 user: test
153 user: test
156 date: Thu Jan 01 00:00:01 1970 +0000
154 date: Thu Jan 01 00:00:01 1970 +0000
157 summary: a
155 summary: a
158
156
159 diff -r 000000000000 -r 9161b9aeaf16 a
157 diff -r 000000000000 -r 9161b9aeaf16 a
160 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
158 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
161 +++ b/a Thu Jan 01 00:00:01 1970 +0000
159 +++ b/a Thu Jan 01 00:00:01 1970 +0000
162 @@ -0,0 +1,1 @@
160 @@ -0,0 +1,1 @@
163 +a
161 +a
164
162
165
163
166 log -vf dir/b
164 log -vf dir/b
167
165
168 $ hg log -vf dir/b
166 $ hg log -vf dir/b
169 changeset: 2:f8954cd4dc1f
167 changeset: 2:f8954cd4dc1f
170 user: test
168 user: test
171 date: Thu Jan 01 00:00:03 1970 +0000
169 date: Thu Jan 01 00:00:03 1970 +0000
172 files: b dir/b f g
170 files: b dir/b f g
173 description:
171 description:
174 c
172 c
175
173
176
174
177 changeset: 1:d89b0a12d229
175 changeset: 1:d89b0a12d229
178 user: test
176 user: test
179 date: Thu Jan 01 00:00:02 1970 +0000
177 date: Thu Jan 01 00:00:02 1970 +0000
180 files: b g
178 files: b g
181 description:
179 description:
182 b
180 b
183
181
184
182
185 changeset: 0:9161b9aeaf16
183 changeset: 0:9161b9aeaf16
186 user: test
184 user: test
187 date: Thu Jan 01 00:00:01 1970 +0000
185 date: Thu Jan 01 00:00:01 1970 +0000
188 files: a f
186 files: a f
189 description:
187 description:
190 a
188 a
191
189
192
190
193
191
194
192
195 -f and multiple filelog heads
193 -f and multiple filelog heads
196
194
197 $ hg up -q 2
195 $ hg up -q 2
198 $ hg log -f g --template '{rev}\n'
196 $ hg log -f g --template '{rev}\n'
199 2
197 2
200 1
198 1
201 0
199 0
202 $ hg up -q tip
200 $ hg up -q tip
203 $ hg log -f g --template '{rev}\n'
201 $ hg log -f g --template '{rev}\n'
204 3
202 3
205 2
203 2
206 0
204 0
207
205
208
206
209 log copies with --copies
207 log copies with --copies
210
208
211 $ hg log -vC --template '{rev} {file_copies}\n'
209 $ hg log -vC --template '{rev} {file_copies}\n'
212 4 e (dir/b)
210 4 e (dir/b)
213 3 b (a)g (f)
211 3 b (a)g (f)
214 2 dir/b (b)
212 2 dir/b (b)
215 1 b (a)g (f)
213 1 b (a)g (f)
216 0
214 0
217
215
218 log copies switch without --copies, with old filecopy template
216 log copies switch without --copies, with old filecopy template
219
217
220 $ hg log -v --template '{rev} {file_copies_switch%filecopy}\n'
218 $ hg log -v --template '{rev} {file_copies_switch%filecopy}\n'
221 4
219 4
222 3
220 3
223 2
221 2
224 1
222 1
225 0
223 0
226
224
227 log copies switch with --copies
225 log copies switch with --copies
228
226
229 $ hg log -vC --template '{rev} {file_copies_switch}\n'
227 $ hg log -vC --template '{rev} {file_copies_switch}\n'
230 4 e (dir/b)
228 4 e (dir/b)
231 3 b (a)g (f)
229 3 b (a)g (f)
232 2 dir/b (b)
230 2 dir/b (b)
233 1 b (a)g (f)
231 1 b (a)g (f)
234 0
232 0
235
233
236
234
237 log copies with hardcoded style and with --style=default
235 log copies with hardcoded style and with --style=default
238
236
239 $ hg log -vC -r4
237 $ hg log -vC -r4
240 changeset: 4:7e4639b4691b
238 changeset: 4:7e4639b4691b
241 tag: tip
239 tag: tip
242 user: test
240 user: test
243 date: Thu Jan 01 00:00:05 1970 +0000
241 date: Thu Jan 01 00:00:05 1970 +0000
244 files: dir/b e
242 files: dir/b e
245 copies: e (dir/b)
243 copies: e (dir/b)
246 description:
244 description:
247 e
245 e
248
246
249
247
250 $ hg log -vC -r4 --style=default
248 $ hg log -vC -r4 --style=default
251 changeset: 4:7e4639b4691b
249 changeset: 4:7e4639b4691b
252 tag: tip
250 tag: tip
253 user: test
251 user: test
254 date: Thu Jan 01 00:00:05 1970 +0000
252 date: Thu Jan 01 00:00:05 1970 +0000
255 files: dir/b e
253 files: dir/b e
256 copies: e (dir/b)
254 copies: e (dir/b)
257 description:
255 description:
258 e
256 e
259
257
260
258
261
259
262
260
263 log copies, non-linear manifest
261 log copies, non-linear manifest
264
262
265 $ hg up -C 3
263 $ hg up -C 3
266 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
264 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
267 $ hg mv dir/b e
265 $ hg mv dir/b e
268 $ echo foo > foo
266 $ echo foo > foo
269 $ hg ci -Ame2 -d '6 0'
267 $ hg ci -Ame2 -d '6 0'
270 adding foo
268 adding foo
271 created new head
269 created new head
272 $ hg log -v --template '{rev} {file_copies}\n' -r 5
270 $ hg log -v --template '{rev} {file_copies}\n' -r 5
273 5 e (dir/b)
271 5 e (dir/b)
274
272
275
273
276 log copies, execute bit set
274 log copies, execute bit set
277
275
276 #if execbit
278 $ chmod +x e
277 $ chmod +x e
279 $ hg ci -me3 -d '7 0'
278 $ hg ci -me3 -d '7 0'
280 $ hg log -v --template '{rev} {file_copies}\n' -r 6
279 $ hg log -v --template '{rev} {file_copies}\n' -r 6
281 6
280 6
281 #endif
282
282
283
283
284 log -p d
284 log -p d
285
285
286 $ hg log -pv d
286 $ hg log -pv d
287 changeset: 3:2ca5ba701980
287 changeset: 3:2ca5ba701980
288 user: test
288 user: test
289 date: Thu Jan 01 00:00:04 1970 +0000
289 date: Thu Jan 01 00:00:04 1970 +0000
290 files: a b d g
290 files: a b d g
291 description:
291 description:
292 d
292 d
293
293
294
294
295 diff -r f8954cd4dc1f -r 2ca5ba701980 d
295 diff -r f8954cd4dc1f -r 2ca5ba701980 d
296 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
296 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
297 +++ b/d Thu Jan 01 00:00:04 1970 +0000
297 +++ b/d Thu Jan 01 00:00:04 1970 +0000
298 @@ -0,0 +1,1 @@
298 @@ -0,0 +1,1 @@
299 +a
299 +a
300
300
301
301
302
302
303 log --removed file
303 log --removed file
304
304
305 $ hg log --removed -v a
305 $ hg log --removed -v a
306 changeset: 3:2ca5ba701980
306 changeset: 3:2ca5ba701980
307 user: test
307 user: test
308 date: Thu Jan 01 00:00:04 1970 +0000
308 date: Thu Jan 01 00:00:04 1970 +0000
309 files: a b d g
309 files: a b d g
310 description:
310 description:
311 d
311 d
312
312
313
313
314 changeset: 0:9161b9aeaf16
314 changeset: 0:9161b9aeaf16
315 user: test
315 user: test
316 date: Thu Jan 01 00:00:01 1970 +0000
316 date: Thu Jan 01 00:00:01 1970 +0000
317 files: a f
317 files: a f
318 description:
318 description:
319 a
319 a
320
320
321
321
322
322
323 log --removed revrange file
323 log --removed revrange file
324
324
325 $ hg log --removed -v -r0:2 a
325 $ hg log --removed -v -r0:2 a
326 changeset: 0:9161b9aeaf16
326 changeset: 0:9161b9aeaf16
327 user: test
327 user: test
328 date: Thu Jan 01 00:00:01 1970 +0000
328 date: Thu Jan 01 00:00:01 1970 +0000
329 files: a f
329 files: a f
330 description:
330 description:
331 a
331 a
332
332
333
333
334
334
335
335
336 log --follow tests
336 log --follow tests
337
337
338 $ hg init ../follow
338 $ hg init ../follow
339 $ cd ../follow
339 $ cd ../follow
340
340
341 $ echo base > base
341 $ echo base > base
342 $ hg ci -Ambase -d '1 0'
342 $ hg ci -Ambase -d '1 0'
343 adding base
343 adding base
344
344
345 $ echo r1 >> base
345 $ echo r1 >> base
346 $ hg ci -Amr1 -d '1 0'
346 $ hg ci -Amr1 -d '1 0'
347 $ echo r2 >> base
347 $ echo r2 >> base
348 $ hg ci -Amr2 -d '1 0'
348 $ hg ci -Amr2 -d '1 0'
349
349
350 $ hg up -C 1
350 $ hg up -C 1
351 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
351 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
352 $ echo b1 > b1
352 $ echo b1 > b1
353 $ hg ci -Amb1 -d '1 0'
353 $ hg ci -Amb1 -d '1 0'
354 adding b1
354 adding b1
355 created new head
355 created new head
356
356
357
357
358 log -f
358 log -f
359
359
360 $ hg log -f
360 $ hg log -f
361 changeset: 3:e62f78d544b4
361 changeset: 3:e62f78d544b4
362 tag: tip
362 tag: tip
363 parent: 1:3d5bf5654eda
363 parent: 1:3d5bf5654eda
364 user: test
364 user: test
365 date: Thu Jan 01 00:00:01 1970 +0000
365 date: Thu Jan 01 00:00:01 1970 +0000
366 summary: b1
366 summary: b1
367
367
368 changeset: 1:3d5bf5654eda
368 changeset: 1:3d5bf5654eda
369 user: test
369 user: test
370 date: Thu Jan 01 00:00:01 1970 +0000
370 date: Thu Jan 01 00:00:01 1970 +0000
371 summary: r1
371 summary: r1
372
372
373 changeset: 0:67e992f2c4f3
373 changeset: 0:67e992f2c4f3
374 user: test
374 user: test
375 date: Thu Jan 01 00:00:01 1970 +0000
375 date: Thu Jan 01 00:00:01 1970 +0000
376 summary: base
376 summary: base
377
377
378
378
379
379
380 log -f -r 1:tip
380 log -f -r 1:tip
381
381
382 $ hg up -C 0
382 $ hg up -C 0
383 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
383 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
384 $ echo b2 > b2
384 $ echo b2 > b2
385 $ hg ci -Amb2 -d '1 0'
385 $ hg ci -Amb2 -d '1 0'
386 adding b2
386 adding b2
387 created new head
387 created new head
388 $ hg log -f -r 1:tip
388 $ hg log -f -r 1:tip
389 changeset: 1:3d5bf5654eda
389 changeset: 1:3d5bf5654eda
390 user: test
390 user: test
391 date: Thu Jan 01 00:00:01 1970 +0000
391 date: Thu Jan 01 00:00:01 1970 +0000
392 summary: r1
392 summary: r1
393
393
394 changeset: 2:60c670bf5b30
394 changeset: 2:60c670bf5b30
395 user: test
395 user: test
396 date: Thu Jan 01 00:00:01 1970 +0000
396 date: Thu Jan 01 00:00:01 1970 +0000
397 summary: r2
397 summary: r2
398
398
399 changeset: 3:e62f78d544b4
399 changeset: 3:e62f78d544b4
400 parent: 1:3d5bf5654eda
400 parent: 1:3d5bf5654eda
401 user: test
401 user: test
402 date: Thu Jan 01 00:00:01 1970 +0000
402 date: Thu Jan 01 00:00:01 1970 +0000
403 summary: b1
403 summary: b1
404
404
405
405
406
406
407 log -r . with two parents
407 log -r . with two parents
408
408
409 $ hg up -C 3
409 $ hg up -C 3
410 2 files updated, 0 files merged, 1 files removed, 0 files unresolved
410 2 files updated, 0 files merged, 1 files removed, 0 files unresolved
411 $ hg merge tip
411 $ hg merge tip
412 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
412 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
413 (branch merge, don't forget to commit)
413 (branch merge, don't forget to commit)
414 $ hg log -r .
414 $ hg log -r .
415 changeset: 3:e62f78d544b4
415 changeset: 3:e62f78d544b4
416 parent: 1:3d5bf5654eda
416 parent: 1:3d5bf5654eda
417 user: test
417 user: test
418 date: Thu Jan 01 00:00:01 1970 +0000
418 date: Thu Jan 01 00:00:01 1970 +0000
419 summary: b1
419 summary: b1
420
420
421
421
422
422
423 log -r . with one parent
423 log -r . with one parent
424
424
425 $ hg ci -mm12 -d '1 0'
425 $ hg ci -mm12 -d '1 0'
426 $ hg log -r .
426 $ hg log -r .
427 changeset: 5:302e9dd6890d
427 changeset: 5:302e9dd6890d
428 tag: tip
428 tag: tip
429 parent: 3:e62f78d544b4
429 parent: 3:e62f78d544b4
430 parent: 4:ddb82e70d1a1
430 parent: 4:ddb82e70d1a1
431 user: test
431 user: test
432 date: Thu Jan 01 00:00:01 1970 +0000
432 date: Thu Jan 01 00:00:01 1970 +0000
433 summary: m12
433 summary: m12
434
434
435
435
436 $ echo postm >> b1
436 $ echo postm >> b1
437 $ hg ci -Amb1.1 -d'1 0'
437 $ hg ci -Amb1.1 -d'1 0'
438
438
439
439
440 log --follow-first
440 log --follow-first
441
441
442 $ hg log --follow-first
442 $ hg log --follow-first
443 changeset: 6:2404bbcab562
443 changeset: 6:2404bbcab562
444 tag: tip
444 tag: tip
445 user: test
445 user: test
446 date: Thu Jan 01 00:00:01 1970 +0000
446 date: Thu Jan 01 00:00:01 1970 +0000
447 summary: b1.1
447 summary: b1.1
448
448
449 changeset: 5:302e9dd6890d
449 changeset: 5:302e9dd6890d
450 parent: 3:e62f78d544b4
450 parent: 3:e62f78d544b4
451 parent: 4:ddb82e70d1a1
451 parent: 4:ddb82e70d1a1
452 user: test
452 user: test
453 date: Thu Jan 01 00:00:01 1970 +0000
453 date: Thu Jan 01 00:00:01 1970 +0000
454 summary: m12
454 summary: m12
455
455
456 changeset: 3:e62f78d544b4
456 changeset: 3:e62f78d544b4
457 parent: 1:3d5bf5654eda
457 parent: 1:3d5bf5654eda
458 user: test
458 user: test
459 date: Thu Jan 01 00:00:01 1970 +0000
459 date: Thu Jan 01 00:00:01 1970 +0000
460 summary: b1
460 summary: b1
461
461
462 changeset: 1:3d5bf5654eda
462 changeset: 1:3d5bf5654eda
463 user: test
463 user: test
464 date: Thu Jan 01 00:00:01 1970 +0000
464 date: Thu Jan 01 00:00:01 1970 +0000
465 summary: r1
465 summary: r1
466
466
467 changeset: 0:67e992f2c4f3
467 changeset: 0:67e992f2c4f3
468 user: test
468 user: test
469 date: Thu Jan 01 00:00:01 1970 +0000
469 date: Thu Jan 01 00:00:01 1970 +0000
470 summary: base
470 summary: base
471
471
472
472
473
473
474 log -P 2
474 log -P 2
475
475
476 $ hg log -P 2
476 $ hg log -P 2
477 changeset: 6:2404bbcab562
477 changeset: 6:2404bbcab562
478 tag: tip
478 tag: tip
479 user: test
479 user: test
480 date: Thu Jan 01 00:00:01 1970 +0000
480 date: Thu Jan 01 00:00:01 1970 +0000
481 summary: b1.1
481 summary: b1.1
482
482
483 changeset: 5:302e9dd6890d
483 changeset: 5:302e9dd6890d
484 parent: 3:e62f78d544b4
484 parent: 3:e62f78d544b4
485 parent: 4:ddb82e70d1a1
485 parent: 4:ddb82e70d1a1
486 user: test
486 user: test
487 date: Thu Jan 01 00:00:01 1970 +0000
487 date: Thu Jan 01 00:00:01 1970 +0000
488 summary: m12
488 summary: m12
489
489
490 changeset: 4:ddb82e70d1a1
490 changeset: 4:ddb82e70d1a1
491 parent: 0:67e992f2c4f3
491 parent: 0:67e992f2c4f3
492 user: test
492 user: test
493 date: Thu Jan 01 00:00:01 1970 +0000
493 date: Thu Jan 01 00:00:01 1970 +0000
494 summary: b2
494 summary: b2
495
495
496 changeset: 3:e62f78d544b4
496 changeset: 3:e62f78d544b4
497 parent: 1:3d5bf5654eda
497 parent: 1:3d5bf5654eda
498 user: test
498 user: test
499 date: Thu Jan 01 00:00:01 1970 +0000
499 date: Thu Jan 01 00:00:01 1970 +0000
500 summary: b1
500 summary: b1
501
501
502
502
503
503
504 log -r tip -p --git
504 log -r tip -p --git
505
505
506 $ hg log -r tip -p --git
506 $ hg log -r tip -p --git
507 changeset: 6:2404bbcab562
507 changeset: 6:2404bbcab562
508 tag: tip
508 tag: tip
509 user: test
509 user: test
510 date: Thu Jan 01 00:00:01 1970 +0000
510 date: Thu Jan 01 00:00:01 1970 +0000
511 summary: b1.1
511 summary: b1.1
512
512
513 diff --git a/b1 b/b1
513 diff --git a/b1 b/b1
514 --- a/b1
514 --- a/b1
515 +++ b/b1
515 +++ b/b1
516 @@ -1,1 +1,2 @@
516 @@ -1,1 +1,2 @@
517 b1
517 b1
518 +postm
518 +postm
519
519
520
520
521
521
522 log -r ""
522 log -r ""
523
523
524 $ hg log -r ''
524 $ hg log -r ''
525 hg: parse error: empty query
525 hg: parse error: empty query
526 [255]
526 [255]
527
527
528 log -r <some unknown node id>
528 log -r <some unknown node id>
529
529
530 $ hg log -r 1000000000000000000000000000000000000000
530 $ hg log -r 1000000000000000000000000000000000000000
531 abort: unknown revision '1000000000000000000000000000000000000000'!
531 abort: unknown revision '1000000000000000000000000000000000000000'!
532 [255]
532 [255]
533
533
534 log -k r1
534 log -k r1
535
535
536 $ hg log -k r1
536 $ hg log -k r1
537 changeset: 1:3d5bf5654eda
537 changeset: 1:3d5bf5654eda
538 user: test
538 user: test
539 date: Thu Jan 01 00:00:01 1970 +0000
539 date: Thu Jan 01 00:00:01 1970 +0000
540 summary: r1
540 summary: r1
541
541
542 log -d " " (whitespaces only)
542 log -d " " (whitespaces only)
543
543
544 $ hg log -d " "
544 $ hg log -d " "
545 abort: dates cannot consist entirely of whitespace
545 abort: dates cannot consist entirely of whitespace
546 [255]
546 [255]
547
547
548 log -d -1
548 log -d -1
549
549
550 $ hg log -d -1
550 $ hg log -d -1
551
551
552 log -d ">"
552 log -d ">"
553
553
554 $ hg log -d ">"
554 $ hg log -d ">"
555 abort: invalid day spec, use '>DATE'
555 abort: invalid day spec, use '>DATE'
556 [255]
556 [255]
557
557
558 log -d "<"
558 log -d "<"
559
559
560 $ hg log -d "<"
560 $ hg log -d "<"
561 abort: invalid day spec, use '<DATE'
561 abort: invalid day spec, use '<DATE'
562 [255]
562 [255]
563
563
564 Negative ranges
564 Negative ranges
565 $ hg log -d "--2"
565 $ hg log -d "--2"
566 abort: -2 must be nonnegative (see 'hg help dates')
566 abort: -2 must be nonnegative (see 'hg help dates')
567 [255]
567 [255]
568
568
569
569
570 log -p -l2 --color=always
570 log -p -l2 --color=always
571
571
572 $ hg --config extensions.color= --config color.mode=ansi \
572 $ hg --config extensions.color= --config color.mode=ansi \
573 > log -p -l2 --color=always
573 > log -p -l2 --color=always
574 \x1b[0;33mchangeset: 6:2404bbcab562\x1b[0m (esc)
574 \x1b[0;33mchangeset: 6:2404bbcab562\x1b[0m (esc)
575 tag: tip
575 tag: tip
576 user: test
576 user: test
577 date: Thu Jan 01 00:00:01 1970 +0000
577 date: Thu Jan 01 00:00:01 1970 +0000
578 summary: b1.1
578 summary: b1.1
579
579
580 \x1b[0;1mdiff -r 302e9dd6890d -r 2404bbcab562 b1\x1b[0m (esc)
580 \x1b[0;1mdiff -r 302e9dd6890d -r 2404bbcab562 b1\x1b[0m (esc)
581 \x1b[0;31;1m--- a/b1 Thu Jan 01 00:00:01 1970 +0000\x1b[0m (esc)
581 \x1b[0;31;1m--- a/b1 Thu Jan 01 00:00:01 1970 +0000\x1b[0m (esc)
582 \x1b[0;32;1m+++ b/b1 Thu Jan 01 00:00:01 1970 +0000\x1b[0m (esc)
582 \x1b[0;32;1m+++ b/b1 Thu Jan 01 00:00:01 1970 +0000\x1b[0m (esc)
583 \x1b[0;35m@@ -1,1 +1,2 @@\x1b[0m (esc)
583 \x1b[0;35m@@ -1,1 +1,2 @@\x1b[0m (esc)
584 b1
584 b1
585 \x1b[0;32m+postm\x1b[0m (esc)
585 \x1b[0;32m+postm\x1b[0m (esc)
586
586
587 \x1b[0;33mchangeset: 5:302e9dd6890d\x1b[0m (esc)
587 \x1b[0;33mchangeset: 5:302e9dd6890d\x1b[0m (esc)
588 parent: 3:e62f78d544b4
588 parent: 3:e62f78d544b4
589 parent: 4:ddb82e70d1a1
589 parent: 4:ddb82e70d1a1
590 user: test
590 user: test
591 date: Thu Jan 01 00:00:01 1970 +0000
591 date: Thu Jan 01 00:00:01 1970 +0000
592 summary: m12
592 summary: m12
593
593
594 \x1b[0;1mdiff -r e62f78d544b4 -r 302e9dd6890d b2\x1b[0m (esc)
594 \x1b[0;1mdiff -r e62f78d544b4 -r 302e9dd6890d b2\x1b[0m (esc)
595 \x1b[0;31;1m--- /dev/null Thu Jan 01 00:00:00 1970 +0000\x1b[0m (esc)
595 \x1b[0;31;1m--- /dev/null Thu Jan 01 00:00:00 1970 +0000\x1b[0m (esc)
596 \x1b[0;32;1m+++ b/b2 Thu Jan 01 00:00:01 1970 +0000\x1b[0m (esc)
596 \x1b[0;32;1m+++ b/b2 Thu Jan 01 00:00:01 1970 +0000\x1b[0m (esc)
597 \x1b[0;35m@@ -0,0 +1,1 @@\x1b[0m (esc)
597 \x1b[0;35m@@ -0,0 +1,1 @@\x1b[0m (esc)
598 \x1b[0;32m+b2\x1b[0m (esc)
598 \x1b[0;32m+b2\x1b[0m (esc)
599
599
600
600
601
601
602 log -r tip --stat
602 log -r tip --stat
603
603
604 $ hg log -r tip --stat
604 $ hg log -r tip --stat
605 changeset: 6:2404bbcab562
605 changeset: 6:2404bbcab562
606 tag: tip
606 tag: tip
607 user: test
607 user: test
608 date: Thu Jan 01 00:00:01 1970 +0000
608 date: Thu Jan 01 00:00:01 1970 +0000
609 summary: b1.1
609 summary: b1.1
610
610
611 b1 | 1 +
611 b1 | 1 +
612 1 files changed, 1 insertions(+), 0 deletions(-)
612 1 files changed, 1 insertions(+), 0 deletions(-)
613
613
614
614
615 $ cd ..
615 $ cd ..
616
616
617 $ hg init usertest
617 $ hg init usertest
618 $ cd usertest
618 $ cd usertest
619
619
620 $ echo a > a
620 $ echo a > a
621 $ hg ci -A -m "a" -u "User One <user1@example.org>"
621 $ hg ci -A -m "a" -u "User One <user1@example.org>"
622 adding a
622 adding a
623 $ echo b > b
623 $ echo b > b
624 $ hg ci -A -m "b" -u "User Two <user2@example.org>"
624 $ hg ci -A -m "b" -u "User Two <user2@example.org>"
625 adding b
625 adding b
626
626
627 $ hg log -u "User One <user1@example.org>"
627 $ hg log -u "User One <user1@example.org>"
628 changeset: 0:29a4c94f1924
628 changeset: 0:29a4c94f1924
629 user: User One <user1@example.org>
629 user: User One <user1@example.org>
630 date: Thu Jan 01 00:00:00 1970 +0000
630 date: Thu Jan 01 00:00:00 1970 +0000
631 summary: a
631 summary: a
632
632
633 $ hg log -u "user1" -u "user2"
633 $ hg log -u "user1" -u "user2"
634 changeset: 1:e834b5e69c0e
634 changeset: 1:e834b5e69c0e
635 tag: tip
635 tag: tip
636 user: User Two <user2@example.org>
636 user: User Two <user2@example.org>
637 date: Thu Jan 01 00:00:00 1970 +0000
637 date: Thu Jan 01 00:00:00 1970 +0000
638 summary: b
638 summary: b
639
639
640 changeset: 0:29a4c94f1924
640 changeset: 0:29a4c94f1924
641 user: User One <user1@example.org>
641 user: User One <user1@example.org>
642 date: Thu Jan 01 00:00:00 1970 +0000
642 date: Thu Jan 01 00:00:00 1970 +0000
643 summary: a
643 summary: a
644
644
645 $ hg log -u "user3"
645 $ hg log -u "user3"
646
646
647 $ cd ..
647 $ cd ..
648
648
649 $ hg init branches
649 $ hg init branches
650 $ cd branches
650 $ cd branches
651
651
652 $ echo a > a
652 $ echo a > a
653 $ hg ci -A -m "commit on default"
653 $ hg ci -A -m "commit on default"
654 adding a
654 adding a
655 $ hg branch test
655 $ hg branch test
656 marked working directory as branch test
656 marked working directory as branch test
657 (branches are permanent and global, did you want a bookmark?)
657 (branches are permanent and global, did you want a bookmark?)
658 $ echo b > b
658 $ echo b > b
659 $ hg ci -A -m "commit on test"
659 $ hg ci -A -m "commit on test"
660 adding b
660 adding b
661
661
662 $ hg up default
662 $ hg up default
663 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
663 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
664 $ echo c > c
664 $ echo c > c
665 $ hg ci -A -m "commit on default"
665 $ hg ci -A -m "commit on default"
666 adding c
666 adding c
667 $ hg up test
667 $ hg up test
668 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
668 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
669 $ echo c > c
669 $ echo c > c
670 $ hg ci -A -m "commit on test"
670 $ hg ci -A -m "commit on test"
671 adding c
671 adding c
672
672
673
673
674 log -b default
674 log -b default
675
675
676 $ hg log -b default
676 $ hg log -b default
677 changeset: 2:c3a4f03cc9a7
677 changeset: 2:c3a4f03cc9a7
678 parent: 0:24427303d56f
678 parent: 0:24427303d56f
679 user: test
679 user: test
680 date: Thu Jan 01 00:00:00 1970 +0000
680 date: Thu Jan 01 00:00:00 1970 +0000
681 summary: commit on default
681 summary: commit on default
682
682
683 changeset: 0:24427303d56f
683 changeset: 0:24427303d56f
684 user: test
684 user: test
685 date: Thu Jan 01 00:00:00 1970 +0000
685 date: Thu Jan 01 00:00:00 1970 +0000
686 summary: commit on default
686 summary: commit on default
687
687
688
688
689
689
690 log -b test
690 log -b test
691
691
692 $ hg log -b test
692 $ hg log -b test
693 changeset: 3:f5d8de11c2e2
693 changeset: 3:f5d8de11c2e2
694 branch: test
694 branch: test
695 tag: tip
695 tag: tip
696 parent: 1:d32277701ccb
696 parent: 1:d32277701ccb
697 user: test
697 user: test
698 date: Thu Jan 01 00:00:00 1970 +0000
698 date: Thu Jan 01 00:00:00 1970 +0000
699 summary: commit on test
699 summary: commit on test
700
700
701 changeset: 1:d32277701ccb
701 changeset: 1:d32277701ccb
702 branch: test
702 branch: test
703 user: test
703 user: test
704 date: Thu Jan 01 00:00:00 1970 +0000
704 date: Thu Jan 01 00:00:00 1970 +0000
705 summary: commit on test
705 summary: commit on test
706
706
707
707
708
708
709 log -b dummy
709 log -b dummy
710
710
711 $ hg log -b dummy
711 $ hg log -b dummy
712 abort: unknown revision 'dummy'!
712 abort: unknown revision 'dummy'!
713 [255]
713 [255]
714
714
715
715
716 log -b .
716 log -b .
717
717
718 $ hg log -b .
718 $ hg log -b .
719 changeset: 3:f5d8de11c2e2
719 changeset: 3:f5d8de11c2e2
720 branch: test
720 branch: test
721 tag: tip
721 tag: tip
722 parent: 1:d32277701ccb
722 parent: 1:d32277701ccb
723 user: test
723 user: test
724 date: Thu Jan 01 00:00:00 1970 +0000
724 date: Thu Jan 01 00:00:00 1970 +0000
725 summary: commit on test
725 summary: commit on test
726
726
727 changeset: 1:d32277701ccb
727 changeset: 1:d32277701ccb
728 branch: test
728 branch: test
729 user: test
729 user: test
730 date: Thu Jan 01 00:00:00 1970 +0000
730 date: Thu Jan 01 00:00:00 1970 +0000
731 summary: commit on test
731 summary: commit on test
732
732
733
733
734
734
735 log -b default -b test
735 log -b default -b test
736
736
737 $ hg log -b default -b test
737 $ hg log -b default -b test
738 changeset: 3:f5d8de11c2e2
738 changeset: 3:f5d8de11c2e2
739 branch: test
739 branch: test
740 tag: tip
740 tag: tip
741 parent: 1:d32277701ccb
741 parent: 1:d32277701ccb
742 user: test
742 user: test
743 date: Thu Jan 01 00:00:00 1970 +0000
743 date: Thu Jan 01 00:00:00 1970 +0000
744 summary: commit on test
744 summary: commit on test
745
745
746 changeset: 2:c3a4f03cc9a7
746 changeset: 2:c3a4f03cc9a7
747 parent: 0:24427303d56f
747 parent: 0:24427303d56f
748 user: test
748 user: test
749 date: Thu Jan 01 00:00:00 1970 +0000
749 date: Thu Jan 01 00:00:00 1970 +0000
750 summary: commit on default
750 summary: commit on default
751
751
752 changeset: 1:d32277701ccb
752 changeset: 1:d32277701ccb
753 branch: test
753 branch: test
754 user: test
754 user: test
755 date: Thu Jan 01 00:00:00 1970 +0000
755 date: Thu Jan 01 00:00:00 1970 +0000
756 summary: commit on test
756 summary: commit on test
757
757
758 changeset: 0:24427303d56f
758 changeset: 0:24427303d56f
759 user: test
759 user: test
760 date: Thu Jan 01 00:00:00 1970 +0000
760 date: Thu Jan 01 00:00:00 1970 +0000
761 summary: commit on default
761 summary: commit on default
762
762
763
763
764
764
765 log -b default -b .
765 log -b default -b .
766
766
767 $ hg log -b default -b .
767 $ hg log -b default -b .
768 changeset: 3:f5d8de11c2e2
768 changeset: 3:f5d8de11c2e2
769 branch: test
769 branch: test
770 tag: tip
770 tag: tip
771 parent: 1:d32277701ccb
771 parent: 1:d32277701ccb
772 user: test
772 user: test
773 date: Thu Jan 01 00:00:00 1970 +0000
773 date: Thu Jan 01 00:00:00 1970 +0000
774 summary: commit on test
774 summary: commit on test
775
775
776 changeset: 2:c3a4f03cc9a7
776 changeset: 2:c3a4f03cc9a7
777 parent: 0:24427303d56f
777 parent: 0:24427303d56f
778 user: test
778 user: test
779 date: Thu Jan 01 00:00:00 1970 +0000
779 date: Thu Jan 01 00:00:00 1970 +0000
780 summary: commit on default
780 summary: commit on default
781
781
782 changeset: 1:d32277701ccb
782 changeset: 1:d32277701ccb
783 branch: test
783 branch: test
784 user: test
784 user: test
785 date: Thu Jan 01 00:00:00 1970 +0000
785 date: Thu Jan 01 00:00:00 1970 +0000
786 summary: commit on test
786 summary: commit on test
787
787
788 changeset: 0:24427303d56f
788 changeset: 0:24427303d56f
789 user: test
789 user: test
790 date: Thu Jan 01 00:00:00 1970 +0000
790 date: Thu Jan 01 00:00:00 1970 +0000
791 summary: commit on default
791 summary: commit on default
792
792
793
793
794
794
795 log -b . -b test
795 log -b . -b test
796
796
797 $ hg log -b . -b test
797 $ hg log -b . -b test
798 changeset: 3:f5d8de11c2e2
798 changeset: 3:f5d8de11c2e2
799 branch: test
799 branch: test
800 tag: tip
800 tag: tip
801 parent: 1:d32277701ccb
801 parent: 1:d32277701ccb
802 user: test
802 user: test
803 date: Thu Jan 01 00:00:00 1970 +0000
803 date: Thu Jan 01 00:00:00 1970 +0000
804 summary: commit on test
804 summary: commit on test
805
805
806 changeset: 1:d32277701ccb
806 changeset: 1:d32277701ccb
807 branch: test
807 branch: test
808 user: test
808 user: test
809 date: Thu Jan 01 00:00:00 1970 +0000
809 date: Thu Jan 01 00:00:00 1970 +0000
810 summary: commit on test
810 summary: commit on test
811
811
812
812
813
813
814 log -b 2
814 log -b 2
815
815
816 $ hg log -b 2
816 $ hg log -b 2
817 changeset: 2:c3a4f03cc9a7
817 changeset: 2:c3a4f03cc9a7
818 parent: 0:24427303d56f
818 parent: 0:24427303d56f
819 user: test
819 user: test
820 date: Thu Jan 01 00:00:00 1970 +0000
820 date: Thu Jan 01 00:00:00 1970 +0000
821 summary: commit on default
821 summary: commit on default
822
822
823 changeset: 0:24427303d56f
823 changeset: 0:24427303d56f
824 user: test
824 user: test
825 date: Thu Jan 01 00:00:00 1970 +0000
825 date: Thu Jan 01 00:00:00 1970 +0000
826 summary: commit on default
826 summary: commit on default
827
827
828
828
829
829
830 log -p --cwd dir (in subdir)
830 log -p --cwd dir (in subdir)
831
831
832 $ mkdir dir
832 $ mkdir dir
833 $ hg log -p --cwd dir
833 $ hg log -p --cwd dir
834 changeset: 3:f5d8de11c2e2
834 changeset: 3:f5d8de11c2e2
835 branch: test
835 branch: test
836 tag: tip
836 tag: tip
837 parent: 1:d32277701ccb
837 parent: 1:d32277701ccb
838 user: test
838 user: test
839 date: Thu Jan 01 00:00:00 1970 +0000
839 date: Thu Jan 01 00:00:00 1970 +0000
840 summary: commit on test
840 summary: commit on test
841
841
842 diff -r d32277701ccb -r f5d8de11c2e2 c
842 diff -r d32277701ccb -r f5d8de11c2e2 c
843 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
843 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
844 +++ b/c Thu Jan 01 00:00:00 1970 +0000
844 +++ b/c Thu Jan 01 00:00:00 1970 +0000
845 @@ -0,0 +1,1 @@
845 @@ -0,0 +1,1 @@
846 +c
846 +c
847
847
848 changeset: 2:c3a4f03cc9a7
848 changeset: 2:c3a4f03cc9a7
849 parent: 0:24427303d56f
849 parent: 0:24427303d56f
850 user: test
850 user: test
851 date: Thu Jan 01 00:00:00 1970 +0000
851 date: Thu Jan 01 00:00:00 1970 +0000
852 summary: commit on default
852 summary: commit on default
853
853
854 diff -r 24427303d56f -r c3a4f03cc9a7 c
854 diff -r 24427303d56f -r c3a4f03cc9a7 c
855 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
855 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
856 +++ b/c Thu Jan 01 00:00:00 1970 +0000
856 +++ b/c Thu Jan 01 00:00:00 1970 +0000
857 @@ -0,0 +1,1 @@
857 @@ -0,0 +1,1 @@
858 +c
858 +c
859
859
860 changeset: 1:d32277701ccb
860 changeset: 1:d32277701ccb
861 branch: test
861 branch: test
862 user: test
862 user: test
863 date: Thu Jan 01 00:00:00 1970 +0000
863 date: Thu Jan 01 00:00:00 1970 +0000
864 summary: commit on test
864 summary: commit on test
865
865
866 diff -r 24427303d56f -r d32277701ccb b
866 diff -r 24427303d56f -r d32277701ccb b
867 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
867 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
868 +++ b/b Thu Jan 01 00:00:00 1970 +0000
868 +++ b/b Thu Jan 01 00:00:00 1970 +0000
869 @@ -0,0 +1,1 @@
869 @@ -0,0 +1,1 @@
870 +b
870 +b
871
871
872 changeset: 0:24427303d56f
872 changeset: 0:24427303d56f
873 user: test
873 user: test
874 date: Thu Jan 01 00:00:00 1970 +0000
874 date: Thu Jan 01 00:00:00 1970 +0000
875 summary: commit on default
875 summary: commit on default
876
876
877 diff -r 000000000000 -r 24427303d56f a
877 diff -r 000000000000 -r 24427303d56f a
878 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
878 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
879 +++ b/a Thu Jan 01 00:00:00 1970 +0000
879 +++ b/a Thu Jan 01 00:00:00 1970 +0000
880 @@ -0,0 +1,1 @@
880 @@ -0,0 +1,1 @@
881 +a
881 +a
882
882
883
883
884
884
885 log -p -R repo
885 log -p -R repo
886
886
887 $ cd dir
887 $ cd dir
888 $ hg log -p -R .. ../a
888 $ hg log -p -R .. ../a
889 changeset: 0:24427303d56f
889 changeset: 0:24427303d56f
890 user: test
890 user: test
891 date: Thu Jan 01 00:00:00 1970 +0000
891 date: Thu Jan 01 00:00:00 1970 +0000
892 summary: commit on default
892 summary: commit on default
893
893
894 diff -r 000000000000 -r 24427303d56f a
894 diff -r 000000000000 -r 24427303d56f a
895 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
895 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
896 +++ b/a Thu Jan 01 00:00:00 1970 +0000
896 +++ b/a Thu Jan 01 00:00:00 1970 +0000
897 @@ -0,0 +1,1 @@
897 @@ -0,0 +1,1 @@
898 +a
898 +a
899
899
900
900
901
901
902 $ cd ..
902 $ cd ..
903 $ hg init follow2
903 $ hg init follow2
904 $ cd follow2
904 $ cd follow2
905
905
906
906
907 # Build the following history:
907 # Build the following history:
908 # tip - o - x - o - x - x
908 # tip - o - x - o - x - x
909 # \ /
909 # \ /
910 # o - o - o - x
910 # o - o - o - x
911 # \ /
911 # \ /
912 # o
912 # o
913 #
913 #
914 # Where "o" is a revision containing "foo" and
914 # Where "o" is a revision containing "foo" and
915 # "x" is a revision without "foo"
915 # "x" is a revision without "foo"
916
916
917 $ touch init
917 $ touch init
918 $ hg ci -A -m "init, unrelated"
918 $ hg ci -A -m "init, unrelated"
919 adding init
919 adding init
920 $ echo 'foo' > init
920 $ echo 'foo' > init
921 $ hg ci -m "change, unrelated"
921 $ hg ci -m "change, unrelated"
922 $ echo 'foo' > foo
922 $ echo 'foo' > foo
923 $ hg ci -A -m "add unrelated old foo"
923 $ hg ci -A -m "add unrelated old foo"
924 adding foo
924 adding foo
925 $ hg rm foo
925 $ hg rm foo
926 $ hg ci -m "delete foo, unrelated"
926 $ hg ci -m "delete foo, unrelated"
927 $ echo 'related' > foo
927 $ echo 'related' > foo
928 $ hg ci -A -m "add foo, related"
928 $ hg ci -A -m "add foo, related"
929 adding foo
929 adding foo
930
930
931 $ hg up 0
931 $ hg up 0
932 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
932 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
933 $ touch branch
933 $ touch branch
934 $ hg ci -A -m "first branch, unrelated"
934 $ hg ci -A -m "first branch, unrelated"
935 adding branch
935 adding branch
936 created new head
936 created new head
937 $ touch foo
937 $ touch foo
938 $ hg ci -A -m "create foo, related"
938 $ hg ci -A -m "create foo, related"
939 adding foo
939 adding foo
940 $ echo 'change' > foo
940 $ echo 'change' > foo
941 $ hg ci -m "change foo, related"
941 $ hg ci -m "change foo, related"
942
942
943 $ hg up 6
943 $ hg up 6
944 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
944 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
945 $ echo 'change foo in branch' > foo
945 $ echo 'change foo in branch' > foo
946 $ hg ci -m "change foo in branch, related"
946 $ hg ci -m "change foo in branch, related"
947 created new head
947 created new head
948 $ hg merge 7
948 $ hg merge 7
949 merging foo
949 merging foo
950 warning: conflicts during merge.
950 warning: conflicts during merge.
951 merging foo incomplete! (edit conflicts, then use 'hg resolve --mark')
951 merging foo incomplete! (edit conflicts, then use 'hg resolve --mark')
952 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
952 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
953 use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
953 use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
954 [1]
954 [1]
955 $ echo 'merge 1' > foo
955 $ echo 'merge 1' > foo
956 $ hg resolve -m foo
956 $ hg resolve -m foo
957 $ hg ci -m "First merge, related"
957 $ hg ci -m "First merge, related"
958
958
959 $ hg merge 4
959 $ hg merge 4
960 merging foo
960 merging foo
961 warning: conflicts during merge.
961 warning: conflicts during merge.
962 merging foo incomplete! (edit conflicts, then use 'hg resolve --mark')
962 merging foo incomplete! (edit conflicts, then use 'hg resolve --mark')
963 1 files updated, 0 files merged, 0 files removed, 1 files unresolved
963 1 files updated, 0 files merged, 0 files removed, 1 files unresolved
964 use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
964 use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
965 [1]
965 [1]
966 $ echo 'merge 2' > foo
966 $ echo 'merge 2' > foo
967 $ hg resolve -m foo
967 $ hg resolve -m foo
968 $ hg ci -m "Last merge, related"
968 $ hg ci -m "Last merge, related"
969
969
970 $ hg --config "extensions.graphlog=" glog
970 $ hg --config "extensions.graphlog=" glog
971 @ changeset: 10:4dae8563d2c5
971 @ changeset: 10:4dae8563d2c5
972 |\ tag: tip
972 |\ tag: tip
973 | | parent: 9:7b35701b003e
973 | | parent: 9:7b35701b003e
974 | | parent: 4:88176d361b69
974 | | parent: 4:88176d361b69
975 | | user: test
975 | | user: test
976 | | date: Thu Jan 01 00:00:00 1970 +0000
976 | | date: Thu Jan 01 00:00:00 1970 +0000
977 | | summary: Last merge, related
977 | | summary: Last merge, related
978 | |
978 | |
979 | o changeset: 9:7b35701b003e
979 | o changeset: 9:7b35701b003e
980 | |\ parent: 8:e5416ad8a855
980 | |\ parent: 8:e5416ad8a855
981 | | | parent: 7:87fe3144dcfa
981 | | | parent: 7:87fe3144dcfa
982 | | | user: test
982 | | | user: test
983 | | | date: Thu Jan 01 00:00:00 1970 +0000
983 | | | date: Thu Jan 01 00:00:00 1970 +0000
984 | | | summary: First merge, related
984 | | | summary: First merge, related
985 | | |
985 | | |
986 | | o changeset: 8:e5416ad8a855
986 | | o changeset: 8:e5416ad8a855
987 | | | parent: 6:dc6c325fe5ee
987 | | | parent: 6:dc6c325fe5ee
988 | | | user: test
988 | | | user: test
989 | | | date: Thu Jan 01 00:00:00 1970 +0000
989 | | | date: Thu Jan 01 00:00:00 1970 +0000
990 | | | summary: change foo in branch, related
990 | | | summary: change foo in branch, related
991 | | |
991 | | |
992 | o | changeset: 7:87fe3144dcfa
992 | o | changeset: 7:87fe3144dcfa
993 | |/ user: test
993 | |/ user: test
994 | | date: Thu Jan 01 00:00:00 1970 +0000
994 | | date: Thu Jan 01 00:00:00 1970 +0000
995 | | summary: change foo, related
995 | | summary: change foo, related
996 | |
996 | |
997 | o changeset: 6:dc6c325fe5ee
997 | o changeset: 6:dc6c325fe5ee
998 | | user: test
998 | | user: test
999 | | date: Thu Jan 01 00:00:00 1970 +0000
999 | | date: Thu Jan 01 00:00:00 1970 +0000
1000 | | summary: create foo, related
1000 | | summary: create foo, related
1001 | |
1001 | |
1002 | o changeset: 5:73db34516eb9
1002 | o changeset: 5:73db34516eb9
1003 | | parent: 0:e87515fd044a
1003 | | parent: 0:e87515fd044a
1004 | | user: test
1004 | | user: test
1005 | | date: Thu Jan 01 00:00:00 1970 +0000
1005 | | date: Thu Jan 01 00:00:00 1970 +0000
1006 | | summary: first branch, unrelated
1006 | | summary: first branch, unrelated
1007 | |
1007 | |
1008 o | changeset: 4:88176d361b69
1008 o | changeset: 4:88176d361b69
1009 | | user: test
1009 | | user: test
1010 | | date: Thu Jan 01 00:00:00 1970 +0000
1010 | | date: Thu Jan 01 00:00:00 1970 +0000
1011 | | summary: add foo, related
1011 | | summary: add foo, related
1012 | |
1012 | |
1013 o | changeset: 3:dd78ae4afb56
1013 o | changeset: 3:dd78ae4afb56
1014 | | user: test
1014 | | user: test
1015 | | date: Thu Jan 01 00:00:00 1970 +0000
1015 | | date: Thu Jan 01 00:00:00 1970 +0000
1016 | | summary: delete foo, unrelated
1016 | | summary: delete foo, unrelated
1017 | |
1017 | |
1018 o | changeset: 2:c4c64aedf0f7
1018 o | changeset: 2:c4c64aedf0f7
1019 | | user: test
1019 | | user: test
1020 | | date: Thu Jan 01 00:00:00 1970 +0000
1020 | | date: Thu Jan 01 00:00:00 1970 +0000
1021 | | summary: add unrelated old foo
1021 | | summary: add unrelated old foo
1022 | |
1022 | |
1023 o | changeset: 1:e5faa7440653
1023 o | changeset: 1:e5faa7440653
1024 |/ user: test
1024 |/ user: test
1025 | date: Thu Jan 01 00:00:00 1970 +0000
1025 | date: Thu Jan 01 00:00:00 1970 +0000
1026 | summary: change, unrelated
1026 | summary: change, unrelated
1027 |
1027 |
1028 o changeset: 0:e87515fd044a
1028 o changeset: 0:e87515fd044a
1029 user: test
1029 user: test
1030 date: Thu Jan 01 00:00:00 1970 +0000
1030 date: Thu Jan 01 00:00:00 1970 +0000
1031 summary: init, unrelated
1031 summary: init, unrelated
1032
1032
1033
1033
1034 $ hg --traceback log -f foo
1034 $ hg --traceback log -f foo
1035 changeset: 10:4dae8563d2c5
1035 changeset: 10:4dae8563d2c5
1036 tag: tip
1036 tag: tip
1037 parent: 9:7b35701b003e
1037 parent: 9:7b35701b003e
1038 parent: 4:88176d361b69
1038 parent: 4:88176d361b69
1039 user: test
1039 user: test
1040 date: Thu Jan 01 00:00:00 1970 +0000
1040 date: Thu Jan 01 00:00:00 1970 +0000
1041 summary: Last merge, related
1041 summary: Last merge, related
1042
1042
1043 changeset: 9:7b35701b003e
1043 changeset: 9:7b35701b003e
1044 parent: 8:e5416ad8a855
1044 parent: 8:e5416ad8a855
1045 parent: 7:87fe3144dcfa
1045 parent: 7:87fe3144dcfa
1046 user: test
1046 user: test
1047 date: Thu Jan 01 00:00:00 1970 +0000
1047 date: Thu Jan 01 00:00:00 1970 +0000
1048 summary: First merge, related
1048 summary: First merge, related
1049
1049
1050 changeset: 8:e5416ad8a855
1050 changeset: 8:e5416ad8a855
1051 parent: 6:dc6c325fe5ee
1051 parent: 6:dc6c325fe5ee
1052 user: test
1052 user: test
1053 date: Thu Jan 01 00:00:00 1970 +0000
1053 date: Thu Jan 01 00:00:00 1970 +0000
1054 summary: change foo in branch, related
1054 summary: change foo in branch, related
1055
1055
1056 changeset: 7:87fe3144dcfa
1056 changeset: 7:87fe3144dcfa
1057 user: test
1057 user: test
1058 date: Thu Jan 01 00:00:00 1970 +0000
1058 date: Thu Jan 01 00:00:00 1970 +0000
1059 summary: change foo, related
1059 summary: change foo, related
1060
1060
1061 changeset: 6:dc6c325fe5ee
1061 changeset: 6:dc6c325fe5ee
1062 user: test
1062 user: test
1063 date: Thu Jan 01 00:00:00 1970 +0000
1063 date: Thu Jan 01 00:00:00 1970 +0000
1064 summary: create foo, related
1064 summary: create foo, related
1065
1065
1066 changeset: 4:88176d361b69
1066 changeset: 4:88176d361b69
1067 user: test
1067 user: test
1068 date: Thu Jan 01 00:00:00 1970 +0000
1068 date: Thu Jan 01 00:00:00 1970 +0000
1069 summary: add foo, related
1069 summary: add foo, related
1070
1070
1071
1071
1072 Also check when maxrev < lastrevfilelog
1072 Also check when maxrev < lastrevfilelog
1073
1073
1074 $ hg --traceback log -f -r4 foo
1074 $ hg --traceback log -f -r4 foo
1075 changeset: 4:88176d361b69
1075 changeset: 4:88176d361b69
1076 user: test
1076 user: test
1077 date: Thu Jan 01 00:00:00 1970 +0000
1077 date: Thu Jan 01 00:00:00 1970 +0000
1078 summary: add foo, related
1078 summary: add foo, related
1079
1079
1080
1080
1081 Issue2383: hg log showing _less_ differences than hg diff
1081 Issue2383: hg log showing _less_ differences than hg diff
1082
1082
1083 $ hg init issue2383
1083 $ hg init issue2383
1084 $ cd issue2383
1084 $ cd issue2383
1085
1085
1086 Create a test repo:
1086 Create a test repo:
1087
1087
1088 $ echo a > a
1088 $ echo a > a
1089 $ hg ci -Am0
1089 $ hg ci -Am0
1090 adding a
1090 adding a
1091 $ echo b > b
1091 $ echo b > b
1092 $ hg ci -Am1
1092 $ hg ci -Am1
1093 adding b
1093 adding b
1094 $ hg co 0
1094 $ hg co 0
1095 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
1095 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
1096 $ echo b > a
1096 $ echo b > a
1097 $ hg ci -m2
1097 $ hg ci -m2
1098 created new head
1098 created new head
1099
1099
1100 Merge:
1100 Merge:
1101
1101
1102 $ hg merge
1102 $ hg merge
1103 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1103 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1104 (branch merge, don't forget to commit)
1104 (branch merge, don't forget to commit)
1105
1105
1106 Make sure there's a file listed in the merge to trigger the bug:
1106 Make sure there's a file listed in the merge to trigger the bug:
1107
1107
1108 $ echo c > a
1108 $ echo c > a
1109 $ hg ci -m3
1109 $ hg ci -m3
1110
1110
1111 Two files shown here in diff:
1111 Two files shown here in diff:
1112
1112
1113 $ hg diff --rev 2:3
1113 $ hg diff --rev 2:3
1114 diff -r b09be438c43a -r 8e07aafe1edc a
1114 diff -r b09be438c43a -r 8e07aafe1edc a
1115 --- a/a Thu Jan 01 00:00:00 1970 +0000
1115 --- a/a Thu Jan 01 00:00:00 1970 +0000
1116 +++ b/a Thu Jan 01 00:00:00 1970 +0000
1116 +++ b/a Thu Jan 01 00:00:00 1970 +0000
1117 @@ -1,1 +1,1 @@
1117 @@ -1,1 +1,1 @@
1118 -b
1118 -b
1119 +c
1119 +c
1120 diff -r b09be438c43a -r 8e07aafe1edc b
1120 diff -r b09be438c43a -r 8e07aafe1edc b
1121 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1121 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1122 +++ b/b Thu Jan 01 00:00:00 1970 +0000
1122 +++ b/b Thu Jan 01 00:00:00 1970 +0000
1123 @@ -0,0 +1,1 @@
1123 @@ -0,0 +1,1 @@
1124 +b
1124 +b
1125
1125
1126 Diff here should be the same:
1126 Diff here should be the same:
1127
1127
1128 $ hg log -vpr 3
1128 $ hg log -vpr 3
1129 changeset: 3:8e07aafe1edc
1129 changeset: 3:8e07aafe1edc
1130 tag: tip
1130 tag: tip
1131 parent: 2:b09be438c43a
1131 parent: 2:b09be438c43a
1132 parent: 1:925d80f479bb
1132 parent: 1:925d80f479bb
1133 user: test
1133 user: test
1134 date: Thu Jan 01 00:00:00 1970 +0000
1134 date: Thu Jan 01 00:00:00 1970 +0000
1135 files: a
1135 files: a
1136 description:
1136 description:
1137 3
1137 3
1138
1138
1139
1139
1140 diff -r b09be438c43a -r 8e07aafe1edc a
1140 diff -r b09be438c43a -r 8e07aafe1edc a
1141 --- a/a Thu Jan 01 00:00:00 1970 +0000
1141 --- a/a Thu Jan 01 00:00:00 1970 +0000
1142 +++ b/a Thu Jan 01 00:00:00 1970 +0000
1142 +++ b/a Thu Jan 01 00:00:00 1970 +0000
1143 @@ -1,1 +1,1 @@
1143 @@ -1,1 +1,1 @@
1144 -b
1144 -b
1145 +c
1145 +c
1146 diff -r b09be438c43a -r 8e07aafe1edc b
1146 diff -r b09be438c43a -r 8e07aafe1edc b
1147 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1147 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1148 +++ b/b Thu Jan 01 00:00:00 1970 +0000
1148 +++ b/b Thu Jan 01 00:00:00 1970 +0000
1149 @@ -0,0 +1,1 @@
1149 @@ -0,0 +1,1 @@
1150 +b
1150 +b
1151
1151
1152 $ cd ..
1152 $ cd ..
1153
1153
1154 'hg log -r rev fn' when last(filelog(fn)) != rev
1154 'hg log -r rev fn' when last(filelog(fn)) != rev
1155
1155
1156 $ hg init simplelog; cd simplelog
1156 $ hg init simplelog; cd simplelog
1157 $ echo f > a
1157 $ echo f > a
1158 $ hg ci -Am'a' -d '0 0'
1158 $ hg ci -Am'a' -d '0 0'
1159 adding a
1159 adding a
1160 $ echo f >> a
1160 $ echo f >> a
1161 $ hg ci -Am'a bis' -d '1 0'
1161 $ hg ci -Am'a bis' -d '1 0'
1162
1162
1163 $ hg log -r0 a
1163 $ hg log -r0 a
1164 changeset: 0:9f758d63dcde
1164 changeset: 0:9f758d63dcde
1165 user: test
1165 user: test
1166 date: Thu Jan 01 00:00:00 1970 +0000
1166 date: Thu Jan 01 00:00:00 1970 +0000
1167 summary: a
1167 summary: a
1168
1168
1169 $ cat > $HGTMP/testhidden.py << EOF
1169 $ cat > $HGTMP/testhidden.py << EOF
1170 > def reposetup(ui, repo):
1170 > def reposetup(ui, repo):
1171 > for line in repo.opener('hidden'):
1171 > for line in repo.opener('hidden'):
1172 > ctx = repo[line.strip()]
1172 > ctx = repo[line.strip()]
1173 > repo.changelog.hiddenrevs.add(ctx.rev())
1173 > repo.changelog.hiddenrevs.add(ctx.rev())
1174 > EOF
1174 > EOF
1175 $ echo '[extensions]' >> $HGRCPATH
1175 $ echo '[extensions]' >> $HGRCPATH
1176 $ echo "hidden=$HGTMP/testhidden.py" >> $HGRCPATH
1176 $ echo "hidden=$HGTMP/testhidden.py" >> $HGRCPATH
1177 $ touch .hg/hidden
1177 $ touch .hg/hidden
1178 $ hg log --template='{rev}:{node}\n'
1178 $ hg log --template='{rev}:{node}\n'
1179 1:a765632148dc55d38c35c4f247c618701886cb2f
1179 1:a765632148dc55d38c35c4f247c618701886cb2f
1180 0:9f758d63dcde62d547ebfb08e1e7ee96535f2b05
1180 0:9f758d63dcde62d547ebfb08e1e7ee96535f2b05
1181 $ echo a765632148dc55d38c35c4f247c618701886cb2f > .hg/hidden
1181 $ echo a765632148dc55d38c35c4f247c618701886cb2f > .hg/hidden
1182 $ hg log --template='{rev}:{node}\n'
1182 $ hg log --template='{rev}:{node}\n'
1183 0:9f758d63dcde62d547ebfb08e1e7ee96535f2b05
1183 0:9f758d63dcde62d547ebfb08e1e7ee96535f2b05
1184 $ hg log --template='{rev}:{node}\n' --hidden
1184 $ hg log --template='{rev}:{node}\n' --hidden
1185 1:a765632148dc55d38c35c4f247c618701886cb2f
1185 1:a765632148dc55d38c35c4f247c618701886cb2f
1186 0:9f758d63dcde62d547ebfb08e1e7ee96535f2b05
1186 0:9f758d63dcde62d547ebfb08e1e7ee96535f2b05
1187
1187
1188 clear extensions configuration
1188 clear extensions configuration
1189 $ echo '[extensions]' >> $HGRCPATH
1189 $ echo '[extensions]' >> $HGRCPATH
1190 $ echo "hidden=!" >> $HGRCPATH
1190 $ echo "hidden=!" >> $HGRCPATH
1191 $ cd ..
1191 $ cd ..
1192
1192
1193 test -u/-k for problematic encoding
1193 test -u/-k for problematic encoding
1194 # unicode: cp932:
1194 # unicode: cp932:
1195 # u30A2 0x83 0x41(= 'A')
1195 # u30A2 0x83 0x41(= 'A')
1196 # u30C2 0x83 0x61(= 'a')
1196 # u30C2 0x83 0x61(= 'a')
1197
1197
1198 $ hg init problematicencoding
1198 $ hg init problematicencoding
1199 $ cd problematicencoding
1199 $ cd problematicencoding
1200
1200
1201 $ python > setup.sh <<EOF
1201 $ python > setup.sh <<EOF
1202 > print u'''
1202 > print u'''
1203 > echo a > text
1203 > echo a > text
1204 > hg add text
1204 > hg add text
1205 > hg --encoding utf-8 commit -u '\u30A2' -m none
1205 > hg --encoding utf-8 commit -u '\u30A2' -m none
1206 > echo b > text
1206 > echo b > text
1207 > hg --encoding utf-8 commit -u '\u30C2' -m none
1207 > hg --encoding utf-8 commit -u '\u30C2' -m none
1208 > echo c > text
1208 > echo c > text
1209 > hg --encoding utf-8 commit -u none -m '\u30A2'
1209 > hg --encoding utf-8 commit -u none -m '\u30A2'
1210 > echo d > text
1210 > echo d > text
1211 > hg --encoding utf-8 commit -u none -m '\u30C2'
1211 > hg --encoding utf-8 commit -u none -m '\u30C2'
1212 > '''.encode('utf-8')
1212 > '''.encode('utf-8')
1213 > EOF
1213 > EOF
1214 $ sh < setup.sh
1214 $ sh < setup.sh
1215
1215
1216 test in problematic encoding
1216 test in problematic encoding
1217 $ python > test.sh <<EOF
1217 $ python > test.sh <<EOF
1218 > print u'''
1218 > print u'''
1219 > hg --encoding cp932 log --template '{rev}\\n' -u '\u30A2'
1219 > hg --encoding cp932 log --template '{rev}\\n' -u '\u30A2'
1220 > echo ====
1220 > echo ====
1221 > hg --encoding cp932 log --template '{rev}\\n' -u '\u30C2'
1221 > hg --encoding cp932 log --template '{rev}\\n' -u '\u30C2'
1222 > echo ====
1222 > echo ====
1223 > hg --encoding cp932 log --template '{rev}\\n' -k '\u30A2'
1223 > hg --encoding cp932 log --template '{rev}\\n' -k '\u30A2'
1224 > echo ====
1224 > echo ====
1225 > hg --encoding cp932 log --template '{rev}\\n' -k '\u30C2'
1225 > hg --encoding cp932 log --template '{rev}\\n' -k '\u30C2'
1226 > '''.encode('cp932')
1226 > '''.encode('cp932')
1227 > EOF
1227 > EOF
1228 $ sh < test.sh
1228 $ sh < test.sh
1229 0
1229 0
1230 ====
1230 ====
1231 1
1231 1
1232 ====
1232 ====
1233 2
1233 2
1234 0
1234 0
1235 ====
1235 ====
1236 3
1236 3
1237 1
1237 1
1238
1238
1239 $ cd ..
1239 $ cd ..
General Comments 0
You need to be logged in to leave comments. Login now