Show More
@@ -891,6 +891,105 b' Same as `mAEm` and `mEAm` but with extra' | |||||
891 | o i-0 initial commit: a b h p q r |
|
891 | o i-0 initial commit: a b h p q r | |
892 |
|
892 | |||
893 |
|
893 | |||
|
894 | Subcase: merge overwrite common copy information, but with extra change during the merge | |||
|
895 | ```````````````````````````````````````````````````````````````````````````````````````` | |||
|
896 | ||||
|
897 | Merge: | |||
|
898 | - one with change to an unrelated file (b) | |||
|
899 | - one overwriting a file (d) with a rename (from h to i to d) | |||
|
900 | - the merge update f content | |||
|
901 | ||||
|
902 | $ case_desc="merge with extra change - B side: unrelated change, F side: overwrite d with a copy (from h->i->d)" | |||
|
903 | ||||
|
904 | $ hg up 'desc("f-2")' | |||
|
905 | 2 files updated, 0 files merged, 2 files removed, 0 files unresolved | |||
|
906 | #if no-changeset | |||
|
907 | $ hg debugindex d | ../no-linkrev | |||
|
908 | rev linkrev nodeid p1 p2 | |||
|
909 | 0 * d8252ab2e760 000000000000 000000000000 | |||
|
910 | 1 * b004912a8510 000000000000 000000000000 | |||
|
911 | 2 * 7b79e2fe0c89 000000000000 000000000000 | |||
|
912 | 3 * 17ec97e60577 d8252ab2e760 000000000000 | |||
|
913 | 4 * 06dabf50734c b004912a8510 17ec97e60577 | |||
|
914 | 5 * 19c0e3924691 17ec97e60577 b004912a8510 | |||
|
915 | 6 * 89c873a01d97 7b79e2fe0c89 17ec97e60577 | |||
|
916 | 7 * d55cb4e9ef57 000000000000 000000000000 | |||
|
917 | #else | |||
|
918 | $ hg debugindex d | ../no-linkrev | |||
|
919 | rev linkrev nodeid p1 p2 | |||
|
920 | 0 * ae258f702dfe 000000000000 000000000000 | |||
|
921 | 1 * b004912a8510 000000000000 000000000000 | |||
|
922 | 2 * 5cce88bf349f ae258f702dfe 000000000000 | |||
|
923 | 3 * cc269dd788c8 b004912a8510 5cce88bf349f | |||
|
924 | 4 * 51c91a115080 5cce88bf349f b004912a8510 | |||
|
925 | #endif | |||
|
926 | $ hg up 'desc("b-1")' | |||
|
927 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved (no-changeset !) | |||
|
928 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved (changeset !) | |||
|
929 | $ hg merge 'desc("f-2")' | |||
|
930 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved (no-changeset !) | |||
|
931 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved (changeset !) | |||
|
932 | (branch merge, don't forget to commit) | |||
|
933 | $ echo "extra-change to (formelly h) during the merge" > d | |||
|
934 | $ hg ci -m "mBF-change-m-0 $case_desc - one way" | |||
|
935 | created new head | |||
|
936 | $ hg manifest --rev . --debug | grep " d" | |||
|
937 | 1c334238bd42ec85c6a0d83fd1b2a898a6a3215d 644 d (no-changeset !) | |||
|
938 | cea2d99c0fde64672ef61953786fdff34f16e230 644 d (changeset !) | |||
|
939 | ||||
|
940 | $ hg up 'desc("f-2")' | |||
|
941 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |||
|
942 | $ hg merge 'desc("b-1")' | |||
|
943 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |||
|
944 | (branch merge, don't forget to commit) | |||
|
945 | $ echo "extra-change to (formelly h) during the merge" > d | |||
|
946 | $ hg ci -m "mFB-change-m-0 $case_desc - the other way" | |||
|
947 | created new head | |||
|
948 | $ hg manifest --rev . --debug | grep " d" | |||
|
949 | 1c334238bd42ec85c6a0d83fd1b2a898a6a3215d 644 d (no-changeset missing-correct-output !) | |||
|
950 | 646ed7992dec41eb29635ab28268e7867d0e59a0 644 d (no-changeset known-bad-output !) | |||
|
951 | cea2d99c0fde64672ef61953786fdff34f16e230 644 d (changeset !) | |||
|
952 | #if no-changeset | |||
|
953 | $ hg debugindex d | ../no-linkrev | |||
|
954 | rev linkrev nodeid p1 p2 | |||
|
955 | 0 * d8252ab2e760 000000000000 000000000000 | |||
|
956 | 1 * b004912a8510 000000000000 000000000000 | |||
|
957 | 2 * 7b79e2fe0c89 000000000000 000000000000 | |||
|
958 | 3 * 17ec97e60577 d8252ab2e760 000000000000 | |||
|
959 | 4 * 06dabf50734c b004912a8510 17ec97e60577 | |||
|
960 | 5 * 19c0e3924691 17ec97e60577 b004912a8510 | |||
|
961 | 6 * 89c873a01d97 7b79e2fe0c89 17ec97e60577 | |||
|
962 | 7 * d55cb4e9ef57 000000000000 000000000000 | |||
|
963 | 8 * 1c334238bd42 7b79e2fe0c89 000000000000 | |||
|
964 | 9 * 646ed7992dec 7b79e2fe0c89 d8252ab2e760 (known-bad-output !) | |||
|
965 | #else | |||
|
966 | $ hg debugindex d | ../no-linkrev | |||
|
967 | rev linkrev nodeid p1 p2 | |||
|
968 | 0 * ae258f702dfe 000000000000 000000000000 | |||
|
969 | 1 * b004912a8510 000000000000 000000000000 | |||
|
970 | 2 * 5cce88bf349f ae258f702dfe 000000000000 | |||
|
971 | 3 * cc269dd788c8 b004912a8510 5cce88bf349f | |||
|
972 | 4 * 51c91a115080 5cce88bf349f b004912a8510 | |||
|
973 | 5 * cea2d99c0fde ae258f702dfe 000000000000 | |||
|
974 | #endif | |||
|
975 | $ hg log -G --rev '::(desc("mBF-change-m")+desc("mFB-change-m"))' | |||
|
976 | @ mFB-change-m-0 merge with extra change - B side: unrelated change, F side: overwrite d with a copy (from h->i->d) - the other way | |||
|
977 | |\ | |||
|
978 | +---o mBF-change-m-0 merge with extra change - B side: unrelated change, F side: overwrite d with a copy (from h->i->d) - one way | |||
|
979 | | |/ | |||
|
980 | | o f-2: rename i -> d | |||
|
981 | | | | |||
|
982 | | o f-1: rename h -> i | |||
|
983 | | | | |||
|
984 | o | b-1: b update | |||
|
985 | |/ | |||
|
986 | o i-2: c -move-> d, s -move-> t | |||
|
987 | | | |||
|
988 | o i-1: a -move-> c, p -move-> s | |||
|
989 | | | |||
|
990 | o i-0 initial commit: a b h p q r | |||
|
991 | ||||
|
992 | ||||
894 | Decision from previous merge are properly chained with later merge |
|
993 | Decision from previous merge are properly chained with later merge | |
895 | ------------------------------------------------------------------ |
|
994 | ------------------------------------------------------------------ | |
896 |
|
995 | |||
@@ -907,7 +1006,7 b' about that file should stay unchanged.' | |||||
907 | (extra unrelated changes) |
|
1006 | (extra unrelated changes) | |
908 |
|
1007 | |||
909 | $ hg up 'desc("a-2")' |
|
1008 | $ hg up 'desc("a-2")' | |
910 |
|
|
1009 | 3 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
911 | $ echo j > unrelated-j |
|
1010 | $ echo j > unrelated-j | |
912 | $ hg add unrelated-j |
|
1011 | $ hg add unrelated-j | |
913 | $ hg ci -m 'j-1: unrelated changes (based on the "a" series of changes)' |
|
1012 | $ hg ci -m 'j-1: unrelated changes (based on the "a" series of changes)' | |
@@ -1396,6 +1495,7 b' Summary of all created cases' | |||||
1396 | mBCm-0 simple merge - C side: delete a file with copies history , B side: unrelated update - one way |
|
1495 | mBCm-0 simple merge - C side: delete a file with copies history , B side: unrelated update - one way | |
1397 | mBCm-1 re-add d |
|
1496 | mBCm-1 re-add d | |
1398 | mBDm-0 simple merge - B side: unrelated update, D side: delete and recreate a file (with different content) - one way |
|
1497 | mBDm-0 simple merge - B side: unrelated update, D side: delete and recreate a file (with different content) - one way | |
|
1498 | mBF-change-m-0 merge with extra change - B side: unrelated change, F side: overwrite d with a copy (from h->i->d) - one way | |||
1399 | mBFm-0 simple merge - B side: unrelated change, F side: overwrite d with a copy (from h->i->d) - one way |
|
1499 | mBFm-0 simple merge - B side: unrelated change, F side: overwrite d with a copy (from h->i->d) - one way | |
1400 | mBRm-0 simple merge - B side: unrelated change, R side: overwrite d with a copy (from r->x->t) different content - one way |
|
1500 | mBRm-0 simple merge - B side: unrelated change, R side: overwrite d with a copy (from r->x->t) different content - one way | |
1401 | mCB+revert,Lm: chained merges (salvaged -> simple) - same content (when the file exists) |
|
1501 | mCB+revert,Lm: chained merges (salvaged -> simple) - same content (when the file exists) | |
@@ -1410,6 +1510,7 b' Summary of all created cases' | |||||
1410 | mEA-change,Jm: chained merges (conflict+change -> simple) - same content on both branch in the initial merge |
|
1510 | mEA-change,Jm: chained merges (conflict+change -> simple) - same content on both branch in the initial merge | |
1411 | mEA-change-m-0 merge with file update and copies info on both side - A side: rename d to f, E side: b to f, (same content for f in parent) - the other way |
|
1511 | mEA-change-m-0 merge with file update and copies info on both side - A side: rename d to f, E side: b to f, (same content for f in parent) - the other way | |
1412 | mEAm-0 merge with copies info on both side - A side: rename d to f, E side: b to f, (same content for f) - the other way |
|
1512 | mEAm-0 merge with copies info on both side - A side: rename d to f, E side: b to f, (same content for f) - the other way | |
|
1513 | mFB-change-m-0 merge with extra change - B side: unrelated change, F side: overwrite d with a copy (from h->i->d) - the other way | |||
1413 | mFBm-0 simple merge - B side: unrelated change, F side: overwrite d with a copy (from h->i->d) - the other way |
|
1514 | mFBm-0 simple merge - B side: unrelated change, F side: overwrite d with a copy (from h->i->d) - the other way | |
1414 | mFG,Om: chained merges (copy-overwrite -> simple) - same content |
|
1515 | mFG,Om: chained merges (copy-overwrite -> simple) - same content | |
1415 | mFGm-0 merge - G side: content change, F side: copy overwrite, no content change - one way |
|
1516 | mFGm-0 merge - G side: content change, F side: copy overwrite, no content change - one way | |
@@ -1800,6 +1901,26 b' We upgrade a repository that is not usin' | |||||
1800 | entry-0014 size 14 |
|
1901 | entry-0014 size 14 | |
1801 | '\x00\x00\x00\x01\x08\x00\x00\x00\x01\x00\x00\x00\x00f' |
|
1902 | '\x00\x00\x00\x01\x08\x00\x00\x00\x01\x00\x00\x00\x00f' | |
1802 | merged : f, ; |
|
1903 | merged : f, ; | |
|
1904 | ##### revision "mBF-change-m-0 merge with extra change - B side" ##### | |||
|
1905 | 1 sidedata entries | |||
|
1906 | entry-0014 size 14 | |||
|
1907 | '\x00\x00\x00\x01\x14\x00\x00\x00\x01\x00\x00\x00\x00d' (no-upgraded no-upgraded-parallel !) | |||
|
1908 | touched : d, ; (no-upgraded no-upgraded-parallel !) | |||
|
1909 | '\x00\x00\x00\x01\x14\x00\x00\x00\x01\x00\x00\x00\x00d' (upgraded missing-correct-output !) | |||
|
1910 | touched : d, ; (upgraded missing-correct-output !) | |||
|
1911 | '\x00\x00\x00\x01\x08\x00\x00\x00\x01\x00\x00\x00\x00d' (upgraded known-bad-output !) | |||
|
1912 | merged : d, ; (upgraded known-bad-output !) | |||
|
1913 | '\x00\x00\x00\x01\x14\x00\x00\x00\x01\x00\x00\x00\x00d' (upgraded-parallel missing-correct-output !) | |||
|
1914 | touched : d, ; (upgraded-parallel missing-correct-output !) | |||
|
1915 | '\x00\x00\x00\x01\x08\x00\x00\x00\x01\x00\x00\x00\x00d' (upgraded-parallel known-bad-output !) | |||
|
1916 | merged : d, ; (upgraded-parallel known-bad-output !) | |||
|
1917 | ##### revision "mFB-change-m-0 merge with extra change - B side" ##### | |||
|
1918 | 1 sidedata entries | |||
|
1919 | entry-0014 size 14 | |||
|
1920 | '\x00\x00\x00\x01\x08\x00\x00\x00\x01\x00\x00\x00\x00d' (known-bad-output !) | |||
|
1921 | merged : d, ; (known-bad-output !) | |||
|
1922 | '\x00\x00\x00\x01\x14\x00\x00\x00\x01\x00\x00\x00\x00d' (missing-correct-output !) | |||
|
1923 | touched : d, ; (missing-correct-output !) | |||
1803 | ##### revision "j-1" ##### |
|
1924 | ##### revision "j-1" ##### | |
1804 | 1 sidedata entries |
|
1925 | 1 sidedata entries | |
1805 | entry-0014 size 24 |
|
1926 | entry-0014 size 24 | |
@@ -3193,6 +3314,131 b' Subcase: merge has same initial content ' | |||||
3193 | R p |
|
3314 | R p | |
3194 |
|
3315 | |||
3195 |
|
3316 | |||
|
3317 | Subcase: merge overwrite common copy information, but with extra change during the merge | |||
|
3318 | ``````````````````````````````````````````````````````````````````````````````````` | |||
|
3319 | ||||
|
3320 | Merge: | |||
|
3321 | - one with change to an unrelated file (b) | |||
|
3322 | - one overwriting a file (d) with a rename (from h to i to d) | |||
|
3323 | ||||
|
3324 | $ hg log -G --rev '::(desc("mBF-change-m")+desc("mFB-change-m"))' | |||
|
3325 | o mFB-change-m-0 merge with extra change - B side: unrelated change, F side: overwrite d with a copy (from h->i->d) - the other way | |||
|
3326 | |\ | |||
|
3327 | +---o mBF-change-m-0 merge with extra change - B side: unrelated change, F side: overwrite d with a copy (from h->i->d) - one way | |||
|
3328 | | |/ | |||
|
3329 | | o f-2: rename i -> d | |||
|
3330 | | | | |||
|
3331 | | o f-1: rename h -> i | |||
|
3332 | | | | |||
|
3333 | o | b-1: b update | |||
|
3334 | |/ | |||
|
3335 | o i-2: c -move-> d, s -move-> t | |||
|
3336 | | | |||
|
3337 | o i-1: a -move-> c, p -move-> s | |||
|
3338 | | | |||
|
3339 | o i-0 initial commit: a b h p q r | |||
|
3340 | ||||
|
3341 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mBF-change-m-0")' | |||
|
3342 | M b | |||
|
3343 | A d | |||
|
3344 | h (filelog !) | |||
|
3345 | h (sidedata !) | |||
|
3346 | a (upgraded known-bad-output !) | |||
|
3347 | h (upgraded missing-correct-output !) | |||
|
3348 | a (upgraded-parallel known-bad-output !) | |||
|
3349 | h (upgraded-parallel missing-correct-output !) | |||
|
3350 | h (changeset !) | |||
|
3351 | h (compatibility !) | |||
|
3352 | A t | |||
|
3353 | p | |||
|
3354 | R a | |||
|
3355 | R h | |||
|
3356 | R p | |||
|
3357 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mFB-change-m-0")' | |||
|
3358 | M b | |||
|
3359 | A d | |||
|
3360 | h (filelog missing-correct-output !) | |||
|
3361 | a (filelog known-bad-output !) | |||
|
3362 | h (sidedata !) | |||
|
3363 | h (upgraded !) | |||
|
3364 | h (upgraded-parallel !) | |||
|
3365 | h (changeset !) | |||
|
3366 | h (compatibility !) | |||
|
3367 | A t | |||
|
3368 | p | |||
|
3369 | R a | |||
|
3370 | R h | |||
|
3371 | R p | |||
|
3372 | $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mBF-change-m-0")' | |||
|
3373 | M d | |||
|
3374 | h (no-filelog !) | |||
|
3375 | R h | |||
|
3376 | $ hg status --copies --rev 'desc("f-2")' --rev 'desc("mBF-change-m-0")' | |||
|
3377 | M b | |||
|
3378 | M d | |||
|
3379 | $ hg status --copies --rev 'desc("f-1")' --rev 'desc("mBF-change-m-0")' | |||
|
3380 | M b | |||
|
3381 | M d | |||
|
3382 | i (no-filelog !) | |||
|
3383 | R i | |||
|
3384 | $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mFB-change-m-0")' | |||
|
3385 | M d | |||
|
3386 | h (no-filelog !) | |||
|
3387 | R h | |||
|
3388 | $ hg status --copies --rev 'desc("f-2")' --rev 'desc("mFB-change-m-0")' | |||
|
3389 | M b | |||
|
3390 | M d | |||
|
3391 | $ hg status --copies --rev 'desc("f-1")' --rev 'desc("mFB-change-m-0")' | |||
|
3392 | M b | |||
|
3393 | M d | |||
|
3394 | i (no-filelog !) | |||
|
3395 | R i | |||
|
3396 | ||||
|
3397 | #if no-changeset | |||
|
3398 | $ hg log -Gfr 'desc("mBF-change-m-0")' d | |||
|
3399 | o mBF-change-m-0 merge with extra change - B side: unrelated change, F side: overwrite d with a copy (from h->i->d) - one way | |||
|
3400 | |\ | |||
|
3401 | o : f-2: rename i -> d | |||
|
3402 | | : | |||
|
3403 | o : f-1: rename h -> i | |||
|
3404 | :/ | |||
|
3405 | o i-0 initial commit: a b h p q r | |||
|
3406 | ||||
|
3407 | #else | |||
|
3408 | BROKEN: `hg log --follow <file>` relies on filelog metadata to work | |||
|
3409 | $ hg log -Gfr 'desc("mBF-change-m-0")' d | |||
|
3410 | o mBF-change-m-0 merge with extra change - B side: unrelated change, F side: overwrite d with a copy (from h->i->d) - one way | |||
|
3411 | : | |||
|
3412 | o i-2: c -move-> d, s -move-> t | |||
|
3413 | | | |||
|
3414 | ~ | |||
|
3415 | #endif | |||
|
3416 | ||||
|
3417 | #if no-changeset | |||
|
3418 | $ hg log -Gfr 'desc("mFB-change-m-0")' d | |||
|
3419 | o mFB-change-m-0 merge with extra change - B side: unrelated change, F side: overwrite d with a copy (from h->i->d) - the other way | |||
|
3420 | |\ | |||
|
3421 | o : f-2: rename i -> d | |||
|
3422 | | : | |||
|
3423 | o : f-1: rename h -> i | |||
|
3424 | :/ | |||
|
3425 | o i-2: c -move-> d, s -move-> t (known-bad-output !) | |||
|
3426 | | (known-bad-output !) | |||
|
3427 | o i-1: a -move-> c, p -move-> s (known-bad-output !) | |||
|
3428 | | (known-bad-output !) | |||
|
3429 | o i-0 initial commit: a b h p q r | |||
|
3430 | ||||
|
3431 | #else | |||
|
3432 | BROKEN: `hg log --follow <file>` relies on filelog metadata to work | |||
|
3433 | $ hg log -Gfr 'desc("mFB-change-m-0")' d | |||
|
3434 | o mFB-change-m-0 merge with extra change - B side: unrelated change, F side: overwrite d with a copy (from h->i->d) - the other way | |||
|
3435 | : | |||
|
3436 | o i-2: c -move-> d, s -move-> t | |||
|
3437 | | | |||
|
3438 | ~ | |||
|
3439 | #endif | |||
|
3440 | ||||
|
3441 | ||||
3196 |
|
|
3442 | Decision from previous merge are properly chained with later merge | |
3197 | ------------------------------------------------------------------ |
|
3443 | ------------------------------------------------------------------ | |
3198 |
|
3444 |
General Comments 0
You need to be logged in to leave comments.
Login now