Fix preview diff on first change

To compute the diff against the base for a patch set
refs/changes/X/Y/Z the preview diff screens used refs/changes/X/Y/Z^1
as base revison. This failed for the first change in a project because
in this case refs/changes/X/Y/Z^1 does not exist.

Instead of using refs/changes/X/Y/Z^1 as base revision retrieve the
commit info for the patch set and lookup the parent commit in it. If
there is no parent commit then a diff for the first change should be
displayed and the diff is requested from the server without setting an
A revision.

Adapt the XDocServlet and the XDocLoader to handle diff requests where
no A revision is given.

Change-Id: I78cff82ff6daafbe8b9cb6781ae76f454ff3a280
Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
8 files changed
tree: b0fb5795effb90d9549a8c9517ddaaa320503244
  1. .settings/
  2. lib/
  3. src/
  4. .buckconfig
  5. .gitignore
  6. BUCK
  7. LICENSE
  8. pom.xml
  9. VERSION