Mercurial > hg
diff tests/test-url-download.t @ 48976:877d7e1a4223 stable
amend: fix amend with copies in extras
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.
Differential Revision: https://phab.mercurial-scm.org/D12387
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Fri, 18 Mar 2022 21:15:54 -0700 |
parents | 8214c71589f6 |
children | 2d0daf9c9d5d |