Delete draft changes and patchsets
Adds ability to delete draft changes and patchsets that are not meant or fit for code review. Deleting a draft patchset also deletes the corresponding ref from the repository and decrements the next patch set number for the change if necessary. Deleting a draft change deletes all of its (draft) patchsets. Change-Id: I04abeb67b64dd2366514e74d23f83066d409904e
This commit is contained in:
@@ -30,6 +30,7 @@ public class ChangeDetail {
|
||||
protected boolean canAbandon;
|
||||
protected boolean canRestore;
|
||||
protected boolean canRevert;
|
||||
protected boolean canDeleteDraft;
|
||||
protected Change change;
|
||||
protected boolean starred;
|
||||
protected List<ChangeInfo> dependsOn;
|
||||
@@ -94,6 +95,14 @@ public class ChangeDetail {
|
||||
canSubmit = a;
|
||||
}
|
||||
|
||||
public boolean canDeleteDraft() {
|
||||
return canDeleteDraft;
|
||||
}
|
||||
|
||||
public void setCanDeleteDraft(boolean a) {
|
||||
canDeleteDraft = a;
|
||||
}
|
||||
|
||||
public Change getChange() {
|
||||
return change;
|
||||
}
|
||||
|
@@ -20,6 +20,7 @@ import com.google.gwt.user.client.rpc.AsyncCallback;
|
||||
import com.google.gwtjsonrpc.client.RemoteJsonService;
|
||||
import com.google.gwtjsonrpc.client.RpcImpl;
|
||||
import com.google.gwtjsonrpc.client.RpcImpl.Version;
|
||||
import com.google.gwtjsonrpc.client.VoidResult;
|
||||
|
||||
@RpcImpl(version = Version.V2_0)
|
||||
public interface ChangeManageService extends RemoteJsonService {
|
||||
@@ -40,4 +41,7 @@ public interface ChangeManageService extends RemoteJsonService {
|
||||
|
||||
@SignInRequired
|
||||
void publish(PatchSet.Id patchSetId, AsyncCallback<ChangeDetail> callback);
|
||||
|
||||
@SignInRequired
|
||||
void deleteDraftChange(PatchSet.Id patchSetId, AsyncCallback<VoidResult> callback);
|
||||
}
|
||||
|
@@ -44,6 +44,9 @@ public interface PatchDetailService extends RemoteJsonService {
|
||||
@SignInRequired
|
||||
void deleteDraft(PatchLineComment.Key key, AsyncCallback<VoidResult> callback);
|
||||
|
||||
@SignInRequired
|
||||
void deleteDraftPatchSet(PatchSet.Id psid, AsyncCallback<VoidResult> callback);
|
||||
|
||||
@SignInRequired
|
||||
void publishComments(PatchSet.Id psid, String message,
|
||||
Set<ApprovalCategoryValue.Id> approvals,
|
||||
|
Reference in New Issue
Block a user