Add API for fetching and setting diff file attachments.
Review Request #4647 — Created Sept. 25, 2013 and discarded
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.
Description | From | Last Updated |
---|---|---|
testing |
VE venkuvenkius | |
'FileDiff' imported but unused |
reviewbot | |
Using .exists() will be faster and less code. |
david | |
local variable 'attachment' is assigned to but never used |
reviewbot | |
'INVALID_FORM_DATA' imported but unused |
reviewbot | |
'scmtools' imported but unused |
reviewbot | |
'FileAttachment' imported but unused |
reviewbot | |
'DiffSet' imported but unused |
reviewbot | |
'FileDiff' imported but unused |
reviewbot | |
'FileDiff' imported but unused |
reviewbot | |
undefined name 'filediff' |
reviewbot |
-
This is a review from Review Bot.
Tool: Pyflakes
Processed Files:
reviewboard/testing/testcase.py
reviewboard/webapi/tests/urls.py
reviewboard/webapi/resources/init.py
reviewboard/attachments/forms.py
reviewboard/attachments/managers.py
reviewboard/webapi/resources/filediff.py
reviewboard/webapi/tests/base.py
reviewboard/webapi/tests/test_diff_file_attachment.py
reviewboard/webapi/tests/test_draft_filediff.py
reviewboard/webapi/resources/diff_file_attachment.py
reviewboard/webapi/tests/mimetypes.py
reviewboard/webapi/resources/draft_filediff.py
reviewboard/webapi/resources/repository.py
Ignored Files:
docs/manual/webapi/2.0/resources/index.txt
docs/manual/webapi/2.0/resources/diff-file-attachment.txt
docs/manual/fixtures/initial_data.json
docs/manual/webapi/2.0/resources/diff-file-attachment-list.txt -
-
-
-
-
-
-
-
-