Add a function for getting the Repository for a FileDiff.

Review Request #10776 — Created Nov. 1, 2019 and submitted — Latest diff uploaded

Information

Review Board
release-4.0.x
67e8edf...

Reviewers

This adds FileDiff.get_repository(), which returns the Repository
associated with a FileDiff. At the moment, this returns
self.diffset.repository, preserving the existing behavior completely.

In a future change, it will be possible for a FileDiff to be mapped to
a separate repository, paving the way for multi-repository diffs.

Unit tests pass.

reviewboard/attachments/managers.py
reviewboard/attachments/tests.py
reviewboard/diffviewer/chunk_generator.py
reviewboard/diffviewer/diffutils.py
reviewboard/diffviewer/models/filediff.py
reviewboard/reviews/views.py
reviewboard/webapi/resources/diff_file_attachment.py
Loading...