Split filediff creation into preparation and finalization methods
Review Request #10232 — Created Oct. 15, 2018 and discarded
filediff_creator.create_filediffsis now split into:
filediff_creator.prepare_filediffs, which does the work that
create_filediffsused to do up to actual creation (with
filediff_creator.finalize_fildiffs, which takes the result of
prepare_filediffsand does the actual creation.
In the new DVCS web API workflow, we will need to validate that the
created FileDiffs from the cumulative diff match (a) the validation info
passed and (b) the set of terminal FileDiffs. If they do, we will
proceed with creation. This allows us to finalize in a single API call
instead of two (as before we would have to call
validate_only=True to validate and then again with
validate_only=False only when validation has succeeded. Since this
requires us to parse the entire diff file again, we would not
necessarily want to do it in the same API request.
Ran unit tests.
E128 continuation line under-indented for visual indent