throws IOException, UnsupportedOperationException, ServletException, GitAPIException,
SVNException, NoSuchMethodException {
Project project = Project.findByOwnerAndProjectName(ownerName, projectName);
PlayRepository repository = RepositoryService.getRepository(project);
Commit commit = null;
try {
commit = repository.getCommit(commitId);
} catch (org.eclipse.jgit.errors.MissingObjectException e) {
return notFound(ErrorViews.NotFound.render("error.notfound.commit", project));
}
if(commit == null) {
return notFound(ErrorViews.NotFound.render("error.notfound.commit", project));
}
Commit parentCommit = repository.getParentCommitOf(commitId);
List<CommentThread> threads
= CommentThread.findByCommitId(CommentThread.find, project, commitId);
String selectedBranch = StringUtils.defaultIfBlank(request().getQueryString("branch"), "HEAD");
String path = StringUtils.defaultIfBlank(request().getQueryString("path"), "");