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:
Jason Tsay
2011-08-12 16:02:36 -07:00
committed by Mohan Zhang
parent 61cdb499e6
commit 5a59261dc3
19 changed files with 364 additions and 6 deletions

View File

@@ -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;
}