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.
Details
Details
- Reviewers
Alphare - Group Reviewers
hg-reviewers - Commits
- rHG877d7e1a4223: amend: fix amend with copies in extras
Diff Detail
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.