use of com.google.gerrit.extensions.api.projects.HeadInput in project gerrit by GerritCodeReview.
the class SetHeadCommand method run.
@Override
protected void run() throws Exception {
enableGracefulStop();
HeadInput input = new HeadInput();
input.ref = newHead;
try {
setHead.apply(new ProjectResource(project, user), input);
} catch (UnprocessableEntityException e) {
throw die(e);
}
}
use of com.google.gerrit.extensions.api.projects.HeadInput in project gerrit by GerritCodeReview.
the class ProjectApiImpl method head.
@Override
public void head(String head) throws RestApiException {
HeadInput input = new HeadInput();
input.ref = head;
try {
setHead.apply(checkExists(), input);
} catch (Exception e) {
throw asRestApiException("Cannot set HEAD", e);
}
}
Aggregations