# HG changeset patch # User Martin von Zweigbergk # Date 2022-03-19 04:37:22 # Node ID e3c75d65d58913926b4c67fa7dc96bcdcd501868 # Parent 2bb75c65fa6c8444f3802782833e834d0cec2360 tests: demonstrate that copy info in changeset gets lost on amend When copy information is stored in changesets, it gets lost on amend. We didn't notice that until now because our users at Google have the config set to `compatibility`, which means copy information is stored in both changeset and filelogs. Differential Revision: https://phab.mercurial-scm.org/D12386 diff --git a/tests/test-copies-in-changeset.t b/tests/test-copies-in-changeset.t --- a/tests/test-copies-in-changeset.t +++ b/tests/test-copies-in-changeset.t @@ -316,6 +316,15 @@ Test writing only to filelog a -> k #endif +Existing copy information is preserved by amend + $ hg cp a l + $ hg ci -m 'copy a to l' + $ hg showcopies + a -> l + $ hg ci --amend -m 'new description' + saved backup bundle to $TESTTMP/repo/.hg/strip-backup/*-*-amend.hg (glob) + $ hg showcopies + a -> l (no-extra !) $ cd .. Test rebasing a commit with copy information