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