This page is historical
Possible cases for copy/rename on single files A and B. Lines marked by + in 'works' column already work in the existing system.
case |
local |
remote |
merge result |
works |
1: |
change A |
copy A->B |
get local A change to B |
|
2: |
copy A->B |
change A |
get remote change to A and B |
|
3: |
change A |
move A->B |
get local A change to B, remove A |
|
4: |
move A->B |
change A |
get remote change to B |
|
5: |
-- |
copy A->B |
get B |
? |
6: |
copy A->B |
-- |
nothing |
? |
7: |
-- |
move A->B |
get B |
? |
8: |
move A->B |
-- |
nothing |
+ |
9: |
move A->B |
move A->B |
do merge with ancestor in A |
|
10: |
move B->A |
move C->A |
do merge with no ancestor |
+ |
11: |
move A->B |
move A->C |
get C, keep B |
+ |
12: |
copy A->B |
create B |
merge B with no ancestor |
+ |
13: |
create B |
copy A->B |
merge B with no ancestor |
+ |
14: |
move A->B |
create B |
merge B with no ancestor |
+ |
15: |
create B |
move A->B |
merge B no ancestor, remove A |
+ |
16: |
copy A->B |
ch A, cr B |
merge A, merge B no ancestor |
+ |
17: |
ch A, cr B |
copy A->B |
merge A, merge B no ancestor |
+ |
18: |
move A->B |
ch A, cr B |
merge B no ancestor |
+ |
19: |
ch A, cr B |
move A->B |
merge B no ancestor, remove A |
+ |
20: |
change A |
ch A, mv A->B |
B=merge(local A, remote B), remove A |
|
21: |
ch A, mv A->B |
change A |
B=merge(remote A, local B ) |
|
22: |
move A->B |
move B->A |
get A, keep B |
+ |
23: |
move A->B |
move A->C, change C |
get C, keep B |
+ |
- 1-4, 20, 21 need copy search for manifests
- 2 and 3 half-work
- 9 needs rename-aware filectx.ancestor()
- 16-19 could also be done with two merges