Add API for working with drafts of diffs.

Review Request #4645 — Created Sept. 24, 2013 and submitted — Latest diff uploaded

Information

Review Board
master

Reviewers

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.