Fix fetching files that were introduced in a parent diff.
Review Request #11156 — Created Sept. 1, 2020 and submitted — Latest diff uploaded
The new code for properly storing information on a parent file and
fetching it didn't work correctly when the file was created in the
parent diff.get_original_file()
was checking if theFileDiff
was
new, which would have worked with the older logic because we'd transfer
over the parent revision to theFileDiff
. With the new logic, it
didn't know that the file was new, and tried fetching it, failing in the
process.This change fixes this by checking the parent revision to see if the
file was newly-introduced. If it is, no file is fetched.There's also a small fix to patching to provide the correct filename.
This is only used for logging purposes and generating files in a patch
error bundle.
Unit tests passed (and verified it fixed some issues found when trying
to merge in to release-4.0.x with some newer tests there).Successfully posted a change with a file introduced in a parent diff.