Show More
@@ -390,6 +390,45 b' Merge:' | |||||
390 |
|
390 | |||
391 |
|
391 | |||
392 |
|
392 | |||
|
393 | Merge: | |||
|
394 | - one with change to a file (d) | |||
|
395 | - one overwriting that file with a rename (from h to i, to d) | |||
|
396 | ||||
|
397 | $ hg up 'desc("f-2")' | |||
|
398 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |||
|
399 | $ hg merge 'desc("g-1")' --tool :union | |||
|
400 | merging d | |||
|
401 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved | |||
|
402 | (branch merge, don't forget to commit) | |||
|
403 | $ hg ci -m 'mFGm-0 simple merge - one way' | |||
|
404 | created new head | |||
|
405 | $ hg up 'desc("g-1")' | |||
|
406 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |||
|
407 | $ hg merge 'desc("f-2")' --tool :union | |||
|
408 | merging d | |||
|
409 | 0 files updated, 1 files merged, 1 files removed, 0 files unresolved | |||
|
410 | (branch merge, don't forget to commit) | |||
|
411 | $ hg ci -m 'mGFm-0 simple merge - the other way' | |||
|
412 | created new head | |||
|
413 | $ hg log -G --rev '::(desc("mGFm")+desc("mFGm"))' | |||
|
414 | @ 29 mGFm-0 simple merge - the other way] | |||
|
415 | |\ | |||
|
416 | +---o 28 mFGm-0 simple merge - one way] | |||
|
417 | | |/ | |||
|
418 | | o 25 g-1: update d] | |||
|
419 | | | | |||
|
420 | o | 22 f-2: rename i -> d] | |||
|
421 | | | | |||
|
422 | o | 21 f-1: rename h -> i] | |||
|
423 | |/ | |||
|
424 | o 2 i-2: c -move-> d] | |||
|
425 | | | |||
|
426 | o 1 i-1: a -move-> c] | |||
|
427 | | | |||
|
428 | o 0 i-0 initial commit: a b h] | |||
|
429 | ||||
|
430 | ||||
|
431 | ||||
393 | Check results |
|
432 | Check results | |
394 | ============= |
|
433 | ============= | |
395 |
|
434 | |||
@@ -544,6 +583,7 b' not a merge.' | |||||
544 | 5 25 7bded9d9da1f 01c2f5eabdc4 000000000000 |
|
583 | 5 25 7bded9d9da1f 01c2f5eabdc4 000000000000 | |
545 | 6 26 f04cac32d703 b004912a8510 7bded9d9da1f |
|
584 | 6 26 f04cac32d703 b004912a8510 7bded9d9da1f | |
546 | 7 27 d7a5eafb9322 7bded9d9da1f b004912a8510 |
|
585 | 7 27 d7a5eafb9322 7bded9d9da1f b004912a8510 | |
|
586 | 8 28 2ed7a51aed47 c72365ee036f 7bded9d9da1f | |||
547 |
|
587 | |||
548 | (This `hg log` output if wrong, since no merge actually happened). |
|
588 | (This `hg log` output if wrong, since no merge actually happened). | |
549 |
|
589 | |||
@@ -753,3 +793,77 b' consider history and rename on both bran' | |||||
753 | | |
|
793 | | | |
754 | o 0 i-0 initial commit: a b h] |
|
794 | o 0 i-0 initial commit: a b h] | |
755 |
|
795 | |||
|
796 | ||||
|
797 | ||||
|
798 | Merge: | |||
|
799 | - one with change to a file (d) | |||
|
800 | - one overwriting that file with a rename (from h to i, to d) | |||
|
801 | ||||
|
802 | This case is similar to BF/FB, but an actual merge happens, so both side of the | |||
|
803 | history are relevant. | |||
|
804 | ||||
|
805 | Note: | |||
|
806 | | In this case, the merge get conflicting information since on one side we have | |||
|
807 | | "a -> c -> d". and one the other one we have "h -> i -> d". | |||
|
808 | | | |||
|
809 | | The current code arbitrarily pick one side | |||
|
810 | ||||
|
811 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mFGm-0")' | |||
|
812 | A d | |||
|
813 | a | |||
|
814 | R a | |||
|
815 | R h | |||
|
816 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mGFm-0")' | |||
|
817 | A d | |||
|
818 | a | |||
|
819 | R a | |||
|
820 | R h | |||
|
821 | $ hg status --copies --rev 'desc("f-2")' --rev 'desc("mFGm-0")' | |||
|
822 | M d | |||
|
823 | $ hg status --copies --rev 'desc("f-2")' --rev 'desc("mGFm-0")' | |||
|
824 | M d | |||
|
825 | $ hg status --copies --rev 'desc("f-1")' --rev 'desc("mFGm-0")' | |||
|
826 | M d | |||
|
827 | R i | |||
|
828 | $ hg status --copies --rev 'desc("f-1")' --rev 'desc("mGFm-0")' | |||
|
829 | M d | |||
|
830 | R i | |||
|
831 | $ hg status --copies --rev 'desc("g-1")' --rev 'desc("mFGm-0")' | |||
|
832 | M d | |||
|
833 | R h | |||
|
834 | $ hg status --copies --rev 'desc("g-1")' --rev 'desc("mGFm-0")' | |||
|
835 | M d | |||
|
836 | R h | |||
|
837 | ||||
|
838 | $ hg log -Gfr 'desc("mFGm-0")' d | |||
|
839 | o 28 mFGm-0 simple merge - one way] | |||
|
840 | |\ | |||
|
841 | | o 25 g-1: update d] | |||
|
842 | | | | |||
|
843 | o | 22 f-2: rename i -> d] | |||
|
844 | | | | |||
|
845 | o | 21 f-1: rename h -> i] | |||
|
846 | |/ | |||
|
847 | o 2 i-2: c -move-> d] | |||
|
848 | | | |||
|
849 | o 1 i-1: a -move-> c] | |||
|
850 | | | |||
|
851 | o 0 i-0 initial commit: a b h] | |||
|
852 | ||||
|
853 | ||||
|
854 | ||||
|
855 | $ hg log -Gfr 'desc("mGFm-0")' d | |||
|
856 | @ 29 mGFm-0 simple merge - the other way] | |||
|
857 | |\ | |||
|
858 | | o 25 g-1: update d] | |||
|
859 | | | | |||
|
860 | o | 22 f-2: rename i -> d] | |||
|
861 | | | | |||
|
862 | o | 21 f-1: rename h -> i] | |||
|
863 | |/ | |||
|
864 | o 2 i-2: c -move-> d] | |||
|
865 | | | |||
|
866 | o 1 i-1: a -move-> c] | |||
|
867 | | | |||
|
868 | o 0 i-0 initial commit: a b h] | |||
|
869 |
General Comments 0
You need to be logged in to leave comments.
Login now