Create a draft patch set when a draft patch set is rebased

Currently rebasing a draft patch set will create a non-draft patch set
which is published. It is unexpected that rebasing a draft patch set
publishes the modifications done in the draft patch set.

Bug: issue 1558
Change-Id: Iaf3b2d5b34076fbd85958fffd4bb1369bc8fd6db
Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
This commit is contained in:
Edwin Kempin
2012-09-14 08:57:21 +02:00
parent eaac316bf3
commit 286e0b6409

View File

@@ -353,6 +353,7 @@ public class ChangeUtil {
newPatchSet.setCreatedOn(new Timestamp(System.currentTimeMillis()));
newPatchSet.setUploader(user.getAccountId());
newPatchSet.setRevision(new RevId(rebasedCommit.name()));
newPatchSet.setDraft(originalPatchSet.isDraft());
final PatchSetInfo info =
patchSetInfoFactory.get(rebasedCommit, newPatchSet.getId());