• 
      

    Add infrastructure for binary file patching in rbt patch.

    Review Request #14711 — Created Nov. 29, 2025 and submitted — Latest diff uploaded

    Information

    RBTools
    master

    Reviewers

    This adds the core infrastructure needed to support binary file patching
    when applying review request diffs using rbt patch.

    rbtools.diffs.patches.BinaryFilePatch represents binary files in the
    diff, and can lazily load their content as-needed.

    rbtools.diffs.patcher.Patcher now has several methods to apply binary
    files in various ways. They can be overridden by SCM-specific patchers
    to perform file operations as necessary.

    rbtools.diffs.patches.PatchResult will now track which binary files
    were applied (or failed).

    The rbt patch command has been updated to:

    • Fetch binary file metadata from diff and commit resources.
    • Pass binary files to Patch instances.
    • Report binary file application results
    • Add the new --no-binary option, which skips patching binary files.

    Subsequent changes will add support for individual SCM systems.

    • Ran unit tests.
    • Used this in conjunction with later changes to actually apply patches
      that include binary files.

    Commits

    Files