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