Files
gerrit/java/com
Edwin Kempin 1f834ad6f0 Do not fail with 500 ISE if base of merge change cannot be computed due to NoMergeBaseException
If the repository content doesn't allow us to compute an auto-merge
commit for the base of a merge change because JGit cannot find a merge
base (e.g. due to CONFLICTS_DURING_MERGE_BASE_CALCULATION), we now
return '409 Conflict' for the ListFiles and change-edit-related REST
endpoints. If the files were supposed to be included into a ChangeInfo /
RevisionInfo we ignore the failure and just do not populate the file
list (but we log a warning). Letting the request succeed in this case is
better, as the caller can at least get the rest of the change and
revision information.

Treating NoMergeBaseException as '409 Conflict' is consistent with how
we treat this exception in other places (e.g. in the CreateChange REST
endpoint).

Change-Id: I78b4636c23635048eedf2a1e4b1075eb87ecb262
2020-01-15 15:24:37 +01:00
..