Show More
@@ -988,6 +988,63 b' Merge:' | |||||
988 | o i-0 initial commit: a b h p q r |
|
988 | o i-0 initial commit: a b h p q r | |
989 |
|
989 | |||
990 |
|
990 | |||
|
991 | Subcase: restoring and untouched deleted file, while touching it | |||
|
992 | ```````````````````````````````````````````````````````````````` | |||
|
993 | ||||
|
994 | Merge: | |||
|
995 | - one removing a file (d) | |||
|
996 | - one leaving the file untouched | |||
|
997 | - the merge actively restore the file to the same content. | |||
|
998 | ||||
|
999 | In this case, the file keep on living after the merge. So we should not drop its | |||
|
1000 | copy tracing chain. | |||
|
1001 | ||||
|
1002 | $ case_desc="merge explicitely revive deleted file - B side: unrelated change, C side: delete d (restored by merge)" | |||
|
1003 | ||||
|
1004 | $ hg up 'desc("c-1")' | |||
|
1005 | 2 files updated, 0 files merged, 1 files removed, 0 files unresolved | |||
|
1006 | $ hg merge 'desc("b-1")' | |||
|
1007 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |||
|
1008 | (branch merge, don't forget to commit) | |||
|
1009 | $ hg revert --rev 'desc("b-1")' d | |||
|
1010 | $ echo "new content for d after the revert" > d | |||
|
1011 | $ hg ci -m "mCB-change-m-0 $case_desc - one way" | |||
|
1012 | created new head | |||
|
1013 | $ hg manifest --rev . --debug | grep " d" | |||
|
1014 | e333780c17752a3b0dd15e3ad48aa4e5c745f621 644 d (no-changeset !) | |||
|
1015 | 4b540a18ad699234b2b2aa18cb69555ac9c4b1df 644 d (changeset !) | |||
|
1016 | ||||
|
1017 | $ hg up 'desc("b-1")' | |||
|
1018 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |||
|
1019 | $ hg merge 'desc("c-1")' | |||
|
1020 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |||
|
1021 | (branch merge, don't forget to commit) | |||
|
1022 | $ hg revert --rev 'desc("b-1")' d | |||
|
1023 | $ echo "new content for d after the revert" > d | |||
|
1024 | $ hg ci -m "mBC-change-m-0 $case_desc - the other way" | |||
|
1025 | created new head | |||
|
1026 | $ hg manifest --rev . --debug | grep " d" | |||
|
1027 | e333780c17752a3b0dd15e3ad48aa4e5c745f621 644 d (no-changeset !) | |||
|
1028 | 4b540a18ad699234b2b2aa18cb69555ac9c4b1df 644 d (changeset !) | |||
|
1029 | ||||
|
1030 | ||||
|
1031 | $ hg up null --quiet | |||
|
1032 | $ hg log -G --rev '::(desc("mCB-change-m")+desc("mBC-change-m"))' | |||
|
1033 | o mBC-change-m-0 merge explicitely revive deleted file - B side: unrelated change, C side: delete d (restored by merge) - the other way | |||
|
1034 | |\ | |||
|
1035 | +---o mCB-change-m-0 merge explicitely revive deleted file - B side: unrelated change, C side: delete d (restored by merge) - one way | |||
|
1036 | | |/ | |||
|
1037 | | o c-1 delete d | |||
|
1038 | | | | |||
|
1039 | o | b-1: b update | |||
|
1040 | |/ | |||
|
1041 | o i-2: c -move-> d, s -move-> t | |||
|
1042 | | | |||
|
1043 | o i-1: a -move-> c, p -move-> s | |||
|
1044 | | | |||
|
1045 | o i-0 initial commit: a b h p q r | |||
|
1046 | ||||
|
1047 | ||||
991 | Decision from previous merge are properly chained with later merge |
|
1048 | Decision from previous merge are properly chained with later merge | |
992 | ------------------------------------------------------------------ |
|
1049 | ------------------------------------------------------------------ | |
993 |
|
1050 | |||
@@ -1006,7 +1063,7 b' We also touch J during some of the merge' | |||||
1006 | (extra unrelated changes) |
|
1063 | (extra unrelated changes) | |
1007 |
|
1064 | |||
1008 | $ hg up 'desc("a-2")' |
|
1065 | $ hg up 'desc("a-2")' | |
1009 |
|
|
1066 | 6 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1010 | $ echo j > unrelated-j |
|
1067 | $ echo j > unrelated-j | |
1011 | $ hg add unrelated-j |
|
1068 | $ hg add unrelated-j | |
1012 | $ hg ci -m 'j-1: unrelated changes (based on the "a" series of changes)' |
|
1069 | $ hg ci -m 'j-1: unrelated changes (based on the "a" series of changes)' | |
@@ -1493,6 +1550,7 b' Summary of all created cases' | |||||
1493 | mAEm-0 merge with copies info on both side - A side: rename d to f, E side: b to f, (same content for f) - one way |
|
1550 | mAEm-0 merge with copies info on both side - A side: rename d to f, E side: b to f, (same content for f) - one way | |
1494 | mBAm-0 simple merge - A side: multiple renames, B side: unrelated update - one way |
|
1551 | mBAm-0 simple merge - A side: multiple renames, B side: unrelated update - one way | |
1495 | mBC+revert,Lm: chained merges (salvaged -> simple) - same content (when the file exists) |
|
1552 | mBC+revert,Lm: chained merges (salvaged -> simple) - same content (when the file exists) | |
|
1553 | mBC-change-m-0 merge explicitely revive deleted file - B side: unrelated change, C side: delete d (restored by merge) - the other way | |||
1496 | mBC-revert-m-0 merge explicitely revive deleted file - B side: unrelated change, C side: delete d (restored by merge) - the other way |
|
1554 | mBC-revert-m-0 merge explicitely revive deleted file - B side: unrelated change, C side: delete d (restored by merge) - the other way | |
1497 | mBCm-0 simple merge - C side: delete a file with copies history , B side: unrelated update - one way |
|
1555 | mBCm-0 simple merge - C side: delete a file with copies history , B side: unrelated update - one way | |
1498 | mBCm-1 re-add d |
|
1556 | mBCm-1 re-add d | |
@@ -1501,6 +1559,7 b' Summary of all created cases' | |||||
1501 | mBFm-0 simple merge - B side: unrelated change, F side: overwrite d with a copy (from h->i->d) - one way |
|
1559 | mBFm-0 simple merge - B side: unrelated change, F side: overwrite d with a copy (from h->i->d) - one way | |
1502 | mBRm-0 simple merge - B side: unrelated change, R side: overwrite d with a copy (from r->x->t) different content - one way |
|
1560 | mBRm-0 simple merge - B side: unrelated change, R side: overwrite d with a copy (from r->x->t) different content - one way | |
1503 | mCB+revert,Lm: chained merges (salvaged -> simple) - same content (when the file exists) |
|
1561 | mCB+revert,Lm: chained merges (salvaged -> simple) - same content (when the file exists) | |
|
1562 | mCB-change-m-0 merge explicitely revive deleted file - B side: unrelated change, C side: delete d (restored by merge) - one way | |||
1504 | mCB-revert-m-0 merge explicitely revive deleted file - B side: unrelated change, C side: delete d (restored by merge) - one way |
|
1563 | mCB-revert-m-0 merge explicitely revive deleted file - B side: unrelated change, C side: delete d (restored by merge) - one way | |
1505 | mCBm-0 simple merge - C side: delete a file with copies history , B side: unrelated update - the other way |
|
1564 | mCBm-0 simple merge - C side: delete a file with copies history , B side: unrelated update - the other way | |
1506 | mCBm-1 re-add d |
|
1565 | mCBm-1 re-add d | |
@@ -1925,6 +1984,32 b' We upgrade a repository that is not usin' | |||||
1925 | merged : d, ; (upgraded-parallel known-bad-output !) |
|
1984 | merged : d, ; (upgraded-parallel known-bad-output !) | |
1926 | '\x00\x00\x00\x01\x08\x00\x00\x00\x01\x00\x00\x00\x00d' (upgraded known-bad-output !) |
|
1985 | '\x00\x00\x00\x01\x08\x00\x00\x00\x01\x00\x00\x00\x00d' (upgraded known-bad-output !) | |
1927 | merged : d, ; (upgraded known-bad-output !) |
|
1986 | merged : d, ; (upgraded known-bad-output !) | |
|
1987 | ##### revision "mCB-change-m-0 merge explicitely revive deleted file - B side" ##### | |||
|
1988 | 1 sidedata entries | |||
|
1989 | entry-0014 size 14 | |||
|
1990 | '\x00\x00\x00\x01\x10\x00\x00\x00\x01\x00\x00\x00\x00d' (no-upgraded no-upgraded-parallel !) | |||
|
1991 | salvaged : d, ; (no-upgraded no-upgraded-parallel !) | |||
|
1992 | '\x00\x00\x00\x01\x08\x00\x00\x00\x01\x00\x00\x00\x00d' (upgraded known-bad-output !) | |||
|
1993 | merged : d, ; (upgraded known-bad-output !) | |||
|
1994 | '\x00\x00\x00\x01\x10\x00\x00\x00\x01\x00\x00\x00\x00d' (upgraded missing-correct-output !) | |||
|
1995 | salvaged : d, ; (upgraded missing-correct-output !) | |||
|
1996 | '\x00\x00\x00\x01\x08\x00\x00\x00\x01\x00\x00\x00\x00d' (upgraded-parallel known-bad-output !) | |||
|
1997 | merged : d, ; (upgraded-parallel known-bad-output !) | |||
|
1998 | '\x00\x00\x00\x01\x10\x00\x00\x00\x01\x00\x00\x00\x00d' (upgraded-parallel missing-correct-output !) | |||
|
1999 | salvaged : d, ; (upgraded-parallel missing-correct-output !) | |||
|
2000 | ##### revision "mBC-change-m-0 merge explicitely revive deleted file - B side" ##### | |||
|
2001 | 1 sidedata entries | |||
|
2002 | entry-0014 size 14 | |||
|
2003 | '\x00\x00\x00\x01\x10\x00\x00\x00\x01\x00\x00\x00\x00d' (no-upgraded no-upgraded-parallel !) | |||
|
2004 | salvaged : d, ; (no-upgraded no-upgraded-parallel !) | |||
|
2005 | '\x00\x00\x00\x01\x08\x00\x00\x00\x01\x00\x00\x00\x00d' (upgraded known-bad-output !) | |||
|
2006 | merged : d, ; (upgraded known-bad-output !) | |||
|
2007 | '\x00\x00\x00\x01\x10\x00\x00\x00\x01\x00\x00\x00\x00d' (upgraded missing-correct-output !) | |||
|
2008 | salvaged : d, ; (upgraded missing-correct-output !) | |||
|
2009 | '\x00\x00\x00\x01\x08\x00\x00\x00\x01\x00\x00\x00\x00d' (upgraded-parallel known-bad-output !) | |||
|
2010 | merged : d, ; (upgraded-parallel known-bad-output !) | |||
|
2011 | '\x00\x00\x00\x01\x10\x00\x00\x00\x01\x00\x00\x00\x00d' (upgraded-parallel missing-correct-output !) | |||
|
2012 | salvaged : d, ; (upgraded-parallel missing-correct-output !) | |||
1928 | ##### revision "j-1" ##### |
|
2013 | ##### revision "j-1" ##### | |
1929 | 1 sidedata entries |
|
2014 | 1 sidedata entries | |
1930 | entry-0014 size 24 |
|
2015 | entry-0014 size 24 | |
@@ -3443,6 +3528,65 b' BROKEN: `hg log --follow <file>` relies ' | |||||
3443 | #endif |
|
3528 | #endif | |
3444 |
|
3529 | |||
3445 |
|
3530 | |||
|
3531 | Subcase: restoring and untouched deleted file, while touching it | |||
|
3532 | ```````````````````````````````````````````````````````````````` | |||
|
3533 | ||||
|
3534 | Merge: | |||
|
3535 | - one removing a file (d) | |||
|
3536 | - one leaving the file untouched | |||
|
3537 | - the merge actively restore the file to the same content. | |||
|
3538 | ||||
|
3539 | In this case, the file keep on living after the merge. So we should not drop its | |||
|
3540 | copy tracing chain. | |||
|
3541 | ||||
|
3542 | $ hg log -G --rev '::(desc("mCB-change-m")+desc("mBC-change-m"))' | |||
|
3543 | o mBC-change-m-0 merge explicitely revive deleted file - B side: unrelated change, C side: delete d (restored by merge) - the other way | |||
|
3544 | |\ | |||
|
3545 | +---o mCB-change-m-0 merge explicitely revive deleted file - B side: unrelated change, C side: delete d (restored by merge) - one way | |||
|
3546 | | |/ | |||
|
3547 | | o c-1 delete d | |||
|
3548 | | | | |||
|
3549 | o | b-1: b update | |||
|
3550 | |/ | |||
|
3551 | o i-2: c -move-> d, s -move-> t | |||
|
3552 | | | |||
|
3553 | o i-1: a -move-> c, p -move-> s | |||
|
3554 | | | |||
|
3555 | o i-0 initial commit: a b h p q r | |||
|
3556 | ||||
|
3557 | ||||
|
3558 | 'a' is the the copy source of 'd' | |||
|
3559 | ||||
|
3560 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mCB-change-m-0")' | |||
|
3561 | M b | |||
|
3562 | A d | |||
|
3563 | a (no-compatibility no-changeset no-upgraded no-upgraded-parallel !) | |||
|
3564 | a (upgraded missing-correct-output !) | |||
|
3565 | a (upgraded-parallel missing-correct-output !) | |||
|
3566 | A t | |||
|
3567 | p | |||
|
3568 | R a | |||
|
3569 | R p | |||
|
3570 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mBC-change-m-0")' | |||
|
3571 | M b | |||
|
3572 | A d | |||
|
3573 | a (no-compatibility no-changeset !) | |||
|
3574 | A t | |||
|
3575 | p | |||
|
3576 | R a | |||
|
3577 | R p | |||
|
3578 | $ hg status --copies --rev 'desc("c-1")' --rev 'desc("mCB-change-m-0")' | |||
|
3579 | M b | |||
|
3580 | A d | |||
|
3581 | $ hg status --copies --rev 'desc("c-1")' --rev 'desc("mBC-change-m-0")' | |||
|
3582 | M b | |||
|
3583 | A d | |||
|
3584 | $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mCB-change-m-0")' | |||
|
3585 | M d | |||
|
3586 | $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mBC-change-m-0")' | |||
|
3587 | M d | |||
|
3588 | ||||
|
3589 | ||||
3446 | Decision from previous merge are properly chained with later merge |
|
3590 | Decision from previous merge are properly chained with later merge | |
3447 | ------------------------------------------------------------------ |
|
3591 | ------------------------------------------------------------------ | |
3448 |
|
3592 |
General Comments 0
You need to be logged in to leave comments.
Login now