# HG changeset patch # User Martin von Zweigbergk # Date 1556433019 25200 # Node ID 618b9ffefa87e80b8b06d282b3e40b1d4c8f8a19 # Parent 7bb2f358a13bbb8d71359e04b73ee78e5e78ffe1 tests: demonstrate that rename is followed to wrong parent from merge This test case shows another way that copies are handled differently between `hg st` (pathcopies()) and `hg co -m` (mergecopies). The reason is that pathcopies() calls _tracefiles(), which checks that the file nodeid of an ancestor matches the file nodeid in the base commit. mergecopies() should probably be doing the same. Differential Revision: https://phab.mercurial-scm.org/D6323 diff -r 7bb2f358a13b -r 618b9ffefa87 tests/test-commit-amend.t --- a/tests/test-commit-amend.t Sat Apr 27 23:14:49 2019 -0700 +++ b/tests/test-commit-amend.t Sat Apr 27 23:30:19 2019 -0700 @@ -783,6 +783,21 @@ $ hg debugrename aaa aaa renamed from aa:37d9b5d994eab34eda9c16b195ace52c7b129980 + +Update to p1 with 'aaa' modified. 'aaa' was renamed from 'aa' in p2. 'aa' exists +in p1 too, but it was recorded as copied from p2. + $ echo modified >> aaa +BROKEN: should not be follow the rename back to 'aa' here, since the rename +happened compared to p2 + $ hg co -m '.^' -t :merge3 + merging aaa and aa to aa + warning: conflicts while merging aa! (edit, then use 'hg resolve --mark') + 0 files updated, 0 files merged, 1 files removed, 1 files unresolved + use 'hg resolve' to retry unresolved file merges + [1] + $ hg co -C tip + 2 files updated, 0 files merged, 1 files removed, 0 files unresolved + $ hg mv aaa aa $ hg ci --amend -m 'merge bar again (undo rename)' $ hg log --config diff.git=1 -pr .