Show More
@@ -21,11 +21,15 b' set up a boring main branch' | |||
|
21 | 21 | $ hg add x/y |
|
22 | 22 | $ hg ci -m2 |
|
23 | 23 | $ cd .. |
|
24 | ||
|
24 | 25 | $ show() |
|
25 | 26 | > { |
|
26 |
> echo " |
|
|
27 | > echo "# $2:" | |
|
28 | > echo | |
|
29 | > echo "% hg st -C $1" | |
|
27 | 30 | > hg st -C $1 |
|
28 | 31 | > echo |
|
32 | > echo "% hg diff --git $1" | |
|
29 | 33 | > hg diff --git $1 |
|
30 | 34 | > echo |
|
31 | 35 | > } |
@@ -35,24 +39,28 b' make a new branch and get diff/status ou' | |||
|
35 | 39 | $1 - first commit |
|
36 | 40 | $2 - second commit |
|
37 | 41 | $3 - working dir action |
|
38 | $4 - test description | |
|
39 | 42 | |
|
40 | 43 | $ tb() |
|
41 | 44 | > { |
|
42 | > hg clone t t2 ; cd t2 | |
|
45 | > hg clone -q t t2 ; cd t2 | |
|
43 | 46 | > hg co -q -C 0 |
|
44 | 47 | > |
|
48 | > echo % add a $count | |
|
45 | 49 | > add a $count |
|
46 | 50 | > count=`expr $count + 1` |
|
51 | > echo % hg ci -m "t0" | |
|
47 | 52 | > hg ci -m "t0" |
|
53 | > echo % $1 | |
|
48 | 54 | > $1 |
|
55 | > echo % hg ci -m "t1" | |
|
49 | 56 |
|
|
57 | > echo % $2 | |
|
50 | 58 | > $2 |
|
59 | > echo % hg ci -m "t2" | |
|
51 | 60 |
|
|
61 | > echo % $3 | |
|
52 | 62 | > $3 |
|
53 | > | |
|
54 | > echo "** $4 **" | |
|
55 | > echo "** $1 / $2 / $3" | |
|
63 | > echo | |
|
56 | 64 | > show "" "working to parent" |
|
57 | 65 | > show "--rev 0" "working to root" |
|
58 | 66 | > show "--rev 2" "working to branch" |
@@ -64,26 +72,39 b' make a new branch and get diff/status ou' | |||
|
64 | 72 | > cd .. |
|
65 | 73 | > rm -rf t2 |
|
66 | 74 | > } |
|
67 | $ tb "add a a1" "add a a2" "hg mv a b" "rename in working dir" | |
|
68 | updating to branch default | |
|
69 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
|
75 | ||
|
76 | rename in working dir | |
|
77 | ||
|
78 | $ tb "add a a1" "add a a2" "hg mv a b" | |
|
79 | % add a 0 | |
|
80 | % hg ci -m t0 | |
|
70 | 81 | created new head |
|
71 | ** rename in working dir ** | |
|
72 | ** add a a1 / add a a2 / hg mv a b | |
|
73 | - working to parent: | |
|
82 | % add a a1 | |
|
83 | % hg ci -m t1 | |
|
84 | % add a a2 | |
|
85 | % hg ci -m t2 | |
|
86 | % hg mv a b | |
|
87 | ||
|
88 | # working to parent: | |
|
89 | ||
|
90 | % hg st -C | |
|
74 | 91 | A b |
|
75 | 92 | a |
|
76 | 93 | R a |
|
77 | 94 | |
|
95 | % hg diff --git | |
|
78 | 96 | diff --git a/a b/b |
|
79 | 97 | rename from a |
|
80 | 98 | rename to b |
|
81 | 99 | |
|
82 |
|
|
|
100 | # working to root: | |
|
101 | ||
|
102 | % hg st -C --rev 0 | |
|
83 | 103 | A b |
|
84 | 104 | a |
|
85 | 105 | R a |
|
86 | 106 | |
|
107 | % hg diff --git --rev 0 | |
|
87 | 108 | diff --git a/a b/b |
|
88 | 109 | rename from a |
|
89 | 110 | rename to b |
@@ -95,12 +116,15 b' make a new branch and get diff/status ou' | |||
|
95 | 116 | +a1 |
|
96 | 117 | +a2 |
|
97 | 118 | |
|
98 |
|
|
|
119 | # working to branch: | |
|
120 | ||
|
121 | % hg st -C --rev 2 | |
|
99 | 122 | A b |
|
100 | 123 | a |
|
101 | 124 | R a |
|
102 | 125 | R x/y |
|
103 | 126 | |
|
127 | % hg diff --git --rev 2 | |
|
104 | 128 | diff --git a/a b/b |
|
105 | 129 | rename from a |
|
106 | 130 | rename to b |
@@ -120,9 +144,12 b' make a new branch and get diff/status ou' | |||
|
120 | 144 | @@ -1,1 +0,0 @@ |
|
121 | 145 | -y1 |
|
122 | 146 | |
|
123 |
|
|
|
147 | # root to parent: | |
|
148 | ||
|
149 | % hg st -C --rev 0 --rev . | |
|
124 | 150 | M a |
|
125 | 151 | |
|
152 | % hg diff --git --rev 0 --rev . | |
|
126 | 153 | diff --git a/a b/a |
|
127 | 154 | --- a/a |
|
128 | 155 | +++ b/a |
@@ -132,9 +159,12 b' make a new branch and get diff/status ou' | |||
|
132 | 159 | +a1 |
|
133 | 160 | +a2 |
|
134 | 161 | |
|
135 |
|
|
|
162 | # parent to root: | |
|
163 | ||
|
164 | % hg st -C --rev . --rev 0 | |
|
136 | 165 | M a |
|
137 | 166 | |
|
167 | % hg diff --git --rev . --rev 0 | |
|
138 | 168 | diff --git a/a b/a |
|
139 | 169 | --- a/a |
|
140 | 170 | +++ b/a |
@@ -144,10 +174,13 b' make a new branch and get diff/status ou' | |||
|
144 | 174 | -a1 |
|
145 | 175 | -a2 |
|
146 | 176 | |
|
147 |
|
|
|
177 | # branch to parent: | |
|
178 | ||
|
179 | % hg st -C --rev 2 --rev . | |
|
148 | 180 | M a |
|
149 | 181 | R x/y |
|
150 | 182 | |
|
183 | % hg diff --git --rev 2 --rev . | |
|
151 | 184 | diff --git a/a b/a |
|
152 | 185 | --- a/a |
|
153 | 186 | +++ b/a |
@@ -165,10 +198,13 b' make a new branch and get diff/status ou' | |||
|
165 | 198 | @@ -1,1 +0,0 @@ |
|
166 | 199 | -y1 |
|
167 | 200 | |
|
168 |
|
|
|
201 | # parent to branch: | |
|
202 | ||
|
203 | % hg st -C --rev . --rev 2 | |
|
169 | 204 | M a |
|
170 | 205 | A x/y |
|
171 | 206 | |
|
207 | % hg diff --git --rev . --rev 2 | |
|
172 | 208 | diff --git a/a b/a |
|
173 | 209 | --- a/a |
|
174 | 210 | +++ b/a |
@@ -187,25 +223,37 b' make a new branch and get diff/status ou' | |||
|
187 | 223 | +y1 |
|
188 | 224 | |
|
189 | 225 | |
|
190 | $ tb "add a a1" "add a a2" "hg cp a b" "copy in working dir" | |
|
191 | updating to branch default | |
|
192 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
|
226 | copy in working dir | |
|
227 | ||
|
228 | $ tb "add a a1" "add a a2" "hg cp a b" | |
|
229 | % add a 1 | |
|
230 | % hg ci -m t0 | |
|
193 | 231 | created new head |
|
194 | ** copy in working dir ** | |
|
195 | ** add a a1 / add a a2 / hg cp a b | |
|
196 | - working to parent: | |
|
232 | % add a a1 | |
|
233 | % hg ci -m t1 | |
|
234 | % add a a2 | |
|
235 | % hg ci -m t2 | |
|
236 | % hg cp a b | |
|
237 | ||
|
238 | # working to parent: | |
|
239 | ||
|
240 | % hg st -C | |
|
197 | 241 | A b |
|
198 | 242 | a |
|
199 | 243 | |
|
244 | % hg diff --git | |
|
200 | 245 | diff --git a/a b/b |
|
201 | 246 | copy from a |
|
202 | 247 | copy to b |
|
203 | 248 | |
|
204 |
|
|
|
249 | # working to root: | |
|
250 | ||
|
251 | % hg st -C --rev 0 | |
|
205 | 252 | M a |
|
206 | 253 | A b |
|
207 | 254 | a |
|
208 | 255 | |
|
256 | % hg diff --git --rev 0 | |
|
209 | 257 | diff --git a/a b/a |
|
210 | 258 | --- a/a |
|
211 | 259 | +++ b/a |
@@ -225,12 +273,15 b' make a new branch and get diff/status ou' | |||
|
225 | 273 | +a1 |
|
226 | 274 | +a2 |
|
227 | 275 | |
|
228 |
|
|
|
276 | # working to branch: | |
|
277 | ||
|
278 | % hg st -C --rev 2 | |
|
229 | 279 | M a |
|
230 | 280 | A b |
|
231 | 281 | a |
|
232 | 282 | R x/y |
|
233 | 283 | |
|
284 | % hg diff --git --rev 2 | |
|
234 | 285 | diff --git a/a b/a |
|
235 | 286 | --- a/a |
|
236 | 287 | +++ b/a |
@@ -260,9 +311,12 b' make a new branch and get diff/status ou' | |||
|
260 | 311 | @@ -1,1 +0,0 @@ |
|
261 | 312 | -y1 |
|
262 | 313 | |
|
263 |
|
|
|
314 | # root to parent: | |
|
315 | ||
|
316 | % hg st -C --rev 0 --rev . | |
|
264 | 317 | M a |
|
265 | 318 | |
|
319 | % hg diff --git --rev 0 --rev . | |
|
266 | 320 | diff --git a/a b/a |
|
267 | 321 | --- a/a |
|
268 | 322 | +++ b/a |
@@ -272,9 +326,12 b' make a new branch and get diff/status ou' | |||
|
272 | 326 | +a1 |
|
273 | 327 | +a2 |
|
274 | 328 | |
|
275 |
|
|
|
329 | # parent to root: | |
|
330 | ||
|
331 | % hg st -C --rev . --rev 0 | |
|
276 | 332 | M a |
|
277 | 333 | |
|
334 | % hg diff --git --rev . --rev 0 | |
|
278 | 335 | diff --git a/a b/a |
|
279 | 336 | --- a/a |
|
280 | 337 | +++ b/a |
@@ -284,10 +341,13 b' make a new branch and get diff/status ou' | |||
|
284 | 341 | -a1 |
|
285 | 342 | -a2 |
|
286 | 343 | |
|
287 |
|
|
|
344 | # branch to parent: | |
|
345 | ||
|
346 | % hg st -C --rev 2 --rev . | |
|
288 | 347 | M a |
|
289 | 348 | R x/y |
|
290 | 349 | |
|
350 | % hg diff --git --rev 2 --rev . | |
|
291 | 351 | diff --git a/a b/a |
|
292 | 352 | --- a/a |
|
293 | 353 | +++ b/a |
@@ -305,10 +365,13 b' make a new branch and get diff/status ou' | |||
|
305 | 365 | @@ -1,1 +0,0 @@ |
|
306 | 366 | -y1 |
|
307 | 367 | |
|
308 |
|
|
|
368 | # parent to branch: | |
|
369 | ||
|
370 | % hg st -C --rev . --rev 2 | |
|
309 | 371 | M a |
|
310 | 372 | A x/y |
|
311 | 373 | |
|
374 | % hg diff --git --rev . --rev 2 | |
|
312 | 375 | diff --git a/a b/a |
|
313 | 376 | --- a/a |
|
314 | 377 | +++ b/a |
@@ -327,15 +390,24 b' make a new branch and get diff/status ou' | |||
|
327 | 390 | +y1 |
|
328 | 391 | |
|
329 | 392 | |
|
330 | $ tb "hg mv a b" "add b b1" "add b w" "single rename" | |
|
331 | updating to branch default | |
|
332 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
|
393 | single rename | |
|
394 | ||
|
395 | $ tb "hg mv a b" "add b b1" "add b w" | |
|
396 | % add a 2 | |
|
397 | % hg ci -m t0 | |
|
333 | 398 | created new head |
|
334 | ** single rename ** | |
|
335 | ** hg mv a b / add b b1 / add b w | |
|
336 | - working to parent: | |
|
399 | % hg mv a b | |
|
400 | % hg ci -m t1 | |
|
401 | % add b b1 | |
|
402 | % hg ci -m t2 | |
|
403 | % add b w | |
|
404 | ||
|
405 | # working to parent: | |
|
406 | ||
|
407 | % hg st -C | |
|
337 | 408 | M b |
|
338 | 409 | |
|
410 | % hg diff --git | |
|
339 | 411 | diff --git a/b b/b |
|
340 | 412 | --- a/b |
|
341 | 413 | +++ b/b |
@@ -345,11 +417,14 b' make a new branch and get diff/status ou' | |||
|
345 | 417 | b1 |
|
346 | 418 | +w |
|
347 | 419 | |
|
348 |
|
|
|
420 | # working to root: | |
|
421 | ||
|
422 | % hg st -C --rev 0 | |
|
349 | 423 | A b |
|
350 | 424 | a |
|
351 | 425 | R a |
|
352 | 426 | |
|
427 | % hg diff --git --rev 0 | |
|
353 | 428 | diff --git a/a b/b |
|
354 | 429 | rename from a |
|
355 | 430 | rename to b |
@@ -361,12 +436,15 b' make a new branch and get diff/status ou' | |||
|
361 | 436 | +b1 |
|
362 | 437 | +w |
|
363 | 438 | |
|
364 |
|
|
|
439 | # working to branch: | |
|
440 | ||
|
441 | % hg st -C --rev 2 | |
|
365 | 442 | A b |
|
366 | 443 | a |
|
367 | 444 | R a |
|
368 | 445 | R x/y |
|
369 | 446 | |
|
447 | % hg diff --git --rev 2 | |
|
370 | 448 | diff --git a/a b/b |
|
371 | 449 | rename from a |
|
372 | 450 | rename to b |
@@ -386,11 +464,14 b' make a new branch and get diff/status ou' | |||
|
386 | 464 | @@ -1,1 +0,0 @@ |
|
387 | 465 | -y1 |
|
388 | 466 | |
|
389 |
|
|
|
467 | # root to parent: | |
|
468 | ||
|
469 | % hg st -C --rev 0 --rev . | |
|
390 | 470 | A b |
|
391 | 471 | a |
|
392 | 472 | R a |
|
393 | 473 | |
|
474 | % hg diff --git --rev 0 --rev . | |
|
394 | 475 | diff --git a/a b/b |
|
395 | 476 | rename from a |
|
396 | 477 | rename to b |
@@ -401,11 +482,14 b' make a new branch and get diff/status ou' | |||
|
401 | 482 | +2 |
|
402 | 483 | +b1 |
|
403 | 484 | |
|
404 |
|
|
|
485 | # parent to root: | |
|
486 | ||
|
487 | % hg st -C --rev . --rev 0 | |
|
405 | 488 | A a |
|
406 | 489 | b |
|
407 | 490 | R b |
|
408 | 491 | |
|
492 | % hg diff --git --rev . --rev 0 | |
|
409 | 493 | diff --git a/b b/a |
|
410 | 494 | rename from b |
|
411 | 495 | rename to a |
@@ -416,12 +500,15 b' make a new branch and get diff/status ou' | |||
|
416 | 500 | -2 |
|
417 | 501 | -b1 |
|
418 | 502 | |
|
419 |
|
|
|
503 | # branch to parent: | |
|
504 | ||
|
505 | % hg st -C --rev 2 --rev . | |
|
420 | 506 | A b |
|
421 | 507 | a |
|
422 | 508 | R a |
|
423 | 509 | R x/y |
|
424 | 510 | |
|
511 | % hg diff --git --rev 2 --rev . | |
|
425 | 512 | diff --git a/a b/b |
|
426 | 513 | rename from a |
|
427 | 514 | rename to b |
@@ -440,12 +527,15 b' make a new branch and get diff/status ou' | |||
|
440 | 527 | @@ -1,1 +0,0 @@ |
|
441 | 528 | -y1 |
|
442 | 529 | |
|
443 |
|
|
|
530 | # parent to branch: | |
|
531 | ||
|
532 | % hg st -C --rev . --rev 2 | |
|
444 | 533 | A a |
|
445 | 534 | b |
|
446 | 535 | A x/y |
|
447 | 536 | R b |
|
448 | 537 | |
|
538 | % hg diff --git --rev . --rev 2 | |
|
449 | 539 | diff --git a/b b/a |
|
450 | 540 | rename from b |
|
451 | 541 | rename to a |
@@ -465,15 +555,24 b' make a new branch and get diff/status ou' | |||
|
465 | 555 | +y1 |
|
466 | 556 | |
|
467 | 557 | |
|
468 | $ tb "hg cp a b" "add b b1" "add a w" "single copy" | |
|
469 | updating to branch default | |
|
470 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
|
558 | single copy | |
|
559 | ||
|
560 | $ tb "hg cp a b" "add b b1" "add a w" | |
|
561 | % add a 3 | |
|
562 | % hg ci -m t0 | |
|
471 | 563 | created new head |
|
472 | ** single copy ** | |
|
473 | ** hg cp a b / add b b1 / add a w | |
|
474 | - working to parent: | |
|
564 | % hg cp a b | |
|
565 | % hg ci -m t1 | |
|
566 | % add b b1 | |
|
567 | % hg ci -m t2 | |
|
568 | % add a w | |
|
569 | ||
|
570 | # working to parent: | |
|
571 | ||
|
572 | % hg st -C | |
|
475 | 573 | M a |
|
476 | 574 | |
|
575 | % hg diff --git | |
|
477 | 576 | diff --git a/a b/a |
|
478 | 577 | --- a/a |
|
479 | 578 | +++ b/a |
@@ -482,11 +581,14 b' make a new branch and get diff/status ou' | |||
|
482 | 581 | 3 |
|
483 | 582 | +w |
|
484 | 583 | |
|
485 |
|
|
|
584 | # working to root: | |
|
585 | ||
|
586 | % hg st -C --rev 0 | |
|
486 | 587 | M a |
|
487 | 588 | A b |
|
488 | 589 | a |
|
489 | 590 | |
|
591 | % hg diff --git --rev 0 | |
|
490 | 592 | diff --git a/a b/a |
|
491 | 593 | --- a/a |
|
492 | 594 | +++ b/a |
@@ -504,12 +606,15 b' make a new branch and get diff/status ou' | |||
|
504 | 606 | +3 |
|
505 | 607 | +b1 |
|
506 | 608 | |
|
507 |
|
|
|
609 | # working to branch: | |
|
610 | ||
|
611 | % hg st -C --rev 2 | |
|
508 | 612 | M a |
|
509 | 613 | A b |
|
510 | 614 | a |
|
511 | 615 | R x/y |
|
512 | 616 | |
|
617 | % hg diff --git --rev 2 | |
|
513 | 618 | diff --git a/a b/a |
|
514 | 619 | --- a/a |
|
515 | 620 | +++ b/a |
@@ -537,11 +642,14 b' make a new branch and get diff/status ou' | |||
|
537 | 642 | @@ -1,1 +0,0 @@ |
|
538 | 643 | -y1 |
|
539 | 644 | |
|
540 |
|
|
|
645 | # root to parent: | |
|
646 | ||
|
647 | % hg st -C --rev 0 --rev . | |
|
541 | 648 | M a |
|
542 | 649 | A b |
|
543 | 650 | a |
|
544 | 651 | |
|
652 | % hg diff --git --rev 0 --rev . | |
|
545 | 653 | diff --git a/a b/a |
|
546 | 654 | --- a/a |
|
547 | 655 | +++ b/a |
@@ -558,11 +666,14 b' make a new branch and get diff/status ou' | |||
|
558 | 666 | +3 |
|
559 | 667 | +b1 |
|
560 | 668 | |
|
561 |
|
|
|
669 | # parent to root: | |
|
670 | ||
|
671 | % hg st -C --rev . --rev 0 | |
|
562 | 672 | M a |
|
563 | 673 | b |
|
564 | 674 | R b |
|
565 | 675 | |
|
676 | % hg diff --git --rev . --rev 0 | |
|
566 | 677 | diff --git a/a b/a |
|
567 | 678 | --- a/a |
|
568 | 679 | +++ b/a |
@@ -578,12 +689,15 b' make a new branch and get diff/status ou' | |||
|
578 | 689 | -3 |
|
579 | 690 | -b1 |
|
580 | 691 | |
|
581 |
|
|
|
692 | # branch to parent: | |
|
693 | ||
|
694 | % hg st -C --rev 2 --rev . | |
|
582 | 695 | M a |
|
583 | 696 | A b |
|
584 | 697 | a |
|
585 | 698 | R x/y |
|
586 | 699 | |
|
700 | % hg diff --git --rev 2 --rev . | |
|
587 | 701 | diff --git a/a b/a |
|
588 | 702 | --- a/a |
|
589 | 703 | +++ b/a |
@@ -610,12 +724,15 b' make a new branch and get diff/status ou' | |||
|
610 | 724 | @@ -1,1 +0,0 @@ |
|
611 | 725 | -y1 |
|
612 | 726 | |
|
613 |
|
|
|
727 | # parent to branch: | |
|
728 | ||
|
729 | % hg st -C --rev . --rev 2 | |
|
614 | 730 | M a |
|
615 | 731 | b |
|
616 | 732 | A x/y |
|
617 | 733 | R b |
|
618 | 734 | |
|
735 | % hg diff --git --rev . --rev 2 | |
|
619 | 736 | diff --git a/a b/a |
|
620 | 737 | --- a/a |
|
621 | 738 | +++ b/a |
@@ -640,26 +757,38 b' make a new branch and get diff/status ou' | |||
|
640 | 757 | +y1 |
|
641 | 758 | |
|
642 | 759 | |
|
643 | $ tb "hg mv a b" "hg mv b c" "hg mv c d" "rename chain" | |
|
644 | updating to branch default | |
|
645 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
|
760 | rename chain | |
|
761 | ||
|
762 | $ tb "hg mv a b" "hg mv b c" "hg mv c d" | |
|
763 | % add a 4 | |
|
764 | % hg ci -m t0 | |
|
646 | 765 | created new head |
|
647 | ** rename chain ** | |
|
648 | ** hg mv a b / hg mv b c / hg mv c d | |
|
649 | - working to parent: | |
|
766 | % hg mv a b | |
|
767 | % hg ci -m t1 | |
|
768 | % hg mv b c | |
|
769 | % hg ci -m t2 | |
|
770 | % hg mv c d | |
|
771 | ||
|
772 | # working to parent: | |
|
773 | ||
|
774 | % hg st -C | |
|
650 | 775 | A d |
|
651 | 776 | c |
|
652 | 777 | R c |
|
653 | 778 | |
|
779 | % hg diff --git | |
|
654 | 780 | diff --git a/c b/d |
|
655 | 781 | rename from c |
|
656 | 782 | rename to d |
|
657 | 783 | |
|
658 |
|
|
|
784 | # working to root: | |
|
785 | ||
|
786 | % hg st -C --rev 0 | |
|
659 | 787 | A d |
|
660 | 788 | a |
|
661 | 789 | R a |
|
662 | 790 | |
|
791 | % hg diff --git --rev 0 | |
|
663 | 792 | diff --git a/a b/d |
|
664 | 793 | rename from a |
|
665 | 794 | rename to d |
@@ -669,12 +798,15 b' make a new branch and get diff/status ou' | |||
|
669 | 798 | a |
|
670 | 799 | +4 |
|
671 | 800 | |
|
672 |
|
|
|
801 | # working to branch: | |
|
802 | ||
|
803 | % hg st -C --rev 2 | |
|
673 | 804 | A d |
|
674 | 805 | a |
|
675 | 806 | R a |
|
676 | 807 | R x/y |
|
677 | 808 | |
|
809 | % hg diff --git --rev 2 | |
|
678 | 810 | diff --git a/a b/d |
|
679 | 811 | rename from a |
|
680 | 812 | rename to d |
@@ -692,11 +824,14 b' make a new branch and get diff/status ou' | |||
|
692 | 824 | @@ -1,1 +0,0 @@ |
|
693 | 825 | -y1 |
|
694 | 826 | |
|
695 |
|
|
|
827 | # root to parent: | |
|
828 | ||
|
829 | % hg st -C --rev 0 --rev . | |
|
696 | 830 | A c |
|
697 | 831 | a |
|
698 | 832 | R a |
|
699 | 833 | |
|
834 | % hg diff --git --rev 0 --rev . | |
|
700 | 835 | diff --git a/a b/c |
|
701 | 836 | rename from a |
|
702 | 837 | rename to c |
@@ -706,11 +841,14 b' make a new branch and get diff/status ou' | |||
|
706 | 841 | a |
|
707 | 842 | +4 |
|
708 | 843 | |
|
709 |
|
|
|
844 | # parent to root: | |
|
845 | ||
|
846 | % hg st -C --rev . --rev 0 | |
|
710 | 847 | A a |
|
711 | 848 | c |
|
712 | 849 | R c |
|
713 | 850 | |
|
851 | % hg diff --git --rev . --rev 0 | |
|
714 | 852 | diff --git a/c b/a |
|
715 | 853 | rename from c |
|
716 | 854 | rename to a |
@@ -720,12 +858,15 b' make a new branch and get diff/status ou' | |||
|
720 | 858 | a |
|
721 | 859 | -4 |
|
722 | 860 | |
|
723 |
|
|
|
861 | # branch to parent: | |
|
862 | ||
|
863 | % hg st -C --rev 2 --rev . | |
|
724 | 864 | A c |
|
725 | 865 | a |
|
726 | 866 | R a |
|
727 | 867 | R x/y |
|
728 | 868 | |
|
869 | % hg diff --git --rev 2 --rev . | |
|
729 | 870 | diff --git a/a b/c |
|
730 | 871 | rename from a |
|
731 | 872 | rename to c |
@@ -743,12 +884,15 b' make a new branch and get diff/status ou' | |||
|
743 | 884 | @@ -1,1 +0,0 @@ |
|
744 | 885 | -y1 |
|
745 | 886 | |
|
746 |
|
|
|
887 | # parent to branch: | |
|
888 | ||
|
889 | % hg st -C --rev . --rev 2 | |
|
747 | 890 | A a |
|
748 | 891 | c |
|
749 | 892 | A x/y |
|
750 | 893 | R c |
|
751 | 894 | |
|
895 | % hg diff --git --rev . --rev 2 | |
|
752 | 896 | diff --git a/c b/a |
|
753 | 897 | rename from c |
|
754 | 898 | rename to a |
@@ -767,21 +911,32 b' make a new branch and get diff/status ou' | |||
|
767 | 911 | +y1 |
|
768 | 912 | |
|
769 | 913 | |
|
770 | $ tb "hg cp a b" "hg cp b c" "hg cp c d" "copy chain" | |
|
771 | updating to branch default | |
|
772 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
|
914 | copy chain | |
|
915 | ||
|
916 | $ tb "hg cp a b" "hg cp b c" "hg cp c d" | |
|
917 | % add a 5 | |
|
918 | % hg ci -m t0 | |
|
773 | 919 | created new head |
|
774 | ** copy chain ** | |
|
775 | ** hg cp a b / hg cp b c / hg cp c d | |
|
776 | - working to parent: | |
|
920 | % hg cp a b | |
|
921 | % hg ci -m t1 | |
|
922 | % hg cp b c | |
|
923 | % hg ci -m t2 | |
|
924 | % hg cp c d | |
|
925 | ||
|
926 | # working to parent: | |
|
927 | ||
|
928 | % hg st -C | |
|
777 | 929 | A d |
|
778 | 930 | c |
|
779 | 931 | |
|
932 | % hg diff --git | |
|
780 | 933 | diff --git a/c b/d |
|
781 | 934 | copy from c |
|
782 | 935 | copy to d |
|
783 | 936 | |
|
784 |
|
|
|
937 | # working to root: | |
|
938 | ||
|
939 | % hg st -C --rev 0 | |
|
785 | 940 | M a |
|
786 | 941 | A b |
|
787 | 942 | a |
@@ -790,6 +945,7 b' make a new branch and get diff/status ou' | |||
|
790 | 945 | A d |
|
791 | 946 | a |
|
792 | 947 | |
|
948 | % hg diff --git --rev 0 | |
|
793 | 949 | diff --git a/a b/a |
|
794 | 950 | --- a/a |
|
795 | 951 | +++ b/a |
@@ -821,7 +977,9 b' make a new branch and get diff/status ou' | |||
|
821 | 977 | a |
|
822 | 978 | +5 |
|
823 | 979 | |
|
824 |
|
|
|
980 | # working to branch: | |
|
981 | ||
|
982 | % hg st -C --rev 2 | |
|
825 | 983 | M a |
|
826 | 984 | A b |
|
827 | 985 | a |
@@ -831,6 +989,7 b' make a new branch and get diff/status ou' | |||
|
831 | 989 | a |
|
832 | 990 | R x/y |
|
833 | 991 | |
|
992 | % hg diff --git --rev 2 | |
|
834 | 993 | diff --git a/a b/a |
|
835 | 994 | --- a/a |
|
836 | 995 | +++ b/a |
@@ -876,13 +1035,16 b' make a new branch and get diff/status ou' | |||
|
876 | 1035 | @@ -1,1 +0,0 @@ |
|
877 | 1036 | -y1 |
|
878 | 1037 | |
|
879 |
|
|
|
1038 | # root to parent: | |
|
1039 | ||
|
1040 | % hg st -C --rev 0 --rev . | |
|
880 | 1041 | M a |
|
881 | 1042 | A b |
|
882 | 1043 | a |
|
883 | 1044 | A c |
|
884 | 1045 | a |
|
885 | 1046 | |
|
1047 | % hg diff --git --rev 0 --rev . | |
|
886 | 1048 | diff --git a/a b/a |
|
887 | 1049 | --- a/a |
|
888 | 1050 | +++ b/a |
@@ -906,12 +1068,15 b' make a new branch and get diff/status ou' | |||
|
906 | 1068 | a |
|
907 | 1069 | +5 |
|
908 | 1070 | |
|
909 |
|
|
|
1071 | # parent to root: | |
|
1072 | ||
|
1073 | % hg st -C --rev . --rev 0 | |
|
910 | 1074 | M a |
|
911 | 1075 | b |
|
912 | 1076 | R b |
|
913 | 1077 | R c |
|
914 | 1078 | |
|
1079 | % hg diff --git --rev . --rev 0 | |
|
915 | 1080 | diff --git a/a b/a |
|
916 | 1081 | --- a/a |
|
917 | 1082 | +++ b/a |
@@ -933,7 +1098,9 b' make a new branch and get diff/status ou' | |||
|
933 | 1098 | -a |
|
934 | 1099 | -5 |
|
935 | 1100 | |
|
936 |
|
|
|
1101 | # branch to parent: | |
|
1102 | ||
|
1103 | % hg st -C --rev 2 --rev . | |
|
937 | 1104 | M a |
|
938 | 1105 | A b |
|
939 | 1106 | a |
@@ -941,6 +1108,7 b' make a new branch and get diff/status ou' | |||
|
941 | 1108 | a |
|
942 | 1109 | R x/y |
|
943 | 1110 | |
|
1111 | % hg diff --git --rev 2 --rev . | |
|
944 | 1112 | diff --git a/a b/a |
|
945 | 1113 | --- a/a |
|
946 | 1114 | +++ b/a |
@@ -976,13 +1144,16 b' make a new branch and get diff/status ou' | |||
|
976 | 1144 | @@ -1,1 +0,0 @@ |
|
977 | 1145 | -y1 |
|
978 | 1146 | |
|
979 |
|
|
|
1147 | # parent to branch: | |
|
1148 | ||
|
1149 | % hg st -C --rev . --rev 2 | |
|
980 | 1150 | M a |
|
981 | 1151 | b |
|
982 | 1152 | A x/y |
|
983 | 1153 | R b |
|
984 | 1154 | R c |
|
985 | 1155 | |
|
1156 | % hg diff --git --rev . --rev 2 | |
|
986 | 1157 | diff --git a/a b/a |
|
987 | 1158 | --- a/a |
|
988 | 1159 | +++ b/a |
@@ -1013,24 +1184,36 b' make a new branch and get diff/status ou' | |||
|
1013 | 1184 | +y1 |
|
1014 | 1185 | |
|
1015 | 1186 | |
|
1016 | $ tb "add a a1" "hg mv a b" "hg mv b a" "circular rename" | |
|
1017 | updating to branch default | |
|
1018 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
|
1187 | circular rename | |
|
1188 | ||
|
1189 | $ tb "add a a1" "hg mv a b" "hg mv b a" | |
|
1190 | % add a 6 | |
|
1191 | % hg ci -m t0 | |
|
1019 | 1192 | created new head |
|
1020 | ** circular rename ** | |
|
1021 | ** add a a1 / hg mv a b / hg mv b a | |
|
1022 | - working to parent: | |
|
1193 | % add a a1 | |
|
1194 | % hg ci -m t1 | |
|
1195 | % hg mv a b | |
|
1196 | % hg ci -m t2 | |
|
1197 | % hg mv b a | |
|
1198 | ||
|
1199 | # working to parent: | |
|
1200 | ||
|
1201 | % hg st -C | |
|
1023 | 1202 | A a |
|
1024 | 1203 | b |
|
1025 | 1204 | R b |
|
1026 | 1205 | |
|
1206 | % hg diff --git | |
|
1027 | 1207 | diff --git a/b b/a |
|
1028 | 1208 | rename from b |
|
1029 | 1209 | rename to a |
|
1030 | 1210 | |
|
1031 |
|
|
|
1211 | # working to root: | |
|
1212 | ||
|
1213 | % hg st -C --rev 0 | |
|
1032 | 1214 | M a |
|
1033 | 1215 | |
|
1216 | % hg diff --git --rev 0 | |
|
1034 | 1217 | diff --git a/a b/a |
|
1035 | 1218 | --- a/a |
|
1036 | 1219 | +++ b/a |
@@ -1039,10 +1222,13 b' make a new branch and get diff/status ou' | |||
|
1039 | 1222 | +6 |
|
1040 | 1223 | +a1 |
|
1041 | 1224 | |
|
1042 |
|
|
|
1225 | # working to branch: | |
|
1226 | ||
|
1227 | % hg st -C --rev 2 | |
|
1043 | 1228 | M a |
|
1044 | 1229 | R x/y |
|
1045 | 1230 | |
|
1231 | % hg diff --git --rev 2 | |
|
1046 | 1232 | diff --git a/a b/a |
|
1047 | 1233 | --- a/a |
|
1048 | 1234 | +++ b/a |
@@ -1059,11 +1245,14 b' make a new branch and get diff/status ou' | |||
|
1059 | 1245 | @@ -1,1 +0,0 @@ |
|
1060 | 1246 | -y1 |
|
1061 | 1247 | |
|
1062 |
|
|
|
1248 | # root to parent: | |
|
1249 | ||
|
1250 | % hg st -C --rev 0 --rev . | |
|
1063 | 1251 | A b |
|
1064 | 1252 | a |
|
1065 | 1253 | R a |
|
1066 | 1254 | |
|
1255 | % hg diff --git --rev 0 --rev . | |
|
1067 | 1256 | diff --git a/a b/b |
|
1068 | 1257 | rename from a |
|
1069 | 1258 | rename to b |
@@ -1074,11 +1263,14 b' make a new branch and get diff/status ou' | |||
|
1074 | 1263 | +6 |
|
1075 | 1264 | +a1 |
|
1076 | 1265 | |
|
1077 |
|
|
|
1266 | # parent to root: | |
|
1267 | ||
|
1268 | % hg st -C --rev . --rev 0 | |
|
1078 | 1269 | A a |
|
1079 | 1270 | b |
|
1080 | 1271 | R b |
|
1081 | 1272 | |
|
1273 | % hg diff --git --rev . --rev 0 | |
|
1082 | 1274 | diff --git a/b b/a |
|
1083 | 1275 | rename from b |
|
1084 | 1276 | rename to a |
@@ -1089,12 +1281,15 b' make a new branch and get diff/status ou' | |||
|
1089 | 1281 | -6 |
|
1090 | 1282 | -a1 |
|
1091 | 1283 | |
|
1092 |
|
|
|
1284 | # branch to parent: | |
|
1285 | ||
|
1286 | % hg st -C --rev 2 --rev . | |
|
1093 | 1287 | A b |
|
1094 | 1288 | a |
|
1095 | 1289 | R a |
|
1096 | 1290 | R x/y |
|
1097 | 1291 | |
|
1292 | % hg diff --git --rev 2 --rev . | |
|
1098 | 1293 | diff --git a/a b/b |
|
1099 | 1294 | rename from a |
|
1100 | 1295 | rename to b |
@@ -1113,12 +1308,15 b' make a new branch and get diff/status ou' | |||
|
1113 | 1308 | @@ -1,1 +0,0 @@ |
|
1114 | 1309 | -y1 |
|
1115 | 1310 | |
|
1116 |
|
|
|
1311 | # parent to branch: | |
|
1312 | ||
|
1313 | % hg st -C --rev . --rev 2 | |
|
1117 | 1314 | A a |
|
1118 | 1315 | b |
|
1119 | 1316 | A x/y |
|
1120 | 1317 | R b |
|
1121 | 1318 | |
|
1319 | % hg diff --git --rev . --rev 2 | |
|
1122 | 1320 | diff --git a/b b/a |
|
1123 | 1321 | rename from b |
|
1124 | 1322 | rename to a |
@@ -1138,16 +1336,25 b' make a new branch and get diff/status ou' | |||
|
1138 | 1336 | +y1 |
|
1139 | 1337 | |
|
1140 | 1338 | |
|
1141 | $ tb "hg mv x y" "add y/x x1" "add y/x x2" "directory move" | |
|
1142 | updating to branch default | |
|
1143 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
|
1339 | directory move | |
|
1340 | ||
|
1341 | $ tb "hg mv x y" "add y/x x1" "add y/x x2" | |
|
1342 | % add a 7 | |
|
1343 | % hg ci -m t0 | |
|
1144 | 1344 | created new head |
|
1145 | moving x/x to y/x (glob) | |
|
1146 | ** directory move ** | |
|
1147 | ** hg mv x y / add y/x x1 / add y/x x2 | |
|
1148 | - working to parent: | |
|
1345 | % hg mv x y | |
|
1346 | moving x/x to y/x | |
|
1347 | % hg ci -m t1 | |
|
1348 | % add y/x x1 | |
|
1349 | % hg ci -m t2 | |
|
1350 | % add y/x x2 | |
|
1351 | ||
|
1352 | # working to parent: | |
|
1353 | ||
|
1354 | % hg st -C | |
|
1149 | 1355 | M y/x |
|
1150 | 1356 | |
|
1357 | % hg diff --git | |
|
1151 | 1358 | diff --git a/y/x b/y/x |
|
1152 | 1359 | --- a/y/x |
|
1153 | 1360 | +++ b/y/x |
@@ -1156,12 +1363,15 b' make a new branch and get diff/status ou' | |||
|
1156 | 1363 | x1 |
|
1157 | 1364 | +x2 |
|
1158 | 1365 | |
|
1159 |
|
|
|
1366 | # working to root: | |
|
1367 | ||
|
1368 | % hg st -C --rev 0 | |
|
1160 | 1369 | M a |
|
1161 | 1370 | A y/x |
|
1162 | 1371 | x/x |
|
1163 | 1372 | R x/x |
|
1164 | 1373 | |
|
1374 | % hg diff --git --rev 0 | |
|
1165 | 1375 | diff --git a/a b/a |
|
1166 | 1376 | --- a/a |
|
1167 | 1377 | +++ b/a |
@@ -1178,13 +1388,16 b' make a new branch and get diff/status ou' | |||
|
1178 | 1388 | +x1 |
|
1179 | 1389 | +x2 |
|
1180 | 1390 | |
|
1181 |
|
|
|
1391 | # working to branch: | |
|
1392 | ||
|
1393 | % hg st -C --rev 2 | |
|
1182 | 1394 | M a |
|
1183 | 1395 | A y/x |
|
1184 | 1396 | x/x |
|
1185 | 1397 | R x/x |
|
1186 | 1398 | R x/y |
|
1187 | 1399 | |
|
1400 | % hg diff --git --rev 2 | |
|
1188 | 1401 | diff --git a/a b/a |
|
1189 | 1402 | --- a/a |
|
1190 | 1403 | +++ b/a |
@@ -1209,12 +1422,15 b' make a new branch and get diff/status ou' | |||
|
1209 | 1422 | +x1 |
|
1210 | 1423 | +x2 |
|
1211 | 1424 | |
|
1212 |
|
|
|
1425 | # root to parent: | |
|
1426 | ||
|
1427 | % hg st -C --rev 0 --rev . | |
|
1213 | 1428 | M a |
|
1214 | 1429 | A y/x |
|
1215 | 1430 | x/x |
|
1216 | 1431 | R x/x |
|
1217 | 1432 | |
|
1433 | % hg diff --git --rev 0 --rev . | |
|
1218 | 1434 | diff --git a/a b/a |
|
1219 | 1435 | --- a/a |
|
1220 | 1436 | +++ b/a |
@@ -1230,12 +1446,15 b' make a new branch and get diff/status ou' | |||
|
1230 | 1446 | x |
|
1231 | 1447 | +x1 |
|
1232 | 1448 | |
|
1233 |
|
|
|
1449 | # parent to root: | |
|
1450 | ||
|
1451 | % hg st -C --rev . --rev 0 | |
|
1234 | 1452 | M a |
|
1235 | 1453 | A x/x |
|
1236 | 1454 | y/x |
|
1237 | 1455 | R y/x |
|
1238 | 1456 | |
|
1457 | % hg diff --git --rev . --rev 0 | |
|
1239 | 1458 | diff --git a/a b/a |
|
1240 | 1459 | --- a/a |
|
1241 | 1460 | +++ b/a |
@@ -1251,13 +1470,16 b' make a new branch and get diff/status ou' | |||
|
1251 | 1470 | x |
|
1252 | 1471 | -x1 |
|
1253 | 1472 | |
|
1254 |
|
|
|
1473 | # branch to parent: | |
|
1474 | ||
|
1475 | % hg st -C --rev 2 --rev . | |
|
1255 | 1476 | M a |
|
1256 | 1477 | A y/x |
|
1257 | 1478 | x/x |
|
1258 | 1479 | R x/x |
|
1259 | 1480 | R x/y |
|
1260 | 1481 | |
|
1482 | % hg diff --git --rev 2 --rev . | |
|
1261 | 1483 | diff --git a/a b/a |
|
1262 | 1484 | --- a/a |
|
1263 | 1485 | +++ b/a |
@@ -1281,13 +1503,16 b' make a new branch and get diff/status ou' | |||
|
1281 | 1503 | x |
|
1282 | 1504 | +x1 |
|
1283 | 1505 | |
|
1284 |
|
|
|
1506 | # parent to branch: | |
|
1507 | ||
|
1508 | % hg st -C --rev . --rev 2 | |
|
1285 | 1509 | M a |
|
1286 | 1510 | A x/x |
|
1287 | 1511 | y/x |
|
1288 | 1512 | A x/y |
|
1289 | 1513 | R y/x |
|
1290 | 1514 | |
|
1515 | % hg diff --git --rev . --rev 2 | |
|
1291 | 1516 | diff --git a/a b/a |
|
1292 | 1517 | --- a/a |
|
1293 | 1518 | +++ b/a |
@@ -1318,14 +1543,14 b' testing copies with unrelated branch' | |||
|
1318 | 1543 | |
|
1319 | 1544 | $ hg init unrelated |
|
1320 | 1545 | $ cd unrelated |
|
1321 |
$ |
|
|
1546 | $ echo a >> a | |
|
1322 | 1547 | $ hg ci -Am adda |
|
1323 | 1548 | adding a |
|
1324 | 1549 | $ hg mv a b |
|
1325 | 1550 | $ hg ci -m movea |
|
1326 | 1551 | $ hg up -C null |
|
1327 | 1552 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
1328 |
$ |
|
|
1553 | $ echo a >> a | |
|
1329 | 1554 | $ hg ci -Am addunrelateda |
|
1330 | 1555 | adding a |
|
1331 | 1556 | created new head |
General Comments 0
You need to be logged in to leave comments.
Login now