Fix fetching files that were introduced in a parent diff.
Review Request #11156 — Created Sept. 1, 2020 and submitted
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
get_original_file()was checking if the
new, which would have worked with the older logic because we'd transfer
over the parent revision to the
FileDiff. With the new logic, it
didn't know that the file was new, and tried fetching it, failing in the
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
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.