EmailException, NoSuchEntityException, PatchSetInfoNotAvailableException,
MissingObjectException, IncorrectObjectTypeException, IOException {
final Change.Id changeId = patchSetId.getParentKey();
final ChangeControl control = changeControlFactory.validateFor(changeId);
if (!control.canAddPatchSet()) {
throw new NoSuchChangeException(changeId);
}
Change.Id revertedChangeId = ChangeUtil.revert(patchSetId, currentUser, message, db,
revertedSenderFactory, hooks, gitManager, patchSetInfoFactory,