diff --git a/mercurial/copies.py b/mercurial/copies.py --- a/mercurial/copies.py +++ b/mercurial/copies.py @@ -542,10 +542,7 @@ return # modified on side 2 for dst in dsts1: - if dst not in m2: - # dst not added on side 2 (handle as regular - # "both created" case in manifestmerge otherwise) - copy[dst] = src + copy[dst] = src def _fullcopytracing(repo, c1, c2, base): diff --git a/tests/test-rename-merge2.t b/tests/test-rename-merge2.t --- a/tests/test-rename-merge2.t +++ b/tests/test-rename-merge2.t @@ -513,7 +513,7 @@ test L:nc a b R:up a b W: - 14 merge b no ancestor -------------- all copies found (* = to merge, ! = divergent, % = renamed and deleted): - src: 'a' -> dst: 'b' + src: 'a' -> dst: 'b' * checking for directory renames resolving manifests branchmerge: True, force: False, partial: False @@ -522,19 +522,15 @@ preserving rev for resolve of rev a: remote is newer -> g getting a - b: both created -> m (premerge) + b: both renamed from a -> m (premerge) picked tool '* ../merge' for b (binary False symlink False changedelete False) (glob) merging b - my b@86a2aa42fc76+ other b@8dbce441892a ancestor b@000000000000 + my b@86a2aa42fc76+ other b@8dbce441892a ancestor a@924404dff337 + premerge successful rev: versions differ -> m (premerge) picked tool '* ../merge' for rev (binary False symlink False changedelete False) (glob) merging rev my rev@86a2aa42fc76+ other rev@8dbce441892a ancestor rev@924404dff337 - b: both created -> m (merge) - picked tool '* ../merge' for b (binary False symlink False changedelete False) (glob) - my b@86a2aa42fc76+ other b@8dbce441892a ancestor b@000000000000 - launching merge tool: * ../merge *$TESTTMP/t/t/b* * * (glob) - merge tool returned: 0 rev: versions differ -> m (merge) picked tool '* ../merge' for rev (binary False symlink False changedelete False) (glob) my rev@86a2aa42fc76+ other rev@8dbce441892a ancestor rev@924404dff337 @@ -593,7 +589,7 @@ test L:nc a b R:up a b W: - 16 get a, merge b no ancestor -------------- all copies found (* = to merge, ! = divergent, % = renamed and deleted): - src: 'a' -> dst: 'b' + src: 'a' -> dst: 'b' * checking for directory renames resolving manifests branchmerge: True, force: False, partial: False @@ -602,19 +598,15 @@ preserving rev for resolve of rev a: remote is newer -> g getting a - b: both created -> m (premerge) + b: both renamed from a -> m (premerge) picked tool '* ../merge' for b (binary False symlink False changedelete False) (glob) merging b - my b@86a2aa42fc76+ other b@8dbce441892a ancestor b@000000000000 + my b@86a2aa42fc76+ other b@8dbce441892a ancestor a@924404dff337 + premerge successful rev: versions differ -> m (premerge) picked tool '* ../merge' for rev (binary False symlink False changedelete False) (glob) merging rev my rev@86a2aa42fc76+ other rev@8dbce441892a ancestor rev@924404dff337 - b: both created -> m (merge) - picked tool '* ../merge' for b (binary False symlink False changedelete False) (glob) - my b@86a2aa42fc76+ other b@8dbce441892a ancestor b@000000000000 - launching merge tool: * ../merge *$TESTTMP/t/t/b* * * (glob) - merge tool returned: 0 rev: versions differ -> m (merge) picked tool '* ../merge' for rev (binary False symlink False changedelete False) (glob) my rev@86a2aa42fc76+ other rev@8dbce441892a ancestor rev@924404dff337 @@ -633,7 +625,7 @@ test L:up a b R:nc a b W: - 17 keep a, merge b no ancestor -------------- all copies found (* = to merge, ! = divergent, % = renamed and deleted): - src: 'a' -> dst: 'b' + src: 'a' -> dst: 'b' * checking for directory renames resolving manifests branchmerge: True, force: False, partial: False @@ -641,19 +633,15 @@ preserving b for resolve of b preserving rev for resolve of rev starting 4 threads for background file closing (?) - b: both created -> m (premerge) + b: both renamed from a -> m (premerge) picked tool '* ../merge' for b (binary False symlink False changedelete False) (glob) merging b - my b@0b76e65c8289+ other b@4ce40f5aca24 ancestor b@000000000000 + my b@0b76e65c8289+ other b@4ce40f5aca24 ancestor a@924404dff337 + premerge successful rev: versions differ -> m (premerge) picked tool '* ../merge' for rev (binary False symlink False changedelete False) (glob) merging rev my rev@0b76e65c8289+ other rev@4ce40f5aca24 ancestor rev@924404dff337 - b: both created -> m (merge) - picked tool '* ../merge' for b (binary False symlink False changedelete False) (glob) - my b@0b76e65c8289+ other b@4ce40f5aca24 ancestor b@000000000000 - launching merge tool: * ../merge *$TESTTMP/t/t/b* * * (glob) - merge tool returned: 0 rev: versions differ -> m (merge) picked tool '* ../merge' for rev (binary False symlink False changedelete False) (glob) my rev@0b76e65c8289+ other rev@4ce40f5aca24 ancestor rev@924404dff337 @@ -672,7 +660,7 @@ test L:nm a b R:up a b W: - 18 merge b no ancestor -------------- all copies found (* = to merge, ! = divergent, % = renamed and deleted): - src: 'a' -> dst: 'b' + src: 'a' -> dst: 'b' * checking for directory renames resolving manifests branchmerge: True, force: False, partial: False @@ -680,35 +668,24 @@ preserving b for resolve of b preserving rev for resolve of rev starting 4 threads for background file closing (?) - a: prompt deleted/changed -> m (premerge) - picked tool ':prompt' for a (binary False symlink False changedelete True) - file 'a' was deleted in local [working copy] but was modified in other [merge rev]. - You can use (c)hanged version, leave (d)eleted, or leave (u)nresolved. - What do you want to do? u - b: both created -> m (premerge) + b: both renamed from a -> m (premerge) picked tool '* ../merge' for b (binary False symlink False changedelete False) (glob) merging b - my b@02963e448370+ other b@8dbce441892a ancestor b@000000000000 + my b@02963e448370+ other b@8dbce441892a ancestor a@924404dff337 + premerge successful rev: versions differ -> m (premerge) picked tool '* ../merge' for rev (binary False symlink False changedelete False) (glob) merging rev my rev@02963e448370+ other rev@8dbce441892a ancestor rev@924404dff337 - b: both created -> m (merge) - picked tool '* ../merge' for b (binary False symlink False changedelete False) (glob) - my b@02963e448370+ other b@8dbce441892a ancestor b@000000000000 - launching merge tool: * ../merge *$TESTTMP/t/t/b* * * (glob) - merge tool returned: 0 rev: versions differ -> m (merge) picked tool '* ../merge' for rev (binary False symlink False changedelete False) (glob) my rev@02963e448370+ other rev@8dbce441892a ancestor rev@924404dff337 launching merge tool: * ../merge *$TESTTMP/t/t/rev* * * (glob) merge tool returned: 0 - 0 files updated, 2 files merged, 0 files removed, 1 files unresolved - use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon + 0 files updated, 2 files merged, 0 files removed, 0 files unresolved + (branch merge, don't forget to commit) -------------- - M a M b - abort: unresolved merge conflicts (see 'hg help resolve') -------------- $ tm "up a b" "nm a b" " " "19 merge b no ancestor, prompt remove a" @@ -717,44 +694,33 @@ test L:up a b R:nm a b W: - 19 merge b no ancestor, prompt remove a -------------- all copies found (* = to merge, ! = divergent, % = renamed and deleted): - src: 'a' -> dst: 'b' + src: 'a' -> dst: 'b' * checking for directory renames resolving manifests branchmerge: True, force: False, partial: False ancestor: 924404dff337, local: 0b76e65c8289+, remote: bdb19105162a - preserving a for resolve of a preserving b for resolve of b preserving rev for resolve of rev + b: both renamed from a -> m (premerge) starting 4 threads for background file closing (?) - a: prompt changed/deleted -> m (premerge) - picked tool ':prompt' for a (binary False symlink False changedelete True) - file 'a' was deleted in other [merge rev] but was modified in local [working copy]. - You can use (c)hanged version, (d)elete, or leave (u)nresolved. - What do you want to do? u - b: both created -> m (premerge) picked tool '* ../merge' for b (binary False symlink False changedelete False) (glob) merging b - my b@0b76e65c8289+ other b@bdb19105162a ancestor b@000000000000 + my b@0b76e65c8289+ other b@bdb19105162a ancestor a@924404dff337 + premerge successful rev: versions differ -> m (premerge) picked tool '* ../merge' for rev (binary False symlink False changedelete False) (glob) merging rev my rev@0b76e65c8289+ other rev@bdb19105162a ancestor rev@924404dff337 - b: both created -> m (merge) - picked tool '* ../merge' for b (binary False symlink False changedelete False) (glob) - my b@0b76e65c8289+ other b@bdb19105162a ancestor b@000000000000 - launching merge tool: * ../merge *$TESTTMP/t/t/b* * * (glob) - merge tool returned: 0 rev: versions differ -> m (merge) picked tool '* ../merge' for rev (binary False symlink False changedelete False) (glob) my rev@0b76e65c8289+ other rev@bdb19105162a ancestor rev@924404dff337 launching merge tool: * ../merge *$TESTTMP/t/t/rev* * * (glob) merge tool returned: 0 - 0 files updated, 2 files merged, 0 files removed, 1 files unresolved - use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon + 0 files updated, 2 files merged, 0 files removed, 0 files unresolved + (branch merge, don't forget to commit) -------------- M b C a - abort: unresolved merge conflicts (see 'hg help resolve') -------------- $ tm "up a " "um a b" " " "20 merge a and b to b, remove a"