comparison tests/test-copies-in-changeset.t @ 42861:57ea0a81a65c

copies: remove existing copy info from the changeset on amend (BC) When amending a changeset with copy information in the changeset and the new changeset doesn't have any copy information (or similar for "filesadded" and "filesremoved"), we shouldn't keep it. A drawback of this is that we now unconditionally remove these four entries from the extras, breaking any extensions that happened to write entries with the same names (which seems very unlikely). I think I'd heard that there was list of blacklisted keys that would be removed from the extras when a commit is rewritten, but I couldn't find that. It would make sense to add the keys mentioned above there instead of the custom filtering I've added in this patch. Differential Revision: https://phab.mercurial-scm.org/D6752
author Martin von Zweigbergk <martinvonz@google.com>
date Tue, 16 Jul 2019 21:15:39 -0700
parents 6f0273558c4b
children 52781d57313d
comparison
equal deleted inserted replaced
42860:6f0273558c4b 42861:57ea0a81a65c
138 $ hg ci --amend -m 'copy a to j, v2' \ 138 $ hg ci --amend -m 'copy a to j, v2' \
139 > --config experimental.copies.write-to=filelog-only 139 > --config experimental.copies.write-to=filelog-only
140 saved backup bundle to $TESTTMP/repo/.hg/strip-backup/dd7bb9581359-a6e6b6d2-amend.hg 140 saved backup bundle to $TESTTMP/repo/.hg/strip-backup/dd7bb9581359-a6e6b6d2-amend.hg
141 $ hg changesetcopies 141 $ hg changesetcopies
142 files: j 142 files: j
143 filesadded: 0 143
144 filesremoved:
145
146 p1copies: 0\x00a (esc)
147 p2copies:
148 $ hg showcopies --config experimental.copies.read-from=filelog-only 144 $ hg showcopies --config experimental.copies.read-from=filelog-only
149 a -> j 145 a -> j
150 The entries should be written to extras even if they're empty (so the client 146 The entries should be written to extras even if they're empty (so the client
151 won't have to fall back to reading from filelogs) 147 won't have to fall back to reading from filelogs)
152 $ echo x >> j 148 $ echo x >> j