Add uploading of binary files for diffs.

Review Request #13571 — Created Feb. 23, 2024 and submitted — Latest diff uploaded

Information

RBTools
release-5.x

Reviewers

This change adds the rbt post logic for uploading binary files to
diffs. We start by assembling a list of the newly-created FileDiffs that
are marked as binary (using the new binary flag to the FileDiff API).
This is either done for the individual commits (when posting with commit
history) or for the full diff (when posting a squashed diff or on tools
that do not support history). We then go through and find what files we
should upload, filtering by whether it's a reviewable MIME type and the
configured file limit. We then create new file attachments for each
matching binary file.

This includes the base SCMClient flag and method definitions, but does
not implement upload for any SCMs. We have to do it per client because
we need to add new APIs to the clients to get file content (and
optionally file size) at specific revisions. Individual per-SCM
implementations will come in future changes.

  • Ran unit tests.
  • Posted a whole bunch of changes with Git and SVN repositories that
    included image files. Tested with both commit history and squashed
    diffs.

Commits

Files