Mercurial > hg
changeset 48975:e3c75d65d589 stable
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
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Fri, 18 Mar 2022 21:37:22 -0700 |
parents | 2bb75c65fa6c |
children | 877d7e1a4223 |
files | tests/test-copies-in-changeset.t |
diffstat | 1 files changed, 9 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/tests/test-copies-in-changeset.t Fri Mar 18 18:09:46 2022 +0100 +++ b/tests/test-copies-in-changeset.t Fri Mar 18 21:37:22 2022 -0700 @@ -316,6 +316,15 @@ 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