A revision diff shows the contents of a file diff'd against
a base revision. The "content" key in the root object contains
an array of objects where there is:
"ab" for common lines to both sides
only "a" when lines were deleted in "b"
only "b" when lines were inserted in "b"
"a" and "b" when the lines were replaced
skip line count when the file is too large to show all common lines
If the url parameter "intraline" is specified. Replaced regions may
also contain an "edit_a" and "edit_b" list of <offset, length> pairs,
from the begining of the region. edit_a represents deleted text sections
and edit_b represents insterted text sections. Note, the implied newline
character is included in the offset position.
Whitespace behavior can be controlled via the "ignore-whitespace" URL
parameter. Also, # of lines of surrounding context can be control
via the "context" URL parameter.
PatchScript was updated to include the calculated content type of the
file, which is exposed in the meta_[a|b] field of the root object.
PatchScriptFactory was refactored to take the ChangeControl, due to
scoping issues in the REST API. Furthermore, Patch.Key was replaced by
fileName. The Git patch diff header was updated to not include the
trailing newline.
TODO: improve the content-type detection, since it returns
"application/octet-stream" more often than it should.
Change-Id: I96a6e0d569f3ecf24c5529dc706ae85c61bfb699