diff --git a/mercurial/copies.py b/mercurial/copies.py --- a/mercurial/copies.py +++ b/mercurial/copies.py @@ -630,9 +630,6 @@ def _fullcopytracing(repo, c1, c2, base) if u2: repo.ui.debug(b"%s:\n %s\n" % (header % b'other', b"\n ".join(u2))) - fullcopy = copies1.copy() - fullcopy.update(copies2) - if repo.ui.debugflag: renamedeleteset = set() divergeset = set() @@ -647,17 +644,21 @@ def _fullcopytracing(repo, c1, c2, base) b" all copies found (* = to merge, ! = divergent, " b"% = renamed and deleted):\n" ) - for f in sorted(fullcopy): - note = b"" - if f in copy1 or f in copy2: - note += b"*" - if f in divergeset: - note += b"!" - if f in renamedeleteset: - note += b"%" - repo.ui.debug( - b" src: '%s' -> dst: '%s' %s\n" % (fullcopy[f], f, note) - ) + for side, copies in ((b"local", copies1), (b"remote", copies2)): + if not copies: + continue + repo.ui.debug(b" on %s side:\n" % side) + for f in sorted(copies): + note = b"" + if f in copy1 or f in copy2: + note += b"*" + if f in divergeset: + note += b"!" + if f in renamedeleteset: + note += b"%" + repo.ui.debug( + b" src: '%s' -> dst: '%s' %s\n" % (copies[f], f, note) + ) del renamedeleteset del divergeset diff --git a/tests/test-copy-move-merge.t b/tests/test-copy-move-merge.t --- a/tests/test-copy-move-merge.t +++ b/tests/test-copy-move-merge.t @@ -27,8 +27,9 @@ Test for the full copytracing algorithm b c all copies found (* = to merge, ! = divergent, % = renamed and deleted): - src: 'a' -> dst: 'b' * - src: 'a' -> dst: 'c' * + on remote side: + src: 'a' -> dst: 'b' * + src: 'a' -> dst: 'c' * checking for directory renames resolving manifests branchmerge: True, force: False, partial: False diff --git a/tests/test-double-merge.t b/tests/test-double-merge.t --- a/tests/test-double-merge.t +++ b/tests/test-double-merge.t @@ -29,7 +29,8 @@ we get conflicts that shouldn't be there unmatched files in other: bar all copies found (* = to merge, ! = divergent, % = renamed and deleted): - src: 'foo' -> dst: 'bar' * + on remote side: + src: 'foo' -> dst: 'bar' * checking for directory renames resolving manifests branchmerge: True, force: False, partial: False diff --git a/tests/test-graft.t b/tests/test-graft.t --- a/tests/test-graft.t +++ b/tests/test-graft.t @@ -204,7 +204,8 @@ Graft out of order, skipping a merge and unmatched files in local: b all copies found (* = to merge, ! = divergent, % = renamed and deleted): - src: 'a' -> dst: 'b' * + on local side: + src: 'a' -> dst: 'b' * checking for directory renames resolving manifests branchmerge: True, force: True, partial: False @@ -223,7 +224,8 @@ Graft out of order, skipping a merge and updating the branch cache grafting 5:97f8bfe72746 "5" all copies found (* = to merge, ! = divergent, % = renamed and deleted): - src: 'c' -> dst: 'b' + on local side: + src: 'c' -> dst: 'b' checking for directory renames resolving manifests branchmerge: True, force: True, partial: False @@ -239,7 +241,8 @@ Graft out of order, skipping a merge and scanning for duplicate grafts grafting 4:9c233e8e184d "4" all copies found (* = to merge, ! = divergent, % = renamed and deleted): - src: 'c' -> dst: 'b' + on local side: + src: 'c' -> dst: 'b' checking for directory renames resolving manifests branchmerge: True, force: True, partial: False @@ -746,7 +749,10 @@ Transplants of grafts can find a destina scanning for duplicate grafts grafting 13:7a4785234d87 "2" all copies found (* = to merge, ! = divergent, % = renamed and deleted): - src: 'a' -> dst: 'b' * + on local side: + src: 'a' -> dst: 'b' * + on remote side: + src: 'a' -> dst: 'b' * checking for directory renames resolving manifests branchmerge: True, force: True, partial: False diff --git a/tests/test-issue672.t b/tests/test-issue672.t --- a/tests/test-issue672.t +++ b/tests/test-issue672.t @@ -28,7 +28,8 @@ https://bz.mercurial-scm.org/672 unmatched files in other: 1a all copies found (* = to merge, ! = divergent, % = renamed and deleted): - src: '1' -> dst: '1a' + on remote side: + src: '1' -> dst: '1a' checking for directory renames resolving manifests branchmerge: True, force: False, partial: False @@ -56,7 +57,8 @@ https://bz.mercurial-scm.org/672 unmatched files in local: 1a all copies found (* = to merge, ! = divergent, % = renamed and deleted): - src: '1' -> dst: '1a' * + on local side: + src: '1' -> dst: '1a' * checking for directory renames resolving manifests branchmerge: True, force: False, partial: False @@ -78,7 +80,8 @@ https://bz.mercurial-scm.org/672 unmatched files in other: 1a all copies found (* = to merge, ! = divergent, % = renamed and deleted): - src: '1' -> dst: '1a' * + on remote side: + src: '1' -> dst: '1a' * checking for directory renames resolving manifests branchmerge: True, force: False, partial: False diff --git a/tests/test-merge-criss-cross.t b/tests/test-merge-criss-cross.t --- a/tests/test-merge-criss-cross.t +++ b/tests/test-merge-criss-cross.t @@ -419,7 +419,8 @@ Verify that the old context ancestor wor unmatched files in other: d2/b all copies found (* = to merge, ! = divergent, % = renamed and deleted): - src: 'd1/b' -> dst: 'd2/b' + on remote side: + src: 'd1/b' -> dst: 'd2/b' checking for directory renames discovered dir src: 'd1/' -> dst: 'd2/' resolving manifests diff --git a/tests/test-rename-dir-merge.t b/tests/test-rename-dir-merge.t --- a/tests/test-rename-dir-merge.t +++ b/tests/test-rename-dir-merge.t @@ -30,8 +30,9 @@ b/a b/b all copies found (* = to merge, ! = divergent, % = renamed and deleted): - src: 'a/a' -> dst: 'b/a' - src: 'a/b' -> dst: 'b/b' + on remote side: + src: 'a/a' -> dst: 'b/a' + src: 'a/b' -> dst: 'b/b' checking for directory renames discovered dir src: 'a/' -> dst: 'b/' pending file src: 'a/c' -> dst: 'b/c' @@ -75,8 +76,9 @@ unmatched files in other: a/c all copies found (* = to merge, ! = divergent, % = renamed and deleted): - src: 'a/a' -> dst: 'b/a' - src: 'a/b' -> dst: 'b/b' + on local side: + src: 'a/a' -> dst: 'b/a' + src: 'a/b' -> dst: 'b/b' checking for directory renames discovered dir src: 'a/' -> dst: 'b/' pending file src: 'a/c' -> dst: 'b/c' diff --git a/tests/test-rename-merge1.t b/tests/test-rename-merge1.t --- a/tests/test-rename-merge1.t +++ b/tests/test-rename-merge1.t @@ -28,9 +28,11 @@ b b2 all copies found (* = to merge, ! = divergent, % = renamed and deleted): - src: 'a' -> dst: 'b' * - src: 'a2' -> dst: 'b2' ! - src: 'a2' -> dst: 'c2' ! + on local side: + src: 'a2' -> dst: 'c2' ! + on remote side: + src: 'a' -> dst: 'b' * + src: 'a2' -> dst: 'b2' ! checking for directory renames resolving manifests branchmerge: True, force: False, partial: False @@ -170,7 +172,8 @@ Check for issue3074 unmatched files in other: newfile all copies found (* = to merge, ! = divergent, % = renamed and deleted): - src: 'file' -> dst: 'newfile' % + on remote side: + src: 'file' -> dst: 'newfile' % checking for directory renames resolving manifests branchmerge: True, force: False, partial: False @@ -206,7 +209,10 @@ modify x and rename y to z on the other # we should not get the prompts about modify/delete conflicts $ hg merge --debug 1 -t :merge3 all copies found (* = to merge, ! = divergent, % = renamed and deleted): - src: 'x' -> dst: 'z' + on local side: + src: 'y' -> dst: 'z' + on remote side: + src: 'x' -> dst: 'z' checking for directory renames resolving manifests branchmerge: True, force: False, partial: False 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 @@ -79,7 +79,8 @@ args: unmatched files in other: b all copies found (* = to merge, ! = divergent, % = renamed and deleted): - src: 'a' -> dst: 'b' * + on remote side: + src: 'a' -> dst: 'b' * checking for directory renames resolving manifests branchmerge: True, force: False, partial: False @@ -117,7 +118,8 @@ args: unmatched files in local: b all copies found (* = to merge, ! = divergent, % = renamed and deleted): - src: 'a' -> dst: 'b' * + on local side: + src: 'a' -> dst: 'b' * checking for directory renames resolving manifests branchmerge: True, force: False, partial: False @@ -156,7 +158,8 @@ args: unmatched files in other: b all copies found (* = to merge, ! = divergent, % = renamed and deleted): - src: 'a' -> dst: 'b' * + on remote side: + src: 'a' -> dst: 'b' * checking for directory renames resolving manifests branchmerge: True, force: False, partial: False @@ -194,7 +197,8 @@ args: unmatched files in local: b all copies found (* = to merge, ! = divergent, % = renamed and deleted): - src: 'a' -> dst: 'b' * + on local side: + src: 'a' -> dst: 'b' * checking for directory renames resolving manifests branchmerge: True, force: False, partial: False @@ -231,7 +235,8 @@ args: unmatched files in other: b all copies found (* = to merge, ! = divergent, % = renamed and deleted): - src: 'a' -> dst: 'b' + on remote side: + src: 'a' -> dst: 'b' checking for directory renames resolving manifests branchmerge: True, force: False, partial: False @@ -263,7 +268,8 @@ args: unmatched files in local: b all copies found (* = to merge, ! = divergent, % = renamed and deleted): - src: 'a' -> dst: 'b' + on local side: + src: 'a' -> dst: 'b' checking for directory renames resolving manifests branchmerge: True, force: False, partial: False @@ -294,7 +300,8 @@ args: unmatched files in other: b all copies found (* = to merge, ! = divergent, % = renamed and deleted): - src: 'a' -> dst: 'b' + on remote side: + src: 'a' -> dst: 'b' checking for directory renames resolving manifests branchmerge: True, force: False, partial: False @@ -327,7 +334,8 @@ args: unmatched files in local: b all copies found (* = to merge, ! = divergent, % = renamed and deleted): - src: 'a' -> dst: 'b' + on local side: + src: 'a' -> dst: 'b' checking for directory renames resolving manifests branchmerge: True, force: False, partial: False @@ -355,7 +363,10 @@ args: test L:um a b R:um a b W: - 9 do merge with ancestor in a -------------- all copies found (* = to merge, ! = divergent, % = renamed and deleted): - src: 'a' -> dst: 'b' * + on local side: + src: 'a' -> dst: 'b' * + on remote side: + src: 'a' -> dst: 'b' * checking for directory renames resolving manifests branchmerge: True, force: False, partial: False @@ -400,8 +411,10 @@ m "um a c" "um x c" " " "10 do merg unmatched files in other: c all copies found (* = to merge, ! = divergent, % = renamed and deleted): - src: 'a' -> dst: 'b' ! - src: 'a' -> dst: 'c' ! + on local side: + src: 'a' -> dst: 'b' ! + on remote side: + src: 'a' -> dst: 'c' ! checking for directory renames resolving manifests branchmerge: True, force: False, partial: False @@ -434,7 +447,8 @@ m "um a c" "um x c" " " "10 do merg test L:nc a b R:up b W: - 12 merge b no ancestor -------------- all copies found (* = to merge, ! = divergent, % = renamed and deleted): - src: 'a' -> dst: 'b' + on local side: + src: 'a' -> dst: 'b' checking for directory renames resolving manifests branchmerge: True, force: False, partial: False @@ -473,7 +487,8 @@ m "um a c" "um x c" " " "10 do merg test L:up b R:nm a b W: - 13 merge b no ancestor -------------- all copies found (* = to merge, ! = divergent, % = renamed and deleted): - src: 'a' -> dst: 'b' + on remote side: + src: 'a' -> dst: 'b' checking for directory renames resolving manifests branchmerge: True, force: False, partial: False @@ -513,7 +528,8 @@ m "um a c" "um x c" " " "10 do merg 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' + on local side: + src: 'a' -> dst: 'b' checking for directory renames resolving manifests branchmerge: True, force: False, partial: False @@ -553,7 +569,8 @@ m "um a c" "um x c" " " "10 do merg test L:up b R:nm a b W: - 15 merge b no ancestor, remove a -------------- all copies found (* = to merge, ! = divergent, % = renamed and deleted): - src: 'a' -> dst: 'b' + on remote side: + src: 'a' -> dst: 'b' checking for directory renames resolving manifests branchmerge: True, force: False, partial: False @@ -593,7 +610,8 @@ m "um a c" "um x c" " " "10 do merg 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' + on local side: + src: 'a' -> dst: 'b' checking for directory renames resolving manifests branchmerge: True, force: False, partial: False @@ -633,7 +651,8 @@ m "um a c" "um x c" " " "10 do merg 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' + on remote side: + src: 'a' -> dst: 'b' checking for directory renames resolving manifests branchmerge: True, force: False, partial: False @@ -672,7 +691,8 @@ m "um a c" "um x c" " " "10 do merg 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' + on local side: + src: 'a' -> dst: 'b' checking for directory renames resolving manifests branchmerge: True, force: False, partial: False @@ -717,7 +737,8 @@ m "um a c" "um x c" " " "10 do merg 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' + on remote side: + src: 'a' -> dst: 'b' checking for directory renames resolving manifests branchmerge: True, force: False, partial: False @@ -765,7 +786,8 @@ m "um a c" "um x c" " " "10 do merg unmatched files in other: b all copies found (* = to merge, ! = divergent, % = renamed and deleted): - src: 'a' -> dst: 'b' * + on remote side: + src: 'a' -> dst: 'b' * checking for directory renames resolving manifests branchmerge: True, force: False, partial: False @@ -807,7 +829,8 @@ m "um a c" "um x c" " " "10 do merg unmatched files in local: b all copies found (* = to merge, ! = divergent, % = renamed and deleted): - src: 'a' -> dst: 'b' * + on local side: + src: 'a' -> dst: 'b' * checking for directory renames resolving manifests branchmerge: True, force: False, partial: False @@ -853,7 +876,8 @@ m "nm a b" "um x a" " " "22 get a, unmatched files in other: c all copies found (* = to merge, ! = divergent, % = renamed and deleted): - src: 'a' -> dst: 'b' * + on local side: + src: 'a' -> dst: 'b' * checking for directory renames resolving manifests branchmerge: True, force: False, partial: False @@ -936,11 +960,14 @@ 8 f (f) f f "remote differs from 4/g 7/f all copies found (* = to merge, ! = divergent, % = renamed and deleted): - src: '1/f' -> dst: '1/g' * - src: '3/f' -> dst: '3/g' * - src: '4/f' -> dst: '4/g' * - src: '5/f' -> dst: '5/g' * - src: '6/f' -> dst: '6/g' * + on local side: + src: '1/f' -> dst: '1/g' * + src: '5/f' -> dst: '5/g' * + src: '6/f' -> dst: '6/g' * + on remote side: + src: '1/f' -> dst: '1/g' * + src: '3/f' -> dst: '3/g' * + src: '4/f' -> dst: '4/g' * checking for directory renames $ hg mani 0/f