PatchSetInserter: Simplify message setup
The commitMessageNotForChange branch was patterned after ChangeInserter. However, the only caller that adds a message on a different change was CherryPickChange, which adds the message in a separate update in a different codepath. So, eliminate this ugly path. Since we no longer allow callers to specify messages for another change, the only field in the ChangeMessage that they need control over is the message text itself. Simplify the setup by eliminating the setMessage(ChangeMessage) method entirely and only storing the message string. Change-Id: Ifb4037bcb2962b4aba2b0d3fe5e660295aecf0a0
This commit is contained in:
@@ -473,7 +473,7 @@ public class ConsistencyChecker {
|
||||
p.status = Status.FIXED;
|
||||
p.outcome = "Inserted as patch set " + change.currentPatchSetId().get();
|
||||
return inserter.getPatchSet();
|
||||
} catch (InvalidChangeOperationException | OrmException | IOException
|
||||
} catch (InvalidChangeOperationException | IOException
|
||||
| NoSuchChangeException | UpdateException | RestApiException e) {
|
||||
warn(e);
|
||||
p.status = Status.FIX_FAILED;
|
||||
|
Reference in New Issue
Block a user