Add support for downloading patches and parsed diff data in the API.
Review Request #1642 — Created June 7, 2010 and submitted — Latest diff uploaded
Add support for downloading patches and parsed diff data in the API. This adds support for new mimetypes to FileDiffResource and DiffSetResource. Both now support the text/x-patch mimetype, and will return the stored patch. In the case of FileDiffResource, it's the patch for that particular file, and for DiffSetResource, it's the patch for all files in the diff. FileDiffResource also supports new application/vnd.reviewboard.org.diff.data+json and application/vnd.reviewboard.org.diff.data+xml mimetypes, which return the parsed diff data in JSON or XML formats. This includes the insert/delete/replace lines, move information, and more. It also supports a ?syntax-highlighting=1 parameter for returning data in a form that can have CSS rules applied for syntax highlighting. This new diff data resource should make it possible for third party applications to render diffs without reimplementing Review Board's diff viewer logic.
Tested each resource using curl in order to see the various forms of output.