Expose FileDiff.patched_sha256 and FileDiff.orig_sha256 to the API.

Review Request #14790 — Created Jan. 28, 2026 and submitted

Information

Review Board
release-7.1.x

Reviewers

We have these SHA hashes for file diffs that are useful to checksum the
file diffs. They exist in the file diff's extra data and as attributes
on the object, but aren't officially listed in our API. It'd be useful
to expose them in the API so that callers can make use of them without
having to reach into the extra data and know the internal key naming of
the SHAs.
  • Ran unit tests.
  • Used in an upcoming RBTools change where I access the patched_sha256
    attribute via the API.
Summary ID
Expose `FileDiff.patched_sha256` and `FileDiff.orig_sha256` to the API.
We have these SHA hashes for file diffs that are useful to checksum the file diffs. They exist in the file diff's extra data and as attributes on the object, but aren't officially listed in our API. It'd be useful to expose them in the API so that callers can make use of them without having to reach into the extra data and know the internal key naming of the SHAs.
ad6ef22351060b200b19cafacb7b1e6f46750f1c
Description From Last Updated

Parameter name should be filediff.

daviddavid

Because the underlying property can return None, this should probably be return filediff.orig_sha256 or ''

daviddavid

Parameter name should be filediff.

daviddavid

Same here about None.

daviddavid

Can you use :py:attr: to reference the attribute here? It'll need to be the full class+attribute path.

chipx86chipx86

Same here.

chipx86chipx86
david
  1. 
      
  2. Show all issues

    Parameter name should be filediff.

  3. Show all issues

    Because the underlying property can return None, this should probably be return filediff.orig_sha256 or ''

    1. I'll change the return type hint instead, since None is a valid value.

  4. Show all issues

    Parameter name should be filediff.

  5. Show all issues

    Same here about None.

  6. 
      
maubin
chipx86
  1. 
      
  2. Show all issues

    Can you use :py:attr: to reference the attribute here? It'll need to be the full class+attribute path.

  3. Show all issues

    Same here.

  4. 
      
maubin
david
  1. Ship It!
  2. 
      
maubin
Review request changed
Status:
Completed
Change Summary:
Pushed to release-7.1.x (b351d1c)