Fix: Gerrit cannot display Change with non-resolvable Merge Commit
The commit 6fd52badf2
introduces support for displaying the resolved merge
result in in uploaded merge commits.
However, if the merge commit introduces a merge that
is not resolvable but JGIT (I.e. CrissCross merges),
the automatic merge would fail, throw an unhandled
IOException, effectively not allowing Gerrit to
display the change page at all.
This fix allows gerrit to catch these exception,
allowing the Change to still be reachable through
the WebUI.
Change-Id: I26fbe60695be2c8ec232b50703c5395a0493d4de
This commit is contained in:

committed by
Martin Fick

parent
5878c9d14b
commit
500270b469
@@ -256,7 +256,14 @@ class PatchListLoader extends EntryCreator<PatchListKey, PatchList> {
|
||||
DirCache dc = DirCache.newInCore();
|
||||
m.setDirCache(dc);
|
||||
|
||||
if (m.merge(b.getParents())) {
|
||||
boolean couldMerge = false;
|
||||
try {
|
||||
couldMerge = m.merge(b.getParents());
|
||||
} catch (IOException e) {
|
||||
//
|
||||
}
|
||||
|
||||
if (couldMerge) {
|
||||
treeId = m.getResultTreeId();
|
||||
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user