Fix mutual exclusivity of --delete and --submit review command options

As per documentation, --delete --submit were supposed to be mutually
exclusive but they were not. Add check to make sure those two options
are not used at the same time.

Change-Id: Ic63573b1e0a455fa879c88bddbdd4fcd05d7d595
This commit is contained in:
Hugo Arès 2014-08-22 09:27:10 -04:00
parent b0982edc9c
commit ac3d692e6e

View File

@ -162,6 +162,11 @@ public class ReviewCommand extends SshCommand {
throw error("publish and delete actions are mutually exclusive");
}
}
if (deleteDraftPatchSet) {
if (submitChange) {
throw error("delete and submit actions are mutually exclusive");
}
}
boolean ok = true;
for (final PatchSet patchSet : patchSets) {