Handle parent diff binary file duplicates.

Review Request #14052 — Created July 23, 2024 and submitted

Information

RBTools
release-5.x

Reviewers

When iterating on a branch involving binary files, it was possible to
hit a case where we would try to upload the source file associated with
a parent diff and hit a conflict. The API returns a DUPLICATE_ITEM error
because we already have a file with that revision, and RBTools would
then crash.

Because of the way file attachment comments work on diffs, it's fine for
us to share the source file attachment for the parent diff across
multiple different diff revisions. We can therefore ignore the duplicate
error.

Followed the reproduction steps for the bug and saw that before this
change rbt post would crash, and after everything worked fine.
Verified that the posted diffs worked as expected.

Summary ID
Handle parent diff binary file duplicates.
When iterating on a branch involving binary files, it was possible to hit a case where we would try to upload the source file associated with a parent diff and hit a conflict. The API returns a DUPLICATE_ITEM error because we already have a file with that revision, and RBTools would then crash. Because of the way file attachment comments work on diffs, it's fine for us to share the source file attachment for the parent diff across multiple different diff revisions. We can therefore ignore the duplicate error. Testing Done: Followed the reproduction steps for the bug and saw that before this change `rbt post` would crash, and after everything worked fine. Verified that the posted diffs worked as expected.
cadb59f12d0a48f05ab98a54099762bcf9124db8
chipx86
  1. Ship It!
  2. 
      
david
Review request changed
Status:
Completed
Change Summary:
Pushed to release-5.x (ca1c8ee)