( )⚙ D12387 amend: fix amend with copies in extras

This is an archive of the discontinued Mercurial Phabricator instance.

amend: fix amend with copies in extras
ClosedPublic

Authored by martinvonz on Sat, Mar 19, 1:05 AM.

Details

Summary

If copy information is stored only in the commit extras and not in
filelogs, then they get lost on amend if the file wasn't also modified
in the working copy. That's because we create filectx object from
the old commit in those cases, and the .copysource() of such objects
read only from the filelog. This patch fixes it by always creating a
new memfilectx in these cases, passing the calculated copy
information to it.

Diff Detail

Repository
rHG Mercurial
Branch
stable
Lint
No Linters Available
Unit
No Unit Test Coverage

Event Timeline

martinvonz created this revision.Sat, Mar 19, 1:05 AM
Alphare accepted this revision.Mon, Mar 21, 5:46 AM
This revision is now accepted and ready to land.Mon, Mar 21, 5:46 AM
This revision was automatically updated to reflect the committed changes.