This will make its role clearer.
Details
Details
Diff Detail
Diff Detail
- Repository
- rHG Mercurial
- Lint
Automatic diff as part of commit; lint not applicable. - Unit
Automatic diff as part of commit; unit tests not applicable.
This will make its role clearer.
Automatic diff as part of commit; lint not applicable. |
Automatic diff as part of commit; unit tests not applicable. |
Path | Packages | |||
---|---|---|---|---|
M | tests/test-copies-chain-merge.t (18 lines) |
Merge: | Merge: | ||||
- one removing a file (d) | - one removing a file (d) | ||||
- one leaving the file untouched | - one leaving the file untouched | ||||
- the merge actively restore the file to the same content. | - the merge actively restore the file to the same content. | ||||
In this case, the file keep on living after the merge. So we should not drop its | In this case, the file keep on living after the merge. So we should not drop its | ||||
copy tracing chain. | copy tracing chain. | ||||
$ case_desc="merge explicitely revive deleted file - B side: unrelated change, C side: delete d (restored by merge)" | |||||
$ hg up 'desc("c-1")' | $ hg up 'desc("c-1")' | ||||
0 files updated, 0 files merged, 1 files removed, 0 files unresolved | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | ||||
$ hg merge 'desc("b-1")' | $ hg merge 'desc("b-1")' | ||||
1 files updated, 0 files merged, 0 files removed, 0 files unresolved | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | ||||
(branch merge, don't forget to commit) | (branch merge, don't forget to commit) | ||||
$ hg revert --rev 'desc("b-1")' d | $ hg revert --rev 'desc("b-1")' d | ||||
$ hg ci -m "mCB-revert-m-0" | $ hg ci -m "mCB-revert-m-0 $case_desc - one way" | ||||
created new head | created new head | ||||
$ hg up 'desc("b-1")' | $ hg up 'desc("b-1")' | ||||
0 files updated, 0 files merged, 0 files removed, 0 files unresolved | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | ||||
$ hg merge 'desc("c-1")' | $ hg merge 'desc("c-1")' | ||||
0 files updated, 0 files merged, 1 files removed, 0 files unresolved | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | ||||
(branch merge, don't forget to commit) | (branch merge, don't forget to commit) | ||||
$ hg revert --rev 'desc("b-1")' d | $ hg revert --rev 'desc("b-1")' d | ||||
$ hg ci -m "mBC-revert-m-0" | $ hg ci -m "mBC-revert-m-0 $case_desc - the other way" | ||||
created new head | created new head | ||||
$ hg log -G --rev '::(desc("mCB-revert-m")+desc("mBC-revert-m"))' | $ hg log -G --rev '::(desc("mCB-revert-m")+desc("mBC-revert-m"))' | ||||
@ 33 mBC-revert-m-0 | @ 33 mBC-revert-m-0 merge explicitely revive deleted file - B side: unrelated change, C side: delete d (restored by merge) - the other way | ||||
|\ | |\ | ||||
+---o 32 mCB-revert-m-0 | +---o 32 mCB-revert-m-0 merge explicitely revive deleted file - B side: unrelated change, C side: delete d (restored by merge) - one way | ||||
| |/ | | |/ | ||||
| o 6 c-1 delete d | | o 6 c-1 delete d | ||||
| | | | | | ||||
o | 5 b-1: b update | o | 5 b-1: b update | ||||
|/ | |/ | ||||
o 2 i-2: c -move-> d | o 2 i-2: c -move-> d | ||||
| | | | ||||
o 1 i-1: a -move-> c | o 1 i-1: a -move-> c | ||||
g-1: update d | g-1: update d | ||||
h-1: b -(move)-> d | h-1: b -(move)-> d | ||||
i-0 initial commit: a b h | i-0 initial commit: a b h | ||||
i-1: a -move-> c | i-1: a -move-> c | ||||
i-2: c -move-> d | i-2: c -move-> d | ||||
mABm-0 simple merge - A side: multiple renames, B side: unrelated update - the other way | mABm-0 simple merge - A side: multiple renames, B side: unrelated update - the other way | ||||
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 | 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 | ||||
mBAm-0 simple merge - A side: multiple renames, B side: unrelated update - one way | mBAm-0 simple merge - A side: multiple renames, B side: unrelated update - one way | ||||
mBC-revert-m-0 | mBC-revert-m-0 merge explicitely revive deleted file - B side: unrelated change, C side: delete d (restored by merge) - the other way | ||||
mBCm-0 simple merge - C side: delete a file with copies history , B side: unrelated update - one way | mBCm-0 simple merge - C side: delete a file with copies history , B side: unrelated update - one way | ||||
mBCm-1 re-add d | mBCm-1 re-add d | ||||
mBDm-0 simple merge - B side: unrelated update, D side: delete and recreate a file (with different content) - one way | mBDm-0 simple merge - B side: unrelated update, D side: delete and recreate a file (with different content) - one way | ||||
mBFm-0 simple merge - one way | mBFm-0 simple merge - one way | ||||
mCB-revert-m-0 | mCB-revert-m-0 merge explicitely revive deleted file - B side: unrelated change, C side: delete d (restored by merge) - one way | ||||
mCBm-0 simple merge - C side: delete a file with copies history , B side: unrelated update - the other way | mCBm-0 simple merge - C side: delete a file with copies history , B side: unrelated update - the other way | ||||
mCBm-1 re-add d | mCBm-1 re-add d | ||||
mCGm-0 merge updated/deleted - revive the file (updated content) - one way | mCGm-0 merge updated/deleted - revive the file (updated content) - one way | ||||
mCH-delete-before-conflict-m-0 | mCH-delete-before-conflict-m-0 | ||||
mDBm-0 simple merge - B side: unrelated update, D side: delete and recreate a file (with different content) - the other way | mDBm-0 simple merge - B side: unrelated update, D side: delete and recreate a file (with different content) - the other way | ||||
mDGm-0 actual content merge, copies on one side - D side: delete and re-add (different content), G side: update content - one way | mDGm-0 actual content merge, copies on one side - D side: delete and re-add (different content), G side: update content - one way | ||||
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 | 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 | ||||
mFBm-0 simple merge - the other way | mFBm-0 simple merge - the other way | ||||
- one removing a file (d) | - one removing a file (d) | ||||
- one leaving the file untouched | - one leaving the file untouched | ||||
- the merge actively restore the file to the same content. | - the merge actively restore the file to the same content. | ||||
In this case, the file keep on living after the merge. So we should not drop its | In this case, the file keep on living after the merge. So we should not drop its | ||||
copy tracing chain. | copy tracing chain. | ||||
$ hg log -G --rev '::(desc("mCB-revert-m")+desc("mBC-revert-m"))' | $ hg log -G --rev '::(desc("mCB-revert-m")+desc("mBC-revert-m"))' | ||||
o 33 mBC-revert-m-0 | o 33 mBC-revert-m-0 merge explicitely revive deleted file - B side: unrelated change, C side: delete d (restored by merge) - the other way | ||||
|\ | |\ | ||||
+---o 32 mCB-revert-m-0 | +---o 32 mCB-revert-m-0 merge explicitely revive deleted file - B side: unrelated change, C side: delete d (restored by merge) - one way | ||||
| |/ | | |/ | ||||
| o 6 c-1 delete d | | o 6 c-1 delete d | ||||
| | | | | | ||||
o | 5 b-1: b update | o | 5 b-1: b update | ||||
|/ | |/ | ||||
o 2 i-2: c -move-> d | o 2 i-2: c -move-> d | ||||
| | | | ||||
o 1 i-1: a -move-> c | o 1 i-1: a -move-> c |