Show More
@@ -347,6 +347,48 b' Merge:' | |||||
347 | o 0 i-0 initial commit: a b h] |
|
347 | o 0 i-0 initial commit: a b h] | |
348 |
|
348 | |||
349 |
|
349 | |||
|
350 | Merge: | |||
|
351 | - one with change to a file | |||
|
352 | - one deleting and recreating the file | |||
|
353 | ||||
|
354 | $ hg up 'desc("i-2")' | |||
|
355 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |||
|
356 | $ echo "some update" >> d | |||
|
357 | $ hg commit -m "g-1: update d" | |||
|
358 | created new head | |||
|
359 | $ hg up 'desc("d-2")' | |||
|
360 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |||
|
361 | $ hg merge 'desc("g-1")' --tool :union | |||
|
362 | merging d | |||
|
363 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |||
|
364 | (branch merge, don't forget to commit) | |||
|
365 | $ hg ci -m 'mDGm-0 simple merge - one way' | |||
|
366 | $ hg up 'desc("g-1")' | |||
|
367 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |||
|
368 | $ hg merge 'desc("d-2")' --tool :union | |||
|
369 | merging d | |||
|
370 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |||
|
371 | (branch merge, don't forget to commit) | |||
|
372 | $ hg ci -m 'mGDm-0 simple merge - the other way' | |||
|
373 | created new head | |||
|
374 | $ hg log -G --rev '::(desc("mDGm")+desc("mGDm"))' | |||
|
375 | @ 27 mGDm-0 simple merge - the other way] | |||
|
376 | |\ | |||
|
377 | +---o 26 mDGm-0 simple merge - one way] | |||
|
378 | | |/ | |||
|
379 | | o 25 g-1: update d] | |||
|
380 | | | | |||
|
381 | o | 14 d-2 re-add d] | |||
|
382 | | | | |||
|
383 | o | 13 d-1 delete d] | |||
|
384 | |/ | |||
|
385 | o 2 i-2: c -move-> d] | |||
|
386 | | | |||
|
387 | o 1 i-1: a -move-> c] | |||
|
388 | | | |||
|
389 | o 0 i-0 initial commit: a b h] | |||
|
390 | ||||
|
391 | ||||
350 |
|
392 | |||
351 | Check results |
|
393 | Check results | |
352 | ============= |
|
394 | ============= | |
@@ -499,6 +541,9 b' not a merge.' | |||||
499 | 2 15 0bb5445dc4d0 01c2f5eabdc4 b004912a8510 |
|
541 | 2 15 0bb5445dc4d0 01c2f5eabdc4 b004912a8510 | |
500 | 3 22 c72365ee036f 000000000000 000000000000 |
|
542 | 3 22 c72365ee036f 000000000000 000000000000 | |
501 | 4 23 863d9bc49190 01c2f5eabdc4 c72365ee036f |
|
543 | 4 23 863d9bc49190 01c2f5eabdc4 c72365ee036f | |
|
544 | 5 25 7bded9d9da1f 01c2f5eabdc4 000000000000 | |||
|
545 | 6 26 f04cac32d703 b004912a8510 7bded9d9da1f | |||
|
546 | 7 27 d7a5eafb9322 7bded9d9da1f b004912a8510 | |||
502 |
|
547 | |||
503 | (This `hg log` output if wrong, since no merge actually happened). |
|
548 | (This `hg log` output if wrong, since no merge actually happened). | |
504 |
|
549 | |||
@@ -655,3 +700,56 b' The following output is correct.' | |||||
655 | : |
|
700 | : | |
656 | o 0 i-0 initial commit: a b h] |
|
701 | o 0 i-0 initial commit: a b h] | |
657 |
|
702 | |||
|
703 | ||||
|
704 | Merge: | |||
|
705 | - one with change to a file | |||
|
706 | - one deleting and recreating the file | |||
|
707 | ||||
|
708 | Unlike in the 'BD/DB' cases, an actuall merge happened here. So we should | |||
|
709 | consider history and rename on both branch of the merge. | |||
|
710 | ||||
|
711 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mDGm-0")' | |||
|
712 | A d | |||
|
713 | a | |||
|
714 | R a | |||
|
715 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mGDm-0")' | |||
|
716 | A d | |||
|
717 | a | |||
|
718 | R a | |||
|
719 | $ hg status --copies --rev 'desc("d-2")' --rev 'desc("mDGm-0")' | |||
|
720 | M d | |||
|
721 | $ hg status --copies --rev 'desc("d-2")' --rev 'desc("mGDm-0")' | |||
|
722 | M d | |||
|
723 | $ hg status --copies --rev 'desc("g-1")' --rev 'desc("mDGm-0")' | |||
|
724 | M d | |||
|
725 | $ hg status --copies --rev 'desc("g-1")' --rev 'desc("mGDm-0")' | |||
|
726 | M d | |||
|
727 | ||||
|
728 | $ hg log -Gfr 'desc("mDGm-0")' d | |||
|
729 | o 26 mDGm-0 simple merge - one way] | |||
|
730 | |\ | |||
|
731 | | o 25 g-1: update d] | |||
|
732 | | | | |||
|
733 | o | 14 d-2 re-add d] | |||
|
734 | |/ | |||
|
735 | o 2 i-2: c -move-> d] | |||
|
736 | | | |||
|
737 | o 1 i-1: a -move-> c] | |||
|
738 | | | |||
|
739 | o 0 i-0 initial commit: a b h] | |||
|
740 | ||||
|
741 | ||||
|
742 | ||||
|
743 | $ hg log -Gfr 'desc("mDGm-0")' d | |||
|
744 | o 26 mDGm-0 simple merge - one way] | |||
|
745 | |\ | |||
|
746 | | o 25 g-1: update d] | |||
|
747 | | | | |||
|
748 | o | 14 d-2 re-add d] | |||
|
749 | |/ | |||
|
750 | o 2 i-2: c -move-> d] | |||
|
751 | | | |||
|
752 | o 1 i-1: a -move-> c] | |||
|
753 | | | |||
|
754 | o 0 i-0 initial commit: a b h] | |||
|
755 |
General Comments 0
You need to be logged in to leave comments.
Login now