MergeOp: Pre-open all OpenRepos

The openRepo method may throw NoSuchProjectException, which should
fail the merge process and abandon all open changes. Better to do this
in advance rather than lazily after some side effects may have already
happened.

Change-Id: Iba219f83de65f19a329088ff60366e34eebe569e
This commit is contained in:
Dave Borowitz
2016-01-12 15:28:50 -05:00
committed by David Pursehouse
parent 82253c6e51
commit c5b1712ae8
5 changed files with 49 additions and 43 deletions

View File

@@ -1830,8 +1830,6 @@ public class ReceiveCommits {
try (MergeOp op = mergeOpProvider.get()) {
op.merge(db, rsrc.getChange(),
changeCtl.getUser().asIdentifiedUser(), false);
} catch (NoSuchChangeException e) {
throw new OrmException(e);
}
addMessage("");
Change c = db.changes().get(rsrc.getChange().getId());