Refactor ReplaceOp for updating change rest api
Similar to ChangeInserter which is used by both ReceiveCommits and CreateChange, make RequestScopePropagator optional and add update ref option. Change-Id: I436bc97a2da223cda79374a6815fa97c71753b51
This commit is contained in:
@@ -2400,10 +2400,12 @@ public class ReceiveCommits {
|
||||
rw.parseBody(newCommit);
|
||||
|
||||
RevCommit priorCommit = revisions.inverse().get(priorPatchSet);
|
||||
replaceOp = replaceOpFactory.create(requestScopePropagator,
|
||||
projectControl, notes.getChange().getDest(), checkMergedInto,
|
||||
priorPatchSet, priorCommit, psId, newCommit, info, groups,
|
||||
magicBranch, rp.getPushCertificate());
|
||||
replaceOp = replaceOpFactory
|
||||
.create(projectControl, notes.getChange().getDest(), checkMergedInto,
|
||||
priorPatchSet, priorCommit, psId, newCommit, info, groups,
|
||||
magicBranch, rp.getPushCertificate())
|
||||
.setRequestScopePropagator(requestScopePropagator)
|
||||
.setUpdateRef(false);
|
||||
bu.addOp(notes.getChangeId(), replaceOp);
|
||||
if (progress != null) {
|
||||
bu.addOp(notes.getChangeId(), new ChangeProgressOp(progress));
|
||||
|
||||
Reference in New Issue
Block a user