use of net.nemerosa.ontrack.extension.svn.model.LastRevisionInfo in project ontrack by nemerosa.
the class IndexationServiceImpl method getLastRevisionInfo.
@Override
public LastRevisionInfo getLastRevisionInfo(String name) {
try (Transaction ignored = transactionService.start()) {
SVNRepository repository = getRepositoryByName(name);
SVNURL url = SVNUtils.toURL(repository.getConfiguration().getUrl());
long repositoryRevision = svnClient.getRepositoryRevision(repository, url);
TRevision r = revisionDao.getLastRevision(repository.getId());
if (r != null) {
return new LastRevisionInfo(r.getRevision(), r.getMessage(), repositoryRevision);
} else {
return LastRevisionInfo.none(repositoryRevision);
}
}
}
Aggregations