/** * 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 IOException thrown if there is a problem getting the last modified time */ private DateTime getLastModificationForRevision(final SVNRevision revision) throws IOException { try { final SVNStatusHandler handler = new SVNStatusHandler(); clientManager.getStatusClient().doStatus(getFile(), revision, SVNDepth.INFINITY, true, true, false, false, handler, null); final SVNStatus status = handler.getStatus(); // We want the date when this was committed return new DateTime(status.getCommittedDate()); } catch (final SVNException e) { final String errMsg = "Unable to check status of resource " + resourceFileName + " within working directory " + workingCopyDirectory.getAbsolutePath(); log.error(errMsg, e); throw new IOException(errMsg, e); } }
/** * 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); } }
xmlBuffer = openXMLTag("commit", SVNXMLUtil.XML_STYLE_NORMAL, "revision", status.getCommittedRevision().toString(), xmlBuffer); xmlBuffer = openCDataTag("author", status.getAuthor(), xmlBuffer); if (status.getCommittedDate() != null) { xmlBuffer = openCDataTag("date", SVNDate.formatDate(status.getCommittedDate()), xmlBuffer);
xmlBuffer = openXMLTag("commit", SVNXMLUtil.XML_STYLE_NORMAL, "revision", status.getCommittedRevision().toString(), xmlBuffer); xmlBuffer = openCDataTag("author", status.getAuthor(), xmlBuffer); if (status.getCommittedDate() != null) { xmlBuffer = openCDataTag("date", SVNDate.formatDate(status.getCommittedDate()), xmlBuffer);
lastChangedRevision = status.getCommittedRevision().getNumber(); Date d = status.getCommittedDate(); long lastChangedDate = -1; if(d != null){
lastChangedRevision = status.getCommittedRevision().getNumber(); Date d = status.getCommittedDate(); long lastChangedDate = -1; if(d != null){
lastChangedRevision = status.getCommittedRevision().getNumber(); Date d = status.getCommittedDate(); long lastChangedDate = -1; if(d != null){
lastChangedRevision = status.getCommittedRevision().getNumber(); Date d = status.getCommittedDate(); long lastChangedDate = -1; if(d != null){
lastChangedRevision = status.getCommittedRevision().getNumber(); Date d = status.getCommittedDate(); long lastChangedDate = -1; if(d != null){
openTag(COMMIT_TAG); addTag(AUTHOR_TAG, status.getAuthor()); if (status.getCommittedDate() != null) { addTag(DATE_TAG, SVNTimeUtil.formatDate(status.getCommittedDate()));
openTag(COMMIT_TAG); addTag(AUTHOR_TAG, status.getAuthor()); if (status.getCommittedDate() != null) { addTag(DATE_TAG, SVNDate.formatDate(status.getCommittedDate()));
openTag(COMMIT_TAG); addTag(AUTHOR_TAG, status.getAuthor()); if (status.getCommittedDate() != null) { addTag(DATE_TAG, SVNDate.formatDate(status.getCommittedDate()));
openTag(COMMIT_TAG); addTag(AUTHOR_TAG, status.getAuthor()); if (status.getCommittedDate() != null) { addTag(DATE_TAG, SVNDate.formatDate(status.getCommittedDate()));
result.setChangedDate(SVNDate.fromDate(status.getCommittedDate())); result.setChangedRevision(revisionNumber(status.getCommittedRevision())); result.setChangelist(status.getChangelistName());