Fix and enhance support for patching Subversion diffs.

Review Request #12635 — Created Sept. 24, 2022 and submitted — Latest diff uploaded

Information

RBTools
release-4.x

Reviewers

Subversion diff patching wasn't implemented very well. svn patch
almost always returns a 0 exit code, even if nothing is applied or
conflicts are found. Because of this, we'd claim a patch applied
successfully even if it didn't. We also didn't include information on
conflicts, and we had string type issues for empty files.

This fixes all of this, and adds unit tests (except for empty files,
which will be covered in an upcoming change).

We now parse the output of svn patch to determine whether anything was
applied and whether anything had conflicts, returning those details in
the PatchResult.

We also now patch empty files correctly, by fixing the string type
issues.

Unit tests have been fully fleshed out for most of this.

Unit tests pass.

Commits

Files

    Loading...