Add API for working with drafts of diffs.
Review Request #4645 — Created Sept. 24, 2013 and submitted — Latest diff uploaded
Add API for working with drafts of diffs.
There was no way, through the API, to get an existing diff uploaded as a
draft. One could be created by issuing a POST, and the payload would be
returned, but the links to the resource in that payload would result in
a 404 due to the diffs resource not showing draft diffs.This fixes this by introducing a new
/api/review-requests/<id>/draft/diffs/... tree that mirrors the public
/api/review-requests/<id>/diffs/... tree. Diffs that are part of a draft
will link there. The client can inspect this to see everything that will
be published.
Unit tests pass.
Tested uploading a diff against the local server and saw that resulting
payload was correct and linked to the correct place.
Diff Revision 1
This is not the most recent revision of the diff. The latest diff is revision 2. See what's changed.
docs/manual/fixtures/initial_data.json |
---|
docs/manual/webapi/2.0/resources/draft-diff.txt |
---|
docs/manual/webapi/2.0/resources/draft-diff-list.txt |
---|
docs/manual/webapi/2.0/resources/draft-file-diff.txt |
---|
docs/manual/webapi/2.0/resources/draft-file-diff-list.txt |
---|
docs/manual/webapi/2.0/resources/index.txt |
---|
reviewboard/reviews/models.py |
---|
reviewboard/testing/testcase.py |
---|
reviewboard/webapi/resources/__init__.py |
---|
reviewboard/webapi/resources/diff.py |
---|
reviewboard/webapi/resources/draft_diff.py |
---|
reviewboard/webapi/resources/draft_filediff.py |
---|
reviewboard/webapi/resources/original_file.py |
---|
reviewboard/webapi/resources/patched_file.py |
---|
reviewboard/webapi/resources/review_request_draft.py |
---|
reviewboard/webapi/tests/base.py |
---|
reviewboard/webapi/tests/mimetypes.py |
---|
reviewboard/webapi/tests/test_draft_diff.py |
---|
reviewboard/webapi/tests/test_draft_filediff.py |
---|
reviewboard/webapi/tests/urls.py |
---|