Add API for fetching and setting diff file attachments.
Review Request #4647 — Created Sept. 25, 2013 and discarded — Latest diff uploaded
Add API for fetching and setting diff file attachments.
There's now a /api/repositories/<id>/diff-file-attachments/ resource
that contains the known, registered diff file attachments tied to a
repository. Nothing on this tree can be modified, only retrieved.In the future, some file attachments will be automatically associated.
Those that cannot can be modified by issuing a PUT on a draft filediff
resource and passing a file for the file attachment representing the
destination/modified file. Right now, this is allowed for all filediffs
for binary files, but later it will be restricted.
Unit tests pass.
Diff Revision 1 (Latest)
docs/manual/fixtures/initial_data.json |
---|
docs/manual/webapi/2.0/resources/diff-file-attachment.txt |
---|
docs/manual/webapi/2.0/resources/diff-file-attachment-list.txt |
---|
docs/manual/webapi/2.0/resources/index.txt |
---|
reviewboard/attachments/forms.py |
---|
reviewboard/attachments/managers.py |
---|
reviewboard/testing/testcase.py |
---|
reviewboard/webapi/resources/__init__.py |
---|
reviewboard/webapi/resources/diff_file_attachment.py |
---|
reviewboard/webapi/resources/draft_filediff.py |
---|
reviewboard/webapi/resources/filediff.py |
---|
reviewboard/webapi/resources/repository.py |
---|
reviewboard/webapi/tests/base.py |
---|
reviewboard/webapi/tests/mimetypes.py |
---|
reviewboard/webapi/tests/test_diff_file_attachment.py |
---|
reviewboard/webapi/tests/test_draft_filediff.py |
---|
reviewboard/webapi/tests/urls.py |
---|