/** * Gets the last modified time for the given revision. * * @param revision revision to get the last modified date for * * @return the last modified time * * @throws ResourceException thrown if there is a problem getting the last modified time */ private DateTime getLastModificationForRevision(SVNRevision revision) throws ResourceException { try { SVNStatusHandler handler = new SVNStatusHandler(); clientManager.getStatusClient().doStatus(getResourceFile(), revision, SVNDepth.INFINITY, true, true, false, false, handler, null); SVNStatus status = handler.getStatus(); // remote revision is null when using a pegged version or when using HEAD and the version has not changed if (status.getRemoteRevision() == null) { return new DateTime(status.getCommittedDate()); } else { return new DateTime(status.getRemoteDate()); } } catch (SVNException e) { String errMsg = "Unable to check status of resource " + resourceFileName + " within working directory " + workingCopyDirectory.getAbsolutePath(); log.error(errMsg, e); throw new ResourceException(errMsg, e); } }
long reposDate = status.getRemoteDate() != null ? status.getRemoteDate().getTime() * 1000 : -1; String reposAuthor = status.getRemoteAuthor(); int reposKind = getNodeKind(status.getRemoteKind());
long reposDate = status.getRemoteDate() != null ? status.getRemoteDate().getTime() * 1000 : -1; String reposAuthor = status.getRemoteAuthor(); int reposKind = getNodeKind(status.getRemoteKind());
long reposDate = status.getRemoteDate() != null ? status.getRemoteDate().getTime() * 1000 : -1; String reposAuthor = status.getRemoteAuthor(); int reposKind = getNodeKind(status.getRemoteKind());
long reposDate = status.getRemoteDate() != null ? status.getRemoteDate().getTime() * 1000 : -1; String reposAuthor = status.getRemoteAuthor(); int reposKind = getNodeKind(status.getRemoteKind());
long reposDate = status.getRemoteDate() != null ? status.getRemoteDate().getTime() * 1000 : -1; String reposAuthor = status.getRemoteAuthor(); int reposKind = getNodeKind(status.getRemoteKind());
result.setRepositoryChangedDate(SVNDate.fromDate(status.getRemoteDate())); result.setRepositoryChangedRevision(revisionNumber(status.getRemoteRevision())); result.setRepositoryKind(status.getRemoteKind());