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