This is an archive of the discontinued Mercurial Phabricator instance.

copies: remove existing copy info from the changeset on amend (BC)
ClosedPublic

Authored by martinvonz on Aug 20 2019, 12:29 PM.

Details

Summary

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.

Diff Detail

Repository
rHG Mercurial
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

martinvonz created this revision.Aug 20 2019, 12:29 PM
This revision was not accepted when it landed; it landed in state Needs Review.
This revision was automatically updated to reflect the committed changes.