Update PerforceClient to use new diff functionality.
Review Request #12620 — Created Sept. 22, 2022 and submitted — Latest diff uploaded
This reworks
PerforceClient
to make use of the new diff tools and
UnifiedDiffWriter
to generate diffs.Now, the entire diff operation uses a single
UnifiedDiffWriter
to
generate the result. This is more efficient than building and joining a
bunch of lists of byte strings. It also helps create more standardized
output, taking care of issues like\r\r\n
newlines in the process.Diffs of files are performed using the new diff tool support, which
simplifies logic and should provide wider compatibility as new diff tool
backends are implemented.A few fixes are also here for unsafe variable assumptions and dead code.
Unit tests pass.