Merge "Fix: Make PatchSetInserter set patch set id"
This commit is contained in:
@@ -44,6 +44,7 @@ import com.google.gerrit.server.git.GroupCollector;
|
|||||||
import com.google.gerrit.server.git.validators.CommitValidationException;
|
import com.google.gerrit.server.git.validators.CommitValidationException;
|
||||||
import com.google.gerrit.server.git.validators.CommitValidators;
|
import com.google.gerrit.server.git.validators.CommitValidators;
|
||||||
import com.google.gerrit.server.mail.ReplacePatchSetSender;
|
import com.google.gerrit.server.mail.ReplacePatchSetSender;
|
||||||
|
import com.google.gerrit.server.notedb.ChangeUpdate;
|
||||||
import com.google.gerrit.server.notedb.ReviewerStateInternal;
|
import com.google.gerrit.server.notedb.ReviewerStateInternal;
|
||||||
import com.google.gerrit.server.patch.PatchSetInfoFactory;
|
import com.google.gerrit.server.patch.PatchSetInfoFactory;
|
||||||
import com.google.gerrit.server.project.ChangeControl;
|
import com.google.gerrit.server.project.ChangeControl;
|
||||||
@@ -210,6 +211,8 @@ public class PatchSetInserter extends BatchUpdate.Op {
|
|||||||
ChangeControl ctl = ctx.getChangeControl();
|
ChangeControl ctl = ctx.getChangeControl();
|
||||||
|
|
||||||
change = ctx.getChange();
|
change = ctx.getChange();
|
||||||
|
ChangeUpdate update = ctx.getChangeUpdate();
|
||||||
|
|
||||||
Change.Id id = change.getId();
|
Change.Id id = change.getId();
|
||||||
final PatchSet.Id currentPatchSetId = change.currentPatchSetId();
|
final PatchSet.Id currentPatchSetId = change.currentPatchSetId();
|
||||||
if (!change.getStatus().isOpen() && !allowClosed) {
|
if (!change.getStatus().isOpen() && !allowClosed) {
|
||||||
@@ -223,6 +226,8 @@ public class PatchSetInserter extends BatchUpdate.Op {
|
|||||||
patchSet.setRevision(new RevId(commit.name()));
|
patchSet.setRevision(new RevId(commit.name()));
|
||||||
patchSet.setDraft(draft);
|
patchSet.setDraft(draft);
|
||||||
|
|
||||||
|
update.setPatchSetId(patchSet.getId());
|
||||||
|
|
||||||
if (groups != null) {
|
if (groups != null) {
|
||||||
patchSet.setGroups(groups);
|
patchSet.setGroups(groups);
|
||||||
} else {
|
} else {
|
||||||
|
Reference in New Issue
Block a user