Fix and enhance support for patching Subversion diffs.

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

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.

Summary ID
Fix and enhance support for patching Subversion diffs.
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.
64410e691bb05cc5ae771480055a31502f9f57d9
Description From Last Updated

Instead of "conflicting files", can we use the slightly more common lingo of "files with conflicts"?

daviddavid
david
  1. 
      
  2. rbtools/clients/svn.py (Diff revision 1)
     
     
    Show all issues

    Instead of "conflicting files", can we use the slightly more common lingo of "files with conflicts"?

  3. 
      
chipx86
Review request changed

Status: Closed (submitted)

Change Summary:

Pushed to release-4.x (c99a1d6)
Loading...