The initial branch is moving some of the "same content" file around. We do the
same for the "different content" before start to implement more tests.
The new files have harmless impact of various existing tests.
hg-reviewers |
The initial branch is moving some of the "same content" file around. We do the
same for the "different content" before start to implement more tests.
The new files have harmless impact of various existing tests.
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 (283 lines) |
$ hg ci -Am 'i-0 initial commit: a b h' | $ hg ci -Am 'i-0 initial commit: a b h' | ||||
adding a | adding a | ||||
adding b | adding b | ||||
adding h | adding h | ||||
adding p | adding p | ||||
adding q | adding q | ||||
adding r | adding r | ||||
$ hg mv a c | $ hg mv a c | ||||
$ hg ci -Am 'i-1: a -move-> c' | $ hg mv p s | ||||
$ hg ci -Am 'i-1: a -move-> c, p -move-> s' | |||||
$ hg mv c d | $ hg mv c d | ||||
$ hg ci -Am 'i-2: c -move-> d' | $ hg mv s t | ||||
$ hg ci -Am 'i-2: c -move-> d, s -move-> t' | |||||
$ hg log -G | $ hg log -G | ||||
@ i-2: c -move-> d | @ i-2: c -move-> d, s -move-> t | ||||
| | | | ||||
o i-1: a -move-> c | o i-1: a -move-> c, p -move-> s | ||||
| | | | ||||
o i-0 initial commit: a b h | o i-0 initial commit: a b h | ||||
And having another branch with renames on the other side | And having another branch with renames on the other side | ||||
$ hg mv d e | $ hg mv d e | ||||
$ hg ci -Am 'a-1: d -move-> e' | $ hg ci -Am 'a-1: d -move-> e' | ||||
$ hg mv e f | $ hg mv e f | ||||
$ hg ci -Am 'a-2: e -move-> f' | $ hg ci -Am 'a-2: e -move-> f' | ||||
$ hg log -G --rev '::.' | $ hg log -G --rev '::.' | ||||
@ a-2: e -move-> f | @ a-2: e -move-> f | ||||
| | | | ||||
o a-1: d -move-> e | o a-1: d -move-> e | ||||
| | | | ||||
o i-2: c -move-> d | o i-2: c -move-> d, s -move-> t | ||||
| | | | ||||
o i-1: a -move-> c | o i-1: a -move-> c, p -move-> s | ||||
| | | | ||||
o i-0 initial commit: a b h | o i-0 initial commit: a b h | ||||
Have a branching with nothing on one side | Have a branching with nothing on one side | ||||
$ hg up 'desc("i-2")' | $ hg up 'desc("i-2")' | ||||
1 files updated, 0 files merged, 1 files removed, 0 files unresolved | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | ||||
$ echo foo > b | $ echo foo > b | ||||
$ hg ci -m 'b-1: b update' | $ hg ci -m 'b-1: b update' | ||||
created new head | created new head | ||||
$ hg log -G --rev '::.' | $ hg log -G --rev '::.' | ||||
@ b-1: b update | @ b-1: b update | ||||
| | | | ||||
o i-2: c -move-> d | o i-2: c -move-> d, s -move-> t | ||||
| | | | ||||
o i-1: a -move-> c | o i-1: a -move-> c, p -move-> s | ||||
| | | | ||||
o i-0 initial commit: a b h | o i-0 initial commit: a b h | ||||
Create a branch that delete a file previous renamed | Create a branch that delete a file previous renamed | ||||
$ hg up 'desc("i-2")' | $ hg up 'desc("i-2")' | ||||
1 files updated, 0 files merged, 0 files removed, 0 files unresolved | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | ||||
$ hg rm d | $ hg rm d | ||||
$ hg ci -m 'c-1 delete d' | $ hg ci -m 'c-1 delete d' | ||||
created new head | created new head | ||||
$ hg log -G --rev '::.' | $ hg log -G --rev '::.' | ||||
@ c-1 delete d | @ c-1 delete d | ||||
| | | | ||||
o i-2: c -move-> d | o i-2: c -move-> d, s -move-> t | ||||
| | | | ||||
o i-1: a -move-> c | o i-1: a -move-> c, p -move-> s | ||||
| | | | ||||
o i-0 initial commit: a b h | o i-0 initial commit: a b h | ||||
Create a branch that delete a file previous renamed and recreate it | Create a branch that delete a file previous renamed and recreate it | ||||
$ hg up 'desc("i-2")' | $ hg up 'desc("i-2")' | ||||
1 files updated, 0 files merged, 0 files removed, 0 files unresolved | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | ||||
$ hg rm d | $ hg rm d | ||||
$ hg ci -m 'd-1 delete d' | $ hg ci -m 'd-1 delete d' | ||||
created new head | created new head | ||||
$ echo bar > d | $ echo bar > d | ||||
$ hg add d | $ hg add d | ||||
$ hg ci -m 'd-2 re-add d' | $ hg ci -m 'd-2 re-add d' | ||||
$ hg log -G --rev '::.' | $ hg log -G --rev '::.' | ||||
@ d-2 re-add d | @ d-2 re-add d | ||||
| | | | ||||
o d-1 delete d | o d-1 delete d | ||||
| | | | ||||
o i-2: c -move-> d | o i-2: c -move-> d, s -move-> t | ||||
| | | | ||||
o i-1: a -move-> c | o i-1: a -move-> c, p -move-> s | ||||
| | | | ||||
o i-0 initial commit: a b h | o i-0 initial commit: a b h | ||||
Having another branch renaming a different file to the same filename as another | Having another branch renaming a different file to the same filename as another | ||||
$ hg up 'desc("i-2")' | $ hg up 'desc("i-2")' | ||||
1 files updated, 0 files merged, 0 files removed, 0 files unresolved | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | ||||
$ hg mv b g | $ hg mv b g | ||||
$ hg ci -m 'e-1 b -move-> g' | $ hg ci -m 'e-1 b -move-> g' | ||||
created new head | created new head | ||||
$ hg mv g f | $ hg mv g f | ||||
$ hg ci -m 'e-2 g -move-> f' | $ hg ci -m 'e-2 g -move-> f' | ||||
$ hg log -G --rev '::.' | $ hg log -G --rev '::.' | ||||
@ e-2 g -move-> f | @ e-2 g -move-> f | ||||
| | | | ||||
o e-1 b -move-> g | o e-1 b -move-> g | ||||
| | | | ||||
o i-2: c -move-> d | o i-2: c -move-> d, s -move-> t | ||||
| | | | ||||
o i-1: a -move-> c | o i-1: a -move-> c, p -move-> s | ||||
| | | | ||||
o i-0 initial commit: a b h | o i-0 initial commit: a b h | ||||
Setup all merge | Setup all merge | ||||
=============== | =============== | ||||
This is done beforehand to validate that the upgrade process creates valid copy | This is done beforehand to validate that the upgrade process creates valid copy | ||||
+---o mBAm-0 simple merge - A side: multiple renames, B side: unrelated update - one way | +---o mBAm-0 simple merge - A side: multiple renames, B side: unrelated update - one way | ||||
| |/ | | |/ | ||||
| o b-1: b update | | o b-1: b update | ||||
| | | | | | ||||
o | a-2: e -move-> f | o | a-2: e -move-> f | ||||
| | | | | | ||||
o | a-1: d -move-> e | o | a-1: d -move-> e | ||||
|/ | |/ | ||||
o i-2: c -move-> d | o i-2: c -move-> d, s -move-> t | ||||
| | | | ||||
o i-1: a -move-> c | o i-1: a -move-> c, p -move-> s | ||||
| | | | ||||
o i-0 initial commit: a b h | o i-0 initial commit: a b h | ||||
merging with the side having a delete | merging with the side having a delete | ||||
------------------------------------- | ------------------------------------- | ||||
| | o mBCm-1 re-add d | | | o mBCm-1 re-add d | ||||
| | | | | | | | ||||
+---o mBCm-0 simple merge - C side: delete a file with copies history , B side: unrelated update - one way | +---o mBCm-0 simple merge - C side: delete a file with copies history , B side: unrelated update - one way | ||||
| |/ | | |/ | ||||
| o c-1 delete d | | o c-1 delete d | ||||
| | | | | | ||||
o | b-1: b update | o | b-1: b update | ||||
|/ | |/ | ||||
o i-2: c -move-> d | o i-2: c -move-> d, s -move-> t | ||||
| | | | ||||
o i-1: a -move-> c | o i-1: a -move-> c, p -move-> s | ||||
| | | | ||||
o i-0 initial commit: a b h | o i-0 initial commit: a b h | ||||
Comparing with a merge re-adding the file afterward | Comparing with a merge re-adding the file afterward | ||||
--------------------------------------------------- | --------------------------------------------------- | ||||
Merge: | Merge: | ||||
+---o mBDm-0 simple merge - B side: unrelated update, D side: delete and recreate a file (with different content) - one way | +---o mBDm-0 simple merge - B side: unrelated update, D side: delete and recreate a file (with different content) - one way | ||||
| |/ | | |/ | ||||
| o d-2 re-add d | | o d-2 re-add d | ||||
| | | | | | ||||
| o d-1 delete d | | o d-1 delete d | ||||
| | | | | | ||||
o | b-1: b update | o | b-1: b update | ||||
|/ | |/ | ||||
o i-2: c -move-> d | o i-2: c -move-> d, s -move-> t | ||||
| | | | ||||
o i-1: a -move-> c | o i-1: a -move-> c, p -move-> s | ||||
| | | | ||||
o i-0 initial commit: a b h | o i-0 initial commit: a b h | ||||
Comparing with a merge with colliding rename | Comparing with a merge with colliding rename | ||||
-------------------------------------------- | -------------------------------------------- | ||||
| o e-2 g -move-> f | | o e-2 g -move-> f | ||||
| | | | | | ||||
| o e-1 b -move-> g | | o e-1 b -move-> g | ||||
| | | | | | ||||
o | a-2: e -move-> f | o | a-2: e -move-> f | ||||
| | | | | | ||||
o | a-1: d -move-> e | o | a-1: d -move-> e | ||||
|/ | |/ | ||||
o i-2: c -move-> d | o i-2: c -move-> d, s -move-> t | ||||
| | | | ||||
o i-1: a -move-> c | o i-1: a -move-> c, p -move-> s | ||||
| | | | ||||
o i-0 initial commit: a b h | o i-0 initial commit: a b h | ||||
Subcase: existing copy information overwritten on one branch | Subcase: existing copy information overwritten on one branch | ||||
```````````````````````````````````````````````````````````` | ```````````````````````````````````````````````````````````` | ||||
Merge: | Merge: | ||||
+---o mBFm-0 simple merge - B side: unrelated change, F side: overwrite d with a copy (from h->i->d) - one way | +---o mBFm-0 simple merge - B side: unrelated change, F side: overwrite d with a copy (from h->i->d) - one way | ||||
| |/ | | |/ | ||||
| o f-2: rename i -> d | | o f-2: rename i -> d | ||||
| | | | | | ||||
| o f-1: rename h -> i | | o f-1: rename h -> i | ||||
| | | | | | ||||
o | b-1: b update | o | b-1: b update | ||||
|/ | |/ | ||||
o i-2: c -move-> d | o i-2: c -move-> d, s -move-> t | ||||
| | | | ||||
o i-1: a -move-> c | o i-1: a -move-> c, p -move-> s | ||||
| | | | ||||
o i-0 initial commit: a b h | o i-0 initial commit: a b h | ||||
Subcase: reset of the copy history on one side | Subcase: reset of the copy history on one side | ||||
`````````````````````````````````````````````` | `````````````````````````````````````````````` | ||||
+---o mDGm-0 actual content merge, copies on one side - D side: delete and re-add (different content), G side: update content - one way | +---o mDGm-0 actual content merge, copies on one side - D side: delete and re-add (different content), G side: update content - one way | ||||
| |/ | | |/ | ||||
| o g-1: update d | | o g-1: update d | ||||
| | | | | | ||||
o | d-2 re-add d | o | d-2 re-add d | ||||
| | | | | | ||||
o | d-1 delete d | o | d-1 delete d | ||||
|/ | |/ | ||||
o i-2: c -move-> d | o i-2: c -move-> d, s -move-> t | ||||
| | | | ||||
o i-1: a -move-> c | o i-1: a -move-> c, p -move-> s | ||||
| | | | ||||
o i-0 initial commit: a b h | o i-0 initial commit: a b h | ||||
Subcase: merging a change to a file with a "copy overwrite" to that file from another branch | Subcase: merging a change to a file with a "copy overwrite" to that file from another branch | ||||
```````````````````````````````````````````````````````````````````````````````````````````` | ```````````````````````````````````````````````````````````````````````````````````````````` | ||||
Merge: | Merge: | ||||
+---o mFGm-0 merge - G side: content change, F side: copy overwrite, no content change - one way | +---o mFGm-0 merge - G side: content change, F side: copy overwrite, no content change - one way | ||||
| |/ | | |/ | ||||
| o g-1: update d | | o g-1: update d | ||||
| | | | | | ||||
o | f-2: rename i -> d | o | f-2: rename i -> d | ||||
| | | | | | ||||
o | f-1: rename h -> i | o | f-1: rename h -> i | ||||
|/ | |/ | ||||
o i-2: c -move-> d | o i-2: c -move-> d, s -move-> t | ||||
| | | | ||||
o i-1: a -move-> c | o i-1: a -move-> c, p -move-> s | ||||
| | | | ||||
o i-0 initial commit: a b h | o i-0 initial commit: a b h | ||||
Comparing with merging with a deletion (and keeping the file) | Comparing with merging with a deletion (and keeping the file) | ||||
------------------------------------------------------------- | ------------------------------------------------------------- | ||||
@ mGCm-0 merge updated/deleted - revive the file (updated content) - the other way | @ mGCm-0 merge updated/deleted - revive the file (updated content) - the other way | ||||
|\ | |\ | ||||
+---o mCGm-0 merge updated/deleted - revive the file (updated content) - one way | +---o mCGm-0 merge updated/deleted - revive the file (updated content) - one way | ||||
| |/ | | |/ | ||||
| o g-1: update d | | o g-1: update d | ||||
| | | | | | ||||
o | c-1 delete d | o | c-1 delete d | ||||
|/ | |/ | ||||
o i-2: c -move-> d | o i-2: c -move-> d, s -move-> t | ||||
| | | | ||||
o i-1: a -move-> c | o i-1: a -move-> c, p -move-> s | ||||
| | | | ||||
o i-0 initial commit: a b h | o i-0 initial commit: a b h | ||||
Comparing with merge restoring an untouched deleted file | Comparing with merge restoring an untouched deleted file | ||||
-------------------------------------------------------- | -------------------------------------------------------- | ||||
@ mBC-revert-m-0 merge explicitely revive deleted file - B side: unrelated change, C side: delete d (restored by merge) - the other way | @ mBC-revert-m-0 merge explicitely revive deleted file - B side: unrelated change, C side: delete d (restored by merge) - the other way | ||||
|\ | |\ | ||||
+---o mCB-revert-m-0 merge explicitely revive deleted file - B side: unrelated change, C side: delete d (restored by merge) - one way | +---o mCB-revert-m-0 merge explicitely revive deleted file - B side: unrelated change, C side: delete d (restored by merge) - one way | ||||
| |/ | | |/ | ||||
| o c-1 delete d | | o c-1 delete d | ||||
| | | | | | ||||
o | b-1: b update | o | b-1: b update | ||||
|/ | |/ | ||||
o i-2: c -move-> d | o i-2: c -move-> d, s -move-> t | ||||
| | | | ||||
o i-1: a -move-> c | o i-1: a -move-> c, p -move-> s | ||||
| | | | ||||
o i-0 initial commit: a b h | o i-0 initial commit: a b h | ||||
$ hg up null --quiet | $ hg up null --quiet | ||||
Merging a branch where a rename was deleted with a branch where the same file was renamed | Merging a branch where a rename was deleted with a branch where the same file was renamed | ||||
------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ||||
Create a "conflicting" merge where `d` get removed on one branch before its | Create a "conflicting" merge where `d` get removed on one branch before its | ||||
rename information actually conflict with the other branch. | rename information actually conflict with the other branch. | ||||
(the copy information from the branch that was not deleted should win). | (the copy information from the branch that was not deleted should win). | ||||
$ case_desc="simple merge - C side: d is the results of renames then deleted, H side: d is result of another rename (same content as the other branch)" | $ case_desc="simple merge - C side: d is the results of renames then deleted, H side: d is result of another rename (same content as the other branch)" | ||||
$ hg up 'desc("i-0")' | $ hg up 'desc("i-0")' | ||||
6 files updated, 0 files merged, 0 files removed, 0 files unresolved | 6 files updated, 0 files merged, 0 files removed, 0 files unresolved | ||||
$ hg mv b d | $ hg mv b d | ||||
$ hg ci -m "h-1: b -(move)-> d" | $ hg ci -m "h-1: b -(move)-> d" | ||||
created new head | created new head | ||||
$ hg up 'desc("c-1")' | $ hg up 'desc("c-1")' | ||||
1 files updated, 0 files merged, 2 files removed, 0 files unresolved | 2 files updated, 0 files merged, 3 files removed, 0 files unresolved | ||||
$ hg merge 'desc("h-1")' | $ hg merge 'desc("h-1")' | ||||
1 files updated, 0 files merged, 1 files removed, 0 files unresolved | 1 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 ci -m "mCH-delete-before-conflict-m-0 $case_desc - one way" | $ hg ci -m "mCH-delete-before-conflict-m-0 $case_desc - one way" | ||||
$ hg up 'desc("h-1")' | $ hg up 'desc("h-1")' | ||||
1 files updated, 0 files merged, 0 files removed, 0 files unresolved | 2 files updated, 0 files merged, 1 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 | 1 files updated, 0 files merged, 2 files removed, 0 files unresolved | ||||
(branch merge, don't forget to commit) | (branch merge, don't forget to commit) | ||||
$ hg ci -m "mHC-delete-before-conflict-m-0 $case_desc - the other way" | $ hg ci -m "mHC-delete-before-conflict-m-0 $case_desc - the other way" | ||||
created new head | created new head | ||||
$ hg log -G --rev '::(desc("mCH-delete-before-conflict-m")+desc("mHC-delete-before-conflict-m"))' | $ hg log -G --rev '::(desc("mCH-delete-before-conflict-m")+desc("mHC-delete-before-conflict-m"))' | ||||
@ mHC-delete-before-conflict-m-0 simple merge - C side: d is the results of renames then deleted, H side: d is result of another rename (same content as the other branch) - the other way | @ mHC-delete-before-conflict-m-0 simple merge - C side: d is the results of renames then deleted, H side: d is result of another rename (same content as the other branch) - the other way | ||||
|\ | |\ | ||||
+---o mCH-delete-before-conflict-m-0 simple merge - C side: d is the results of renames then deleted, H side: d is result of another rename (same content as the other branch) - one way | +---o mCH-delete-before-conflict-m-0 simple merge - C side: d is the results of renames then deleted, H side: d is result of another rename (same content as the other branch) - one way | ||||
| |/ | | |/ | ||||
| o h-1: b -(move)-> d | | o h-1: b -(move)-> d | ||||
| | | | | | ||||
o | c-1 delete d | o | c-1 delete d | ||||
| | | | | | ||||
o | i-2: c -move-> d | o | i-2: c -move-> d, s -move-> t | ||||
| | | | | | ||||
o | i-1: a -move-> c | o | i-1: a -move-> c, p -move-> s | ||||
|/ | |/ | ||||
o i-0 initial commit: a b h | o i-0 initial commit: a b h | ||||
Variant of previous with extra changes introduced by the merge | Variant of previous with extra changes introduced by the merge | ||||
-------------------------------------------------------------- | -------------------------------------------------------------- | ||||
Multiple cases above explicitely test cases where content are the same on both side during merge. In this section we will introduce variants for theses cases where new change are introduced to these file content during the merges. | Multiple cases above explicitely test cases where content are the same on both side during merge. In this section we will introduce variants for theses cases where new change are introduced to these file content during the merges. | ||||
| o e-2 g -move-> f | | o e-2 g -move-> f | ||||
| | | | | | ||||
| o e-1 b -move-> g | | o e-1 b -move-> g | ||||
| | | | | | ||||
o | a-2: e -move-> f | o | a-2: e -move-> f | ||||
| | | | | | ||||
o | a-1: d -move-> e | o | a-1: d -move-> e | ||||
|/ | |/ | ||||
o i-2: c -move-> d | o i-2: c -move-> d, s -move-> t | ||||
| | | | ||||
o i-1: a -move-> c | o i-1: a -move-> c, p -move-> s | ||||
| | | | ||||
o i-0 initial commit: a b h | o i-0 initial commit: a b h | ||||
Decision from previous merge are properly chained with later merge | Decision from previous merge are properly chained with later merge | ||||
------------------------------------------------------------------ | ------------------------------------------------------------------ | ||||
Subcase: chaining conflicting rename resolution | Subcase: chaining conflicting rename resolution | ||||
| o e-2 g -move-> f | | o e-2 g -move-> f | ||||
| | | | | | ||||
| o e-1 b -move-> g | | o e-1 b -move-> g | ||||
| | | | | | ||||
o | a-2: e -move-> f | o | a-2: e -move-> f | ||||
| | | | | | ||||
o | a-1: d -move-> e | o | a-1: d -move-> e | ||||
|/ | |/ | ||||
o i-2: c -move-> d | o i-2: c -move-> d, s -move-> t | ||||
| | | | ||||
o i-1: a -move-> c | o i-1: a -move-> c, p -move-> s | ||||
| | | | ||||
o i-0 initial commit: a b h | o i-0 initial commit: a b h | ||||
Subcase: chaining salvage information during a merge | Subcase: chaining salvage information during a merge | ||||
```````````````````````````````````````````````````` | ```````````````````````````````````````````````````` | ||||
We add more change on the branch were the file was deleted. merging again | We add more change on the branch were the file was deleted. merging again | ||||
| | o mBC-revert-m-0 merge explicitely revive deleted file - B side: unrelated change, C side: delete d (restored by merge) - the other way | | | o mBC-revert-m-0 merge explicitely revive deleted file - B side: unrelated change, C side: delete d (restored by merge) - the other way | ||||
| |/| | | |/| | ||||
o---+ mCB-revert-m-0 merge explicitely revive deleted file - B side: unrelated change, C side: delete d (restored by merge) - one way | o---+ mCB-revert-m-0 merge explicitely revive deleted file - B side: unrelated change, C side: delete d (restored by merge) - one way | ||||
|/ / | |/ / | ||||
o | c-1 delete d | o | c-1 delete d | ||||
| | | | | | ||||
| o b-1: b update | | o b-1: b update | ||||
|/ | |/ | ||||
o i-2: c -move-> d | o i-2: c -move-> d, s -move-> t | ||||
| | | | ||||
o i-1: a -move-> c | o i-1: a -move-> c, p -move-> s | ||||
| | | | ||||
o i-0 initial commit: a b h | o i-0 initial commit: a b h | ||||
Subcase: chaining "merged" information during a merge | Subcase: chaining "merged" information during a merge | ||||
`````````````````````````````````````````````````````` | `````````````````````````````````````````````````````` | ||||
| o / mFGm-0 merge - G side: content change, F side: copy overwrite, no content change - one way | | o / mFGm-0 merge - G side: content change, F side: copy overwrite, no content change - one way | ||||
|/|/ | |/|/ | ||||
| o g-1: update d | | o g-1: update d | ||||
| | | | | | ||||
o | f-2: rename i -> d | o | f-2: rename i -> d | ||||
| | | | | | ||||
o | f-1: rename h -> i | o | f-1: rename h -> i | ||||
|/ | |/ | ||||
o i-2: c -move-> d | o i-2: c -move-> d, s -move-> t | ||||
| | | | ||||
o i-1: a -move-> c | o i-1: a -move-> c, p -move-> s | ||||
| | | | ||||
o i-0 initial commit: a b h | o i-0 initial commit: a b h | ||||
Subcase: chaining conflicting rename resolution, with extra change during the merge | Subcase: chaining conflicting rename resolution, with extra change during the merge | ||||
``````````````````````````````````````````````````````````````````````````````````` | ``````````````````````````````````````````````````````````````````````````````````` | ||||
The "mEA-change-m-0" and "mAE-change-m-0" case create a rename tracking conflict on file 'f'. We | The "mEA-change-m-0" and "mAE-change-m-0" case create a rename tracking conflict on file 'f'. We | ||||
| o e-2 g -move-> f | | o e-2 g -move-> f | ||||
| | | | | | ||||
| o e-1 b -move-> g | | o e-1 b -move-> g | ||||
| | | | | | ||||
o | a-2: e -move-> f | o | a-2: e -move-> f | ||||
| | | | | | ||||
o | a-1: d -move-> e | o | a-1: d -move-> e | ||||
|/ | |/ | ||||
o i-2: c -move-> d | o i-2: c -move-> d, s -move-> t | ||||
| | | | ||||
o i-1: a -move-> c | o i-1: a -move-> c, p -move-> s | ||||
| | | | ||||
o i-0 initial commit: a b h | o i-0 initial commit: a b h | ||||
Summary of all created cases | Summary of all created cases | ||||
---------------------------- | ---------------------------- | ||||
$ hg up --quiet null | $ hg up --quiet null | ||||
d-2 re-add d | d-2 re-add d | ||||
e-1 b -move-> g | e-1 b -move-> g | ||||
e-2 g -move-> f | e-2 g -move-> f | ||||
f-1: rename h -> i | f-1: rename h -> i | ||||
f-2: rename i -> d | f-2: rename i -> d | ||||
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, p -move-> s | ||||
i-2: c -move-> d | i-2: c -move-> d, s -move-> t | ||||
j-1: unrelated changes (based on the "a" series of changes) | j-1: unrelated changes (based on the "a" series of changes) | ||||
k-1: unrelated changes (based on "e" changes) | k-1: unrelated changes (based on "e" changes) | ||||
l-1: unrelated changes (based on "c" changes) | l-1: unrelated changes (based on "c" changes) | ||||
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 | ||||
mAE,Km: chained merges (conflict -> simple) - same content everywhere | mAE,Km: chained merges (conflict -> simple) - same content everywhere | ||||
mAE-change,Km: chained merges (conflict+change -> simple) - same content on both branch in the initial merge | mAE-change,Km: chained merges (conflict+change -> simple) - same content on both branch in the initial merge | ||||
mAE-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) - one way | mAE-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) - 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 | 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 | ||||
added : a, ; | added : a, ; | ||||
added : b, ; | added : b, ; | ||||
added : h, ; | added : h, ; | ||||
added : p, ; | added : p, ; | ||||
added : q, ; | added : q, ; | ||||
added : r, ; | added : r, ; | ||||
##### revision "i-1" ##### | ##### revision "i-1" ##### | ||||
1 sidedata entries | 1 sidedata entries | ||||
entry-0014 size 24 | entry-0014 size 44 | ||||
'\x00\x00\x00\x02\x0c\x00\x00\x00\x01\x00\x00\x00\x00\x06\x00\x00\x00\x02\x00\x00\x00\x00ac' | '\x00\x00\x00\x04\x0c\x00\x00\x00\x01\x00\x00\x00\x00\x06\x00\x00\x00\x02\x00\x00\x00\x00\x0c\x00\x00\x00\x03\x00\x00\x00\x00\x06\x00\x00\x00\x04\x00\x00\x00\x02acps' | ||||
removed : a, ; | removed : a, ; | ||||
added p1: c, a; | added p1: c, a; | ||||
removed : p, ; | |||||
added p1: s, p; | |||||
##### revision "i-2" ##### | ##### revision "i-2" ##### | ||||
1 sidedata entries | 1 sidedata entries | ||||
entry-0014 size 24 | entry-0014 size 44 | ||||
'\x00\x00\x00\x02\x0c\x00\x00\x00\x01\x00\x00\x00\x00\x06\x00\x00\x00\x02\x00\x00\x00\x00cd' | '\x00\x00\x00\x04\x0c\x00\x00\x00\x01\x00\x00\x00\x00\x06\x00\x00\x00\x02\x00\x00\x00\x00\x0c\x00\x00\x00\x03\x00\x00\x00\x00\x06\x00\x00\x00\x04\x00\x00\x00\x02cdst' | ||||
removed : c, ; | removed : c, ; | ||||
added p1: d, c; | added p1: d, c; | ||||
removed : s, ; | |||||
added p1: t, s; | |||||
##### revision "a-1" ##### | ##### revision "a-1" ##### | ||||
1 sidedata entries | 1 sidedata entries | ||||
entry-0014 size 24 | entry-0014 size 24 | ||||
'\x00\x00\x00\x02\x0c\x00\x00\x00\x01\x00\x00\x00\x00\x06\x00\x00\x00\x02\x00\x00\x00\x00de' | '\x00\x00\x00\x02\x0c\x00\x00\x00\x01\x00\x00\x00\x00\x06\x00\x00\x00\x02\x00\x00\x00\x00de' | ||||
removed : d, ; | removed : d, ; | ||||
added p1: e, d; | added p1: e, d; | ||||
##### revision "a-2" ##### | ##### revision "a-2" ##### | ||||
1 sidedata entries | 1 sidedata entries | ||||
Check that matching only affect the destination and not intermediate path | Check that matching only affect the destination and not intermediate path | ||||
------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ||||
The two status call should give the same value for f | The two status call should give the same value for f | ||||
$ hg status --copies --rev 'desc("i-0")' --rev 'desc("a-2")' | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("a-2")' | ||||
A f | A f | ||||
a | a | ||||
A t | |||||
p | |||||
R a | R a | ||||
R p | |||||
$ hg status --copies --rev 'desc("i-0")' --rev 'desc("a-2")' f | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("a-2")' f | ||||
A f | A f | ||||
a (no-changeset no-compatibility !) | a (no-changeset no-compatibility !) | ||||
merging with unrelated change does not interfere with the renames | merging with unrelated change does not interfere with the renames | ||||
--------------------------------------------------------------- | --------------------------------------------------------------- | ||||
- rename on one side | - rename on one side | ||||
- unrelated change on the other side | - unrelated change on the other side | ||||
$ hg log -G --rev '::(desc("mABm")+desc("mBAm"))' | $ hg log -G --rev '::(desc("mABm")+desc("mBAm"))' | ||||
o mABm-0 simple merge - A side: multiple renames, B side: unrelated update - the other way | o mABm-0 simple merge - A side: multiple renames, B side: unrelated update - the other way | ||||
|\ | |\ | ||||
+---o mBAm-0 simple merge - A side: multiple renames, B side: unrelated update - one way | +---o mBAm-0 simple merge - A side: multiple renames, B side: unrelated update - one way | ||||
| |/ | | |/ | ||||
| o b-1: b update | | o b-1: b update | ||||
| | | | | | ||||
o | a-2: e -move-> f | o | a-2: e -move-> f | ||||
| | | | | | ||||
o | a-1: d -move-> e | o | a-1: d -move-> e | ||||
|/ | |/ | ||||
o i-2: c -move-> d | o i-2: c -move-> d, s -move-> t | ||||
| | | | ||||
o i-1: a -move-> c | o i-1: a -move-> c, p -move-> s | ||||
| | | | ||||
o i-0 initial commit: a b h | o i-0 initial commit: a b h | ||||
$ hg status --copies --rev 'desc("b-1")' --rev 'desc("mABm")' | $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mABm")' | ||||
A f | A f | ||||
d | d | ||||
R d | R d | ||||
M b | M b | ||||
A f | A f | ||||
d | d | ||||
R d | R d | ||||
$ hg status --copies --rev 'desc("i-0")' --rev 'desc("mABm")' | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mABm")' | ||||
M b | M b | ||||
A f | A f | ||||
a | a | ||||
A t | |||||
p | |||||
R a | R a | ||||
R p | |||||
$ hg status --copies --rev 'desc("i-0")' --rev 'desc("mBAm")' | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mBAm")' | ||||
M b | M b | ||||
A f | A f | ||||
a | a | ||||
A t | |||||
p | |||||
R a | R a | ||||
R p | |||||
merging with the side having a delete | merging with the side having a delete | ||||
------------------------------------- | ------------------------------------- | ||||
case summary: | case summary: | ||||
- one with change to an unrelated file | - one with change to an unrelated file | ||||
- one deleting the change | - one deleting the change | ||||
and recreate an unrelated file after the merge | and recreate an unrelated file after the merge | ||||
$ hg log -G --rev '::(desc("mCBm")+desc("mBCm"))' | $ hg log -G --rev '::(desc("mCBm")+desc("mBCm"))' | ||||
o mCBm-1 re-add d | o mCBm-1 re-add d | ||||
| | | | ||||
o mCBm-0 simple merge - C side: delete a file with copies history , B side: unrelated update - the other way | o mCBm-0 simple merge - C side: delete a file with copies history , B side: unrelated update - the other way | ||||
|\ | |\ | ||||
| | o mBCm-1 re-add d | | | o mBCm-1 re-add d | ||||
| | | | | | | | ||||
+---o mBCm-0 simple merge - C side: delete a file with copies history , B side: unrelated update - one way | +---o mBCm-0 simple merge - C side: delete a file with copies history , B side: unrelated update - one way | ||||
| |/ | | |/ | ||||
| o c-1 delete d | | o c-1 delete d | ||||
| | | | | | ||||
o | b-1: b update | o | b-1: b update | ||||
|/ | |/ | ||||
o i-2: c -move-> d | o i-2: c -move-> d, s -move-> t | ||||
| | | | ||||
o i-1: a -move-> c | o i-1: a -move-> c, p -move-> s | ||||
| | | | ||||
o i-0 initial commit: a b h | o i-0 initial commit: a b h | ||||
- comparing from the merge | - comparing from the merge | ||||
$ hg status --copies --rev 'desc("b-1")' --rev 'desc("mBCm-0")' | $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mBCm-0")' | ||||
R d | R d | ||||
$ hg status --copies --rev 'desc("b-1")' --rev 'desc("mCBm-0")' | $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mCBm-0")' | ||||
R d | R d | ||||
$ hg status --copies --rev 'desc("c-1")' --rev 'desc("mBCm-0")' | $ hg status --copies --rev 'desc("c-1")' --rev 'desc("mBCm-0")' | ||||
M b | M b | ||||
$ hg status --copies --rev 'desc("c-1")' --rev 'desc("mCBm-0")' | $ hg status --copies --rev 'desc("c-1")' --rev 'desc("mCBm-0")' | ||||
M b | M b | ||||
$ hg status --copies --rev 'desc("i-2")' --rev 'desc("mBCm-0")' | $ hg status --copies --rev 'desc("i-2")' --rev 'desc("mBCm-0")' | ||||
M b | M b | ||||
R d | R d | ||||
$ hg status --copies --rev 'desc("i-2")' --rev 'desc("mCBm-0")' | $ hg status --copies --rev 'desc("i-2")' --rev 'desc("mCBm-0")' | ||||
M b | M b | ||||
R d | R d | ||||
$ hg status --copies --rev 'desc("i-0")' --rev 'desc("mBCm-0")' | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mBCm-0")' | ||||
M b | M b | ||||
A t | |||||
p | |||||
R a | R a | ||||
R p | |||||
$ hg status --copies --rev 'desc("i-0")' --rev 'desc("mCBm-0")' | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mCBm-0")' | ||||
M b | M b | ||||
A t | |||||
p | |||||
R a | R a | ||||
R p | |||||
- comparing with the merge children re-adding the file | - comparing with the merge children re-adding the file | ||||
$ hg status --copies --rev 'desc("b-1")' --rev 'desc("mBCm-1")' | $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mBCm-1")' | ||||
M d | M d | ||||
$ hg status --copies --rev 'desc("b-1")' --rev 'desc("mCBm-1")' | $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mCBm-1")' | ||||
M d | M d | ||||
$ hg status --copies --rev 'desc("c-1")' --rev 'desc("mBCm-1")' | $ hg status --copies --rev 'desc("c-1")' --rev 'desc("mBCm-1")' | ||||
M b | M b | ||||
A d | A d | ||||
$ hg status --copies --rev 'desc("c-1")' --rev 'desc("mCBm-1")' | $ hg status --copies --rev 'desc("c-1")' --rev 'desc("mCBm-1")' | ||||
M b | M b | ||||
A d | A d | ||||
$ hg status --copies --rev 'desc("i-2")' --rev 'desc("mBCm-1")' | $ hg status --copies --rev 'desc("i-2")' --rev 'desc("mBCm-1")' | ||||
M b | M b | ||||
M d | M d | ||||
$ hg status --copies --rev 'desc("i-2")' --rev 'desc("mCBm-1")' | $ hg status --copies --rev 'desc("i-2")' --rev 'desc("mCBm-1")' | ||||
M b | M b | ||||
M d | M d | ||||
$ hg status --copies --rev 'desc("i-0")' --rev 'desc("mBCm-1")' | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mBCm-1")' | ||||
M b | M b | ||||
A d | A d | ||||
A t | |||||
p | |||||
R a | R a | ||||
R p | |||||
$ hg status --copies --rev 'desc("i-0")' --rev 'desc("mCBm-1")' | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mCBm-1")' | ||||
M b | M b | ||||
A d | A d | ||||
A t | |||||
p | |||||
R a | R a | ||||
R p | |||||
Comparing with a merge re-adding the file afterward | Comparing with a merge re-adding the file afterward | ||||
--------------------------------------------------- | --------------------------------------------------- | ||||
Merge: | Merge: | ||||
- one with change to an unrelated file | - one with change to an unrelated file | ||||
- one deleting and recreating the change | - one deleting and recreating the change | ||||
$ hg log -G --rev '::(desc("mDBm")+desc("mBDm"))' | $ hg log -G --rev '::(desc("mDBm")+desc("mBDm"))' | ||||
o mDBm-0 simple merge - B side: unrelated update, D side: delete and recreate a file (with different content) - the other way | o mDBm-0 simple merge - B side: unrelated update, D side: delete and recreate a file (with different content) - the other way | ||||
|\ | |\ | ||||
+---o mBDm-0 simple merge - B side: unrelated update, D side: delete and recreate a file (with different content) - one way | +---o mBDm-0 simple merge - B side: unrelated update, D side: delete and recreate a file (with different content) - one way | ||||
| |/ | | |/ | ||||
| o d-2 re-add d | | o d-2 re-add d | ||||
| | | | | | ||||
| o d-1 delete d | | o d-1 delete d | ||||
| | | | | | ||||
o | b-1: b update | o | b-1: b update | ||||
|/ | |/ | ||||
o i-2: c -move-> d | o i-2: c -move-> d, s -move-> t | ||||
| | | | ||||
o i-1: a -move-> c | o i-1: a -move-> c, p -move-> s | ||||
| | | | ||||
o i-0 initial commit: a b h | o i-0 initial commit: a b h | ||||
$ hg status --copies --rev 'desc("b-1")' --rev 'desc("mBDm-0")' | $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mBDm-0")' | ||||
M d | M d | ||||
$ hg status --copies --rev 'desc("b-1")' --rev 'desc("mDBm-0")' | $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mDBm-0")' | ||||
M d | M d | ||||
$ hg status --copies --rev 'desc("d-2")' --rev 'desc("mBDm-0")' | $ hg status --copies --rev 'desc("d-2")' --rev 'desc("mBDm-0")' | ||||
$ hg log -Gfr 'desc("mDBm-0")' d | $ hg log -Gfr 'desc("mDBm-0")' d | ||||
o d-2 re-add d | o d-2 re-add d | ||||
| | | | ||||
~ | ~ | ||||
$ hg status --copies --rev 'desc("i-0")' --rev 'desc("mBDm-0")' | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mBDm-0")' | ||||
M b | M b | ||||
A d | A d | ||||
A t | |||||
p | |||||
R a | R a | ||||
R p | |||||
$ hg status --copies --rev 'desc("i-0")' --rev 'desc("mDBm-0")' | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mDBm-0")' | ||||
M b | M b | ||||
A d | A d | ||||
A t | |||||
p | |||||
R a | R a | ||||
R p | |||||
Comparing with a merge with colliding rename | Comparing with a merge with colliding rename | ||||
-------------------------------------------- | -------------------------------------------- | ||||
Subcase: new copy information on both side | Subcase: new copy information on both side | ||||
`````````````````````````````````````````` | `````````````````````````````````````````` | ||||
- the "e-" branch renaming b to f (through 'g') | - the "e-" branch renaming b to f (through 'g') | ||||
- the "a-" branch renaming d to f (through e) | - the "a-" branch renaming d to f (through e) | ||||
$ hg log -G --rev '::(desc("mAEm")+desc("mEAm"))' | $ hg log -G --rev '::(desc("mAEm")+desc("mEAm"))' | ||||
o 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 | o 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 | ||||
|\ | |\ | ||||
+---o 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 | +---o 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 | ||||
| |/ | | |/ | ||||
| o e-2 g -move-> f | | o e-2 g -move-> f | ||||
| | | | | | ||||
| o e-1 b -move-> g | | o e-1 b -move-> g | ||||
| | | | | | ||||
o | a-2: e -move-> f | o | a-2: e -move-> f | ||||
| | | | | | ||||
o | a-1: d -move-> e | o | a-1: d -move-> e | ||||
|/ | |/ | ||||
o i-2: c -move-> d | o i-2: c -move-> d, s -move-> t | ||||
| | | | ||||
o i-1: a -move-> c | o i-1: a -move-> c, p -move-> s | ||||
| | | | ||||
o i-0 initial commit: a b h | o i-0 initial commit: a b h | ||||
#if no-changeset | #if no-changeset | ||||
$ hg manifest --debug --rev 'desc("mAEm-0")' | grep '644 f' | $ hg manifest --debug --rev 'desc("mAEm-0")' | grep '644 f' | ||||
ffb76cd765422a18759a335d8a81fa2bd455be6b 644 f | ffb76cd765422a18759a335d8a81fa2bd455be6b 644 f | ||||
$ hg manifest --debug --rev 'desc("mEAm-0")' | grep '644 f' | $ hg manifest --debug --rev 'desc("mEAm-0")' | grep '644 f' | ||||
ffb76cd765422a18759a335d8a81fa2bd455be6b 644 f | ffb76cd765422a18759a335d8a81fa2bd455be6b 644 f | ||||
A f | A f | ||||
d (filelog !) | d (filelog !) | ||||
b (no-filelog !) | b (no-filelog !) | ||||
R b | R b | ||||
R d | R d | ||||
$ hg status --copies --rev 'desc("i-0")' --rev 'desc("mAEm-0")' | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mAEm-0")' | ||||
A f | A f | ||||
a | a | ||||
A t | |||||
p | |||||
R a | R a | ||||
R b | R b | ||||
R p | |||||
$ hg status --copies --rev 'desc("i-0")' --rev 'desc("mEAm-0")' | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mEAm-0")' | ||||
A f | A f | ||||
a (filelog !) | a (filelog !) | ||||
b (no-filelog !) | b (no-filelog !) | ||||
A t | |||||
p | |||||
R a | R a | ||||
R b | R b | ||||
R p | |||||
Subcase: existing copy information overwritten on one branch | Subcase: existing copy information overwritten on one branch | ||||
```````````````````````````````````````````````````````````` | ```````````````````````````````````````````````````````````` | ||||
Note: | Note: | ||||
| In this case, one of the merge wrongly record a merge while there is none. | | In this case, one of the merge wrongly record a merge while there is none. | ||||
| This lead to bad copy tracing information to be dug up. | | This lead to bad copy tracing information to be dug up. | ||||
+---o mBFm-0 simple merge - B side: unrelated change, F side: overwrite d with a copy (from h->i->d) - one way | +---o mBFm-0 simple merge - B side: unrelated change, F side: overwrite d with a copy (from h->i->d) - one way | ||||
| |/ | | |/ | ||||
| o f-2: rename i -> d | | o f-2: rename i -> d | ||||
| | | | | | ||||
| o f-1: rename h -> i | | o f-1: rename h -> i | ||||
| | | | | | ||||
o | b-1: b update | o | b-1: b update | ||||
|/ | |/ | ||||
o i-2: c -move-> d | o i-2: c -move-> d, s -move-> t | ||||
| | | | ||||
o i-1: a -move-> c | o i-1: a -move-> c, p -move-> s | ||||
| | | | ||||
o i-0 initial commit: a b h | o i-0 initial commit: a b h | ||||
$ hg status --copies --rev 'desc("i-0")' --rev 'desc("mBFm-0")' | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mBFm-0")' | ||||
M b | M b | ||||
A d | A d | ||||
h | h | ||||
A t | |||||
p | |||||
R a | R a | ||||
R h | R h | ||||
R p | |||||
$ hg status --copies --rev 'desc("i-0")' --rev 'desc("mFBm-0")' | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mFBm-0")' | ||||
M b | M b | ||||
A d | A d | ||||
h | h | ||||
A t | |||||
p | |||||
R a | R a | ||||
R h | R h | ||||
R p | |||||
$ hg status --copies --rev 'desc("b-1")' --rev 'desc("mBFm-0")' | $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mBFm-0")' | ||||
M d (no-changeset !) | M d (no-changeset !) | ||||
h (no-filelog no-changeset !) | h (no-filelog no-changeset !) | ||||
R h | R h | ||||
$ hg status --copies --rev 'desc("f-2")' --rev 'desc("mBFm-0")' | $ hg status --copies --rev 'desc("f-2")' --rev 'desc("mBFm-0")' | ||||
M b | M b | ||||
$ hg status --copies --rev 'desc("f-1")' --rev 'desc("mBFm-0")' | $ hg status --copies --rev 'desc("f-1")' --rev 'desc("mBFm-0")' | ||||
M b | M b | ||||
| | | | ||||
o f-1: rename h -> i | o f-1: rename h -> i | ||||
: | : | ||||
o i-0 initial commit: a b h | o i-0 initial commit: a b h | ||||
#else | #else | ||||
BROKEN: `hg log --follow <file>` relies on filelog metadata to work | BROKEN: `hg log --follow <file>` relies on filelog metadata to work | ||||
$ hg log -Gfr 'desc("mBFm-0")' d | $ hg log -Gfr 'desc("mBFm-0")' d | ||||
o i-2: c -move-> d | o i-2: c -move-> d, s -move-> t | ||||
| | | | ||||
~ | ~ | ||||
#endif | #endif | ||||
#if no-changeset | #if no-changeset | ||||
$ hg log -Gfr 'desc("mFBm-0")' d | $ hg log -Gfr 'desc("mFBm-0")' d | ||||
o f-2: rename i -> d | o f-2: rename i -> d | ||||
| | | | ||||
o f-1: rename h -> i | o f-1: rename h -> i | ||||
: | : | ||||
o i-0 initial commit: a b h | o i-0 initial commit: a b h | ||||
#else | #else | ||||
BROKEN: `hg log --follow <file>` relies on filelog metadata to work | BROKEN: `hg log --follow <file>` relies on filelog metadata to work | ||||
$ hg log -Gfr 'desc("mFBm-0")' d | $ hg log -Gfr 'desc("mFBm-0")' d | ||||
o i-2: c -move-> d | o i-2: c -move-> d, s -move-> t | ||||
| | | | ||||
~ | ~ | ||||
#endif | #endif | ||||
Subcase: reset of the copy history on one side | Subcase: reset of the copy history on one side | ||||
`````````````````````````````````````````````` | `````````````````````````````````````````````` | ||||
Merge: | Merge: | ||||
+---o mDGm-0 actual content merge, copies on one side - D side: delete and re-add (different content), G side: update content - one way | +---o mDGm-0 actual content merge, copies on one side - D side: delete and re-add (different content), G side: update content - one way | ||||
| |/ | | |/ | ||||
| o g-1: update d | | o g-1: update d | ||||
| | | | | | ||||
o | d-2 re-add d | o | d-2 re-add d | ||||
| | | | | | ||||
o | d-1 delete d | o | d-1 delete d | ||||
|/ | |/ | ||||
o i-2: c -move-> d | o i-2: c -move-> d, s -move-> t | ||||
| | | | ||||
o i-1: a -move-> c | o i-1: a -move-> c, p -move-> s | ||||
| | | | ||||
o i-0 initial commit: a b h | o i-0 initial commit: a b h | ||||
One side of the merge have a long history with rename. The other side of the | One side of the merge have a long history with rename. The other side of the | ||||
merge point to a new file with a smaller history. Each side is "valid". | merge point to a new file with a smaller history. Each side is "valid". | ||||
(and again the filelog based algorithm only explore one, with a pick based on | (and again the filelog based algorithm only explore one, with a pick based on | ||||
revision numbers) | revision numbers) | ||||
$ hg status --copies --rev 'desc("i-0")' --rev 'desc("mDGm-0")' | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mDGm-0")' | ||||
A d | A d | ||||
a (filelog !) | a (filelog !) | ||||
A t | |||||
p | |||||
R a | R a | ||||
R p | |||||
$ hg status --copies --rev 'desc("i-0")' --rev 'desc("mGDm-0")' | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mGDm-0")' | ||||
A d | A d | ||||
a | a | ||||
A t | |||||
p | |||||
R a | R a | ||||
R p | |||||
$ hg status --copies --rev 'desc("d-2")' --rev 'desc("mDGm-0")' | $ hg status --copies --rev 'desc("d-2")' --rev 'desc("mDGm-0")' | ||||
M d | M d | ||||
$ hg status --copies --rev 'desc("d-2")' --rev 'desc("mGDm-0")' | $ hg status --copies --rev 'desc("d-2")' --rev 'desc("mGDm-0")' | ||||
M d | M d | ||||
$ hg status --copies --rev 'desc("g-1")' --rev 'desc("mDGm-0")' | $ hg status --copies --rev 'desc("g-1")' --rev 'desc("mDGm-0")' | ||||
M d | M d | ||||
$ hg status --copies --rev 'desc("g-1")' --rev 'desc("mGDm-0")' | $ hg status --copies --rev 'desc("g-1")' --rev 'desc("mGDm-0")' | ||||
M d | M d | ||||
#if no-changeset | #if no-changeset | ||||
$ hg log -Gfr 'desc("mDGm-0")' d | $ hg log -Gfr 'desc("mDGm-0")' d | ||||
o mDGm-0 actual content merge, copies on one side - D side: delete and re-add (different content), G side: update content - one way | o mDGm-0 actual content merge, copies on one side - D side: delete and re-add (different content), G side: update content - one way | ||||
|\ | |\ | ||||
| o g-1: update d | | o g-1: update d | ||||
| | | | | | ||||
o | d-2 re-add d | o | d-2 re-add d | ||||
|/ | |/ | ||||
o i-2: c -move-> d | o i-2: c -move-> d, s -move-> t | ||||
| | | | ||||
o i-1: a -move-> c | o i-1: a -move-> c, p -move-> s | ||||
| | | | ||||
o i-0 initial commit: a b h | o i-0 initial commit: a b h | ||||
#else | #else | ||||
BROKEN: `hg log --follow <file>` relies on filelog metadata to work | BROKEN: `hg log --follow <file>` relies on filelog metadata to work | ||||
$ hg log -Gfr 'desc("mDGm-0")' d | $ hg log -Gfr 'desc("mDGm-0")' d | ||||
o mDGm-0 actual content merge, copies on one side - D side: delete and re-add (different content), G side: update content - one way | o mDGm-0 actual content merge, copies on one side - D side: delete and re-add (different content), G side: update content - one way | ||||
|\ | |\ | ||||
| o g-1: update d | | o g-1: update d | ||||
| | | | | | ||||
o | d-2 re-add d | o | d-2 re-add d | ||||
|/ | |/ | ||||
o i-2: c -move-> d | o i-2: c -move-> d, s -move-> t | ||||
| | | | ||||
~ | ~ | ||||
#endif | #endif | ||||
#if no-changeset | #if no-changeset | ||||
$ hg log -Gfr 'desc("mDGm-0")' d | $ hg log -Gfr 'desc("mDGm-0")' d | ||||
o mDGm-0 actual content merge, copies on one side - D side: delete and re-add (different content), G side: update content - one way | o mDGm-0 actual content merge, copies on one side - D side: delete and re-add (different content), G side: update content - one way | ||||
|\ | |\ | ||||
| o g-1: update d | | o g-1: update d | ||||
| | | | | | ||||
o | d-2 re-add d | o | d-2 re-add d | ||||
|/ | |/ | ||||
o i-2: c -move-> d | o i-2: c -move-> d, s -move-> t | ||||
| | | | ||||
o i-1: a -move-> c | o i-1: a -move-> c, p -move-> s | ||||
| | | | ||||
o i-0 initial commit: a b h | o i-0 initial commit: a b h | ||||
#else | #else | ||||
BROKEN: `hg log --follow <file>` relies on filelog metadata to work | BROKEN: `hg log --follow <file>` relies on filelog metadata to work | ||||
$ hg log -Gfr 'desc("mDGm-0")' d | $ hg log -Gfr 'desc("mDGm-0")' d | ||||
o mDGm-0 actual content merge, copies on one side - D side: delete and re-add (different content), G side: update content - one way | o mDGm-0 actual content merge, copies on one side - D side: delete and re-add (different content), G side: update content - one way | ||||
|\ | |\ | ||||
| o g-1: update d | | o g-1: update d | ||||
| | | | | | ||||
o | d-2 re-add d | o | d-2 re-add d | ||||
|/ | |/ | ||||
o i-2: c -move-> d | o i-2: c -move-> d, s -move-> t | ||||
| | | | ||||
~ | ~ | ||||
#endif | #endif | ||||
Subcase: merging a change to a file with a "copy overwrite" to that file from another branch | Subcase: merging a change to a file with a "copy overwrite" to that file from another branch | ||||
```````````````````````````````````````````````````````````````````````````````````````````` | ```````````````````````````````````````````````````````````````````````````````````````````` | ||||
Merge: | Merge: | ||||
+---o mFGm-0 merge - G side: content change, F side: copy overwrite, no content change - one way | +---o mFGm-0 merge - G side: content change, F side: copy overwrite, no content change - one way | ||||
| |/ | | |/ | ||||
| o g-1: update d | | o g-1: update d | ||||
| | | | | | ||||
o | f-2: rename i -> d | o | f-2: rename i -> d | ||||
| | | | | | ||||
o | f-1: rename h -> i | o | f-1: rename h -> i | ||||
|/ | |/ | ||||
o i-2: c -move-> d | o i-2: c -move-> d, s -move-> t | ||||
| | | | ||||
o i-1: a -move-> c | o i-1: a -move-> c, p -move-> s | ||||
| | | | ||||
o i-0 initial commit: a b h | o i-0 initial commit: a b h | ||||
Note: | Note: | ||||
| In this case, the merge get conflicting information since on one side we have | | In this case, the merge get conflicting information since on one side we have | ||||
| "a -> c -> d". and one the other one we have "h -> i -> d". | | "a -> c -> d". and one the other one we have "h -> i -> d". | ||||
| | | | ||||
h (no-changeset no-compatibility !) | h (no-changeset no-compatibility !) | ||||
Copy tracing data on the resulting merge: | Copy tracing data on the resulting merge: | ||||
$ hg status --copies --rev 'desc("i-0")' --rev 'desc("mFGm-0")' | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mFGm-0")' | ||||
A d | A d | ||||
h (no-filelog !) | h (no-filelog !) | ||||
a (filelog !) | a (filelog !) | ||||
A t | |||||
p | |||||
R a | R a | ||||
R h | R h | ||||
R p | |||||
$ hg status --copies --rev 'desc("i-0")' --rev 'desc("mGFm-0")' | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mGFm-0")' | ||||
A d | A d | ||||
a (no-changeset !) | a (no-changeset !) | ||||
h (changeset !) | h (changeset !) | ||||
A t | |||||
p | |||||
R a | R a | ||||
R h | R h | ||||
R p | |||||
$ hg status --copies --rev 'desc("f-2")' --rev 'desc("mFGm-0")' | $ hg status --copies --rev 'desc("f-2")' --rev 'desc("mFGm-0")' | ||||
M d | M d | ||||
$ hg status --copies --rev 'desc("f-2")' --rev 'desc("mGFm-0")' | $ hg status --copies --rev 'desc("f-2")' --rev 'desc("mGFm-0")' | ||||
M d | M d | ||||
$ hg status --copies --rev 'desc("f-1")' --rev 'desc("mFGm-0")' | $ hg status --copies --rev 'desc("f-1")' --rev 'desc("mFGm-0")' | ||||
M d | M d | ||||
i (no-filelog !) | i (no-filelog !) | ||||
R i | R i | ||||
o mFGm-0 merge - G side: content change, F side: copy overwrite, no content change - one way | o mFGm-0 merge - G side: content change, F side: copy overwrite, no content change - one way | ||||
|\ | |\ | ||||
| o g-1: update d | | o g-1: update d | ||||
| | | | | | ||||
o | f-2: rename i -> d | o | f-2: rename i -> d | ||||
| | | | | | ||||
o | f-1: rename h -> i | o | f-1: rename h -> i | ||||
|/ | |/ | ||||
o i-2: c -move-> d | o i-2: c -move-> d, s -move-> t | ||||
| | | | ||||
o i-1: a -move-> c | o i-1: a -move-> c, p -move-> s | ||||
| | | | ||||
o i-0 initial commit: a b h | o i-0 initial commit: a b h | ||||
#else | #else | ||||
BROKEN: `hg log --follow <file>` relies on filelog metadata to work | BROKEN: `hg log --follow <file>` relies on filelog metadata to work | ||||
$ hg log -Gfr 'desc("mFGm-0")' d | $ hg log -Gfr 'desc("mFGm-0")' d | ||||
o g-1: update d | o g-1: update d | ||||
| | | | ||||
o i-2: c -move-> d | o i-2: c -move-> d, s -move-> t | ||||
| | | | ||||
~ | ~ | ||||
#endif | #endif | ||||
#if no-changeset | #if no-changeset | ||||
$ hg log -Gfr 'desc("mGFm-0")' d | $ hg log -Gfr 'desc("mGFm-0")' d | ||||
o mGFm-0 merge - G side: content change, F side: copy overwrite, no content change - the other way | o mGFm-0 merge - G side: content change, F side: copy overwrite, no content change - the other way | ||||
|\ | |\ | ||||
| o g-1: update d | | o g-1: update d | ||||
| | | | | | ||||
o | f-2: rename i -> d | o | f-2: rename i -> d | ||||
| | | | | | ||||
o | f-1: rename h -> i | o | f-1: rename h -> i | ||||
|/ | |/ | ||||
o i-2: c -move-> d | o i-2: c -move-> d, s -move-> t | ||||
| | | | ||||
o i-1: a -move-> c | o i-1: a -move-> c, p -move-> s | ||||
| | | | ||||
o i-0 initial commit: a b h | o i-0 initial commit: a b h | ||||
#else | #else | ||||
BROKEN: `hg log --follow <file>` relies on filelog metadata to work | BROKEN: `hg log --follow <file>` relies on filelog metadata to work | ||||
$ hg log -Gfr 'desc("mGFm-0")' d | $ hg log -Gfr 'desc("mGFm-0")' d | ||||
o g-1: update d | o g-1: update d | ||||
| | | | ||||
o i-2: c -move-> d | o i-2: c -move-> d, s -move-> t | ||||
| | | | ||||
~ | ~ | ||||
#endif | #endif | ||||
Comparing with merging with a deletion (and keeping the file) | Comparing with merging with a deletion (and keeping the file) | ||||
------------------------------------------------------------- | ------------------------------------------------------------- | ||||
o mGCm-0 merge updated/deleted - revive the file (updated content) - the other way | o mGCm-0 merge updated/deleted - revive the file (updated content) - the other way | ||||
|\ | |\ | ||||
+---o mCGm-0 merge updated/deleted - revive the file (updated content) - one way | +---o mCGm-0 merge updated/deleted - revive the file (updated content) - one way | ||||
| |/ | | |/ | ||||
| o g-1: update d | | o g-1: update d | ||||
| | | | | | ||||
o | c-1 delete d | o | c-1 delete d | ||||
|/ | |/ | ||||
o i-2: c -move-> d | o i-2: c -move-> d, s -move-> t | ||||
| | | | ||||
o i-1: a -move-> c | o i-1: a -move-> c, p -move-> s | ||||
| | | | ||||
o i-0 initial commit: a b h | o i-0 initial commit: a b h | ||||
'a' is the copy source of 'd' | 'a' is the copy source of 'd' | ||||
$ hg status --copies --rev 'desc("i-0")' --rev 'desc("mCGm-0")' | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mCGm-0")' | ||||
A d | A d | ||||
a (no-compatibility no-changeset !) | a (no-compatibility no-changeset !) | ||||
A t | |||||
p | |||||
R a | R a | ||||
R p | |||||
$ hg status --copies --rev 'desc("i-0")' --rev 'desc("mGCm-0")' | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mGCm-0")' | ||||
A d | A d | ||||
a (no-compatibility no-changeset !) | a (no-compatibility no-changeset !) | ||||
A t | |||||
p | |||||
R a | R a | ||||
R p | |||||
$ hg status --copies --rev 'desc("c-1")' --rev 'desc("mCGm-0")' | $ hg status --copies --rev 'desc("c-1")' --rev 'desc("mCGm-0")' | ||||
A d | A d | ||||
$ hg status --copies --rev 'desc("c-1")' --rev 'desc("mGCm-0")' | $ hg status --copies --rev 'desc("c-1")' --rev 'desc("mGCm-0")' | ||||
A d | A d | ||||
$ hg status --copies --rev 'desc("g-1")' --rev 'desc("mCGm-0")' | $ hg status --copies --rev 'desc("g-1")' --rev 'desc("mCGm-0")' | ||||
$ hg status --copies --rev 'desc("g-1")' --rev 'desc("mGCm-0")' | $ hg status --copies --rev 'desc("g-1")' --rev 'desc("mGCm-0")' | ||||
o mBC-revert-m-0 merge explicitely revive deleted file - B side: unrelated change, C side: delete d (restored by merge) - the other way | o mBC-revert-m-0 merge explicitely revive deleted file - B side: unrelated change, C side: delete d (restored by merge) - the other way | ||||
|\ | |\ | ||||
+---o mCB-revert-m-0 merge explicitely revive deleted file - B side: unrelated change, C side: delete d (restored by merge) - one way | +---o mCB-revert-m-0 merge explicitely revive deleted file - B side: unrelated change, C side: delete d (restored by merge) - one way | ||||
| |/ | | |/ | ||||
| o c-1 delete d | | o c-1 delete d | ||||
| | | | | | ||||
o | b-1: b update | o | b-1: b update | ||||
|/ | |/ | ||||
o i-2: c -move-> d | o i-2: c -move-> d, s -move-> t | ||||
| | | | ||||
o i-1: a -move-> c | o i-1: a -move-> c, p -move-> s | ||||
| | | | ||||
o i-0 initial commit: a b h | o i-0 initial commit: a b h | ||||
'a' is the the copy source of 'd' | 'a' is the the copy source of 'd' | ||||
$ hg status --copies --rev 'desc("i-0")' --rev 'desc("mCB-revert-m-0")' | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mCB-revert-m-0")' | ||||
M b | M b | ||||
A d | A d | ||||
a (no-compatibility no-changeset !) | a (no-compatibility no-changeset !) | ||||
A t | |||||
p | |||||
R a | R a | ||||
R p | |||||
$ hg status --copies --rev 'desc("i-0")' --rev 'desc("mBC-revert-m-0")' | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mBC-revert-m-0")' | ||||
M b | M b | ||||
A d | A d | ||||
a (no-compatibility no-changeset !) | a (no-compatibility no-changeset !) | ||||
A t | |||||
p | |||||
R a | R a | ||||
R p | |||||
$ hg status --copies --rev 'desc("c-1")' --rev 'desc("mCB-revert-m-0")' | $ hg status --copies --rev 'desc("c-1")' --rev 'desc("mCB-revert-m-0")' | ||||
M b | M b | ||||
A d | A d | ||||
$ hg status --copies --rev 'desc("c-1")' --rev 'desc("mBC-revert-m-0")' | $ hg status --copies --rev 'desc("c-1")' --rev 'desc("mBC-revert-m-0")' | ||||
M b | M b | ||||
A d | A d | ||||
$ hg status --copies --rev 'desc("b-1")' --rev 'desc("mCB-revert-m-0")' | $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mCB-revert-m-0")' | ||||
$ hg status --copies --rev 'desc("b-1")' --rev 'desc("mBC-revert-m-0")' | $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mBC-revert-m-0")' | ||||
o mHC-delete-before-conflict-m-0 simple merge - C side: d is the results of renames then deleted, H side: d is result of another rename (same content as the other branch) - the other way | o mHC-delete-before-conflict-m-0 simple merge - C side: d is the results of renames then deleted, H side: d is result of another rename (same content as the other branch) - the other way | ||||
|\ | |\ | ||||
+---o mCH-delete-before-conflict-m-0 simple merge - C side: d is the results of renames then deleted, H side: d is result of another rename (same content as the other branch) - one way | +---o mCH-delete-before-conflict-m-0 simple merge - C side: d is the results of renames then deleted, H side: d is result of another rename (same content as the other branch) - one way | ||||
| |/ | | |/ | ||||
| o h-1: b -(move)-> d | | o h-1: b -(move)-> d | ||||
| | | | | | ||||
o | c-1 delete d | o | c-1 delete d | ||||
| | | | | | ||||
o | i-2: c -move-> d | o | i-2: c -move-> d, s -move-> t | ||||
| | | | | | ||||
o | i-1: a -move-> c | o | i-1: a -move-> c, p -move-> s | ||||
|/ | |/ | ||||
o i-0 initial commit: a b h | o i-0 initial commit: a b h | ||||
$ hg status --copies --rev 'desc("i-0")' --rev 'desc("mCH-delete-before-conflict-m")' | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mCH-delete-before-conflict-m")' | ||||
A d | A d | ||||
b (no-compatibility no-changeset !) | b (no-compatibility no-changeset !) | ||||
A t | |||||
p | |||||
R a | R a | ||||
R b | R b | ||||
R p | |||||
$ hg status --copies --rev 'desc("i-0")' --rev 'desc("mHC-delete-before-conflict-m")' | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mHC-delete-before-conflict-m")' | ||||
A d | A d | ||||
b | b | ||||
A t | |||||
p | |||||
R a | R a | ||||
R b | R b | ||||
R p | |||||
$ hg status --copies --rev 'desc("c-1")' --rev 'desc("mCH-delete-before-conflict-m")' | $ hg status --copies --rev 'desc("c-1")' --rev 'desc("mCH-delete-before-conflict-m")' | ||||
A d | A d | ||||
b | b | ||||
R b | R b | ||||
$ hg status --copies --rev 'desc("c-1")' --rev 'desc("mHC-delete-before-conflict-m")' | $ hg status --copies --rev 'desc("c-1")' --rev 'desc("mHC-delete-before-conflict-m")' | ||||
A d | A d | ||||
b | b | ||||
R b | R b | ||||
$ hg status --copies --rev 'desc("h-1")' --rev 'desc("mCH-delete-before-conflict-m")' | $ hg status --copies --rev 'desc("h-1")' --rev 'desc("mCH-delete-before-conflict-m")' | ||||
A t | |||||
p | |||||
R a | R a | ||||
R p | |||||
$ hg status --copies --rev 'desc("h-1")' --rev 'desc("mHC-delete-before-conflict-m")' | $ hg status --copies --rev 'desc("h-1")' --rev 'desc("mHC-delete-before-conflict-m")' | ||||
A t | |||||
p | |||||
R a | R a | ||||
R p | |||||
Variant of previous with extra changes introduced by the merge | Variant of previous with extra changes introduced by the merge | ||||
-------------------------------------------------------------- | -------------------------------------------------------------- | ||||
(see case declaration for details) | (see case declaration for details) | ||||
Subcase: merge has same initial content on both side, but merge introduced a change | Subcase: merge has same initial content on both side, but merge introduced a change | ||||
``````````````````````````````````````````````````````````````````````````````````` | ``````````````````````````````````````````````````````````````````````````````````` | ||||
| o e-2 g -move-> f | | o e-2 g -move-> f | ||||
| | | | | | ||||
| o e-1 b -move-> g | | o e-1 b -move-> g | ||||
| | | | | | ||||
o | a-2: e -move-> f | o | a-2: e -move-> f | ||||
| | | | | | ||||
o | a-1: d -move-> e | o | a-1: d -move-> e | ||||
|/ | |/ | ||||
o i-2: c -move-> d | o i-2: c -move-> d, s -move-> t | ||||
| | | | ||||
o i-1: a -move-> c | o i-1: a -move-> c, p -move-> s | ||||
| | | | ||||
o i-0 initial commit: a b h | o i-0 initial commit: a b h | ||||
#if no-changeset | #if no-changeset | ||||
$ hg manifest --debug --rev 'desc("mAE-change-m-0")' | grep '644 f' | $ hg manifest --debug --rev 'desc("mAE-change-m-0")' | grep '644 f' | ||||
1085a0ee2dac2f22801f91ee1a35b4fafd310f0c 644 f | 1085a0ee2dac2f22801f91ee1a35b4fafd310f0c 644 f | ||||
$ hg manifest --debug --rev 'desc("mEA-change-m-0")' | grep '644 f' | $ hg manifest --debug --rev 'desc("mEA-change-m-0")' | grep '644 f' | ||||
a6fe459f7ba96d94d8265cdf951fe0a42b7d4006 644 f | a6fe459f7ba96d94d8265cdf951fe0a42b7d4006 644 f | ||||
A f | A f | ||||
d (filelog !) | d (filelog !) | ||||
b (no-filelog !) | b (no-filelog !) | ||||
R b | R b | ||||
R d | R d | ||||
$ hg status --copies --rev 'desc("i-0")' --rev 'desc("mAE-change-m-0")' | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mAE-change-m-0")' | ||||
A f | A f | ||||
a | a | ||||
A t | |||||
p | |||||
R a | R a | ||||
R b | R b | ||||
R p | |||||
$ hg status --copies --rev 'desc("i-0")' --rev 'desc("mEA-change-m-0")' | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mEA-change-m-0")' | ||||
A f | A f | ||||
a (filelog !) | a (filelog !) | ||||
b (no-filelog !) | b (no-filelog !) | ||||
A t | |||||
p | |||||
R a | R a | ||||
R b | R b | ||||
R p | |||||
Decision from previous merge are properly chained with later merge | Decision from previous merge are properly chained with later merge | ||||
------------------------------------------------------------------ | ------------------------------------------------------------------ | ||||
Subcase: chaining conflicting rename resolution | Subcase: chaining conflicting rename resolution | ||||
``````````````````````````````````````````````` | ``````````````````````````````````````````````` | ||||
reference output: | reference output: | ||||
$ hg status --copies --rev 'desc("i-0")' --rev 'desc("mCB-revert-m-0")' | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mCB-revert-m-0")' | ||||
M b | M b | ||||
A d | A d | ||||
a (filelog !) | a (filelog !) | ||||
a (sidedata !) | a (sidedata !) | ||||
a (upgraded !) | a (upgraded !) | ||||
A t | |||||
p | |||||
R a | R a | ||||
R p | |||||
$ hg status --copies --rev 'desc("i-0")' --rev 'desc("mBC-revert-m-0")' | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mBC-revert-m-0")' | ||||
M b | M b | ||||
A d | A d | ||||
a (filelog !) | a (filelog !) | ||||
a (sidedata !) | a (sidedata !) | ||||
a (upgraded !) | a (upgraded !) | ||||
A t | |||||
p | |||||
R a | R a | ||||
R p | |||||
chained output | chained output | ||||
$ hg status --copies --rev 'desc("i-0")' --rev 'desc("mBC+revert,Lm")' | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mBC+revert,Lm")' | ||||
M b | M b | ||||
A d | A d | ||||
a (filelog !) | a (filelog !) | ||||
a (missing-correct-output sidedata !) | a (missing-correct-output sidedata !) | ||||
a (missing-correct-output upgraded !) | a (missing-correct-output upgraded !) | ||||
A t | |||||
p | |||||
A unrelated-l | A unrelated-l | ||||
R a | R a | ||||
R p | |||||
$ hg status --copies --rev 'desc("i-0")' --rev 'desc("mCB+revert,Lm")' | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mCB+revert,Lm")' | ||||
M b | M b | ||||
A d | A d | ||||
a (filelog !) | a (filelog !) | ||||
a (missing-correct-output sidedata !) | a (missing-correct-output sidedata !) | ||||
a (missing-correct-output upgraded !) | a (missing-correct-output upgraded !) | ||||
A t | |||||
p | |||||
A unrelated-l | A unrelated-l | ||||
R a | R a | ||||
R p | |||||
$ hg status --copies --rev 'desc("i-0")' --rev 'desc("mL,BC+revertm")' | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mL,BC+revertm")' | ||||
M b | M b | ||||
A d | A d | ||||
a (filelog !) | a (filelog !) | ||||
a (missing-correct-output sidedata !) | a (missing-correct-output sidedata !) | ||||
a (missing-correct-output upgraded !) | a (missing-correct-output upgraded !) | ||||
A t | |||||
p | |||||
A unrelated-l | A unrelated-l | ||||
R a | R a | ||||
R p | |||||
$ hg status --copies --rev 'desc("i-0")' --rev 'desc("mL,CB+revertm")' | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mL,CB+revertm")' | ||||
M b | M b | ||||
A d | A d | ||||
a (filelog !) | a (filelog !) | ||||
a (missing-correct-output sidedata !) | a (missing-correct-output sidedata !) | ||||
a (missing-correct-output upgraded !) | a (missing-correct-output upgraded !) | ||||
A t | |||||
p | |||||
A unrelated-l | A unrelated-l | ||||
R a | R a | ||||
R p | |||||
Subcase: chaining "merged" information during a merge | Subcase: chaining "merged" information during a merge | ||||
`````````````````````````````````````````````````````` | `````````````````````````````````````````````````````` | ||||
When a non-rename change are merged with a copy overwrite, the merge pick the copy source from (p1) as the reference. We should preserve this information in subsequent merges. | When a non-rename change are merged with a copy overwrite, the merge pick the copy source from (p1) as the reference. We should preserve this information in subsequent merges. | ||||
reference output: | reference output: |