Go to file
Colby Ranger efe7aca78d Add the revision diff REST API implementation.
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
2013-05-17 16:57:56 -07:00
2013-05-13 14:07:42 +05:30
2013-05-09 13:40:36 +00:00
2013-05-09 13:40:36 +00:00
2013-05-09 13:40:36 +00:00
2013-05-06 19:39:10 -07:00
2013-05-06 19:39:10 -07:00
2013-05-06 19:39:10 -07:00
2013-05-06 19:39:10 -07:00
2013-05-06 19:39:10 -07:00
2013-05-09 13:40:36 +00:00
2013-05-09 13:40:36 +00:00
2013-05-14 18:35:20 -07:00
2013-05-17 13:56:16 +09:00
2013-05-16 01:14:27 +00:00
2008-11-14 16:59:34 -08:00
2009-03-27 20:20:10 -07:00
2013-05-14 16:52:31 -07:00
Description
RETIRED, Gerrit as used by OpenStack
120 MiB