Update PerforceClient to use new diff functionality.
Review Request #12620 — Created Sept. 22, 2022 and submitted
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.
Summary | ID |
---|---|
512a536c0067bbf5052e528a8275d617d8d348d3 |
- Change Summary:
-
Updated to use
UnifiedDiffWriter.write_file_headers
, instead of calling both orig/modified header functions. - Commits:
-
Summary ID affd2c817bb3171a0ca5192283b203fc7e898104 512a536c0067bbf5052e528a8275d617d8d348d3 - Diff:
-
Revision 2 (+416 -296)