Fix storing of approvals in notedb on merge with CherryPick strategy
The approvals which are copied to the new patch set that is created by the CherryPick merge strategy were only stored in the database but not in notedb. This fixes several tests that were failing when notedb was enabled. Change-Id: I547cad7d79f891a7448a19fdc8613ce919835d5b Signed-off-by: Edwin Kempin <ekempin@google.com>
This commit is contained in:
@@ -176,6 +176,7 @@ public class CherryPick extends SubmitStrategy {
|
||||
// Merge conflict; don't update change.
|
||||
return;
|
||||
}
|
||||
ctx.getChangeUpdate().setPatchSetId(psId);
|
||||
PatchSet ps = new PatchSet(psId);
|
||||
ps.setCreatedOn(ctx.getWhen());
|
||||
ps.setUploader(args.caller.getAccountId());
|
||||
@@ -191,6 +192,7 @@ public class CherryPick extends SubmitStrategy {
|
||||
for (PatchSetApproval a : args.approvalsUtil.byPatchSet(
|
||||
args.db, toMerge.getControl(), toMerge.getPatchsetId())) {
|
||||
approvals.add(new PatchSetApproval(ps.getId(), a));
|
||||
ctx.getChangeUpdate().putApproval(a.getLabel(), a.getValue());
|
||||
}
|
||||
args.db.patchSetApprovals().insert(approvals);
|
||||
|
||||
|
Reference in New Issue
Block a user