Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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. Reviewed at http://reviews.reviewboard.org/r/1642/
- Loading branch information
Showing
1 changed file
with
124 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters