public static void handleLogMessage(SVNLogEntry logEntry, LogMessageCallback handler) { if(logEntry == null || handler == null) { return; } Map cpaths = logEntry.getChangedPaths(); ChangePath[] cp = null; if (cpaths == null) { cp = new ChangePath[]{}; } else { Collection clientChangePaths = new ArrayList(); for (Iterator iter = cpaths.keySet().iterator(); iter.hasNext();) { String path = (String) iter.next(); SVNLogEntryPath entryPath = (SVNLogEntryPath)cpaths.get(path); if(entryPath != null){ clientChangePaths.add(new ChangePath(path, entryPath.getCopyRevision(), entryPath.getCopyPath(), entryPath.getType(), getNodeKind(entryPath.getKind()))); } } cp = (ChangePath[]) clientChangePaths.toArray(new ChangePath[clientChangePaths.size()]); } SVNProperties revisionProperties = logEntry.getRevisionProperties(); Map revisionPropertiesMap = new HashMap(); for(Iterator names = revisionProperties.nameSet().iterator(); names.hasNext();) { String name = (String) names.next(); revisionPropertiesMap.put(name, revisionProperties.getStringValue(name)); } handler.singleMessage(cp, logEntry.getRevision(), revisionPropertiesMap, logEntry.hasChildren()); }
public static void handleLogMessage(SVNLogEntry logEntry, LogMessageCallback handler) { if(logEntry == null || handler == null) { return; } Map cpaths = logEntry.getChangedPaths(); ChangePath[] cp = null; if (cpaths == null) { cp = new ChangePath[]{}; } else { Collection clientChangePaths = new ArrayList(); for (Iterator iter = cpaths.keySet().iterator(); iter.hasNext();) { String path = (String) iter.next(); SVNLogEntryPath entryPath = (SVNLogEntryPath)cpaths.get(path); if(entryPath != null){ clientChangePaths.add(new ChangePath(path, entryPath.getCopyRevision(), entryPath.getCopyPath(), entryPath.getType(), getNodeKind(entryPath.getKind()))); } } cp = (ChangePath[]) clientChangePaths.toArray(new ChangePath[clientChangePaths.size()]); } SVNProperties revisionProperties = logEntry.getRevisionProperties(); Map revisionPropertiesMap = new HashMap(); for(Iterator names = revisionProperties.nameSet().iterator(); names.hasNext();) { String name = (String) names.next(); revisionPropertiesMap.put(name, revisionProperties.getStringValue(name)); } handler.singleMessage(cp, logEntry.getRevision(), revisionPropertiesMap, logEntry.hasChildren()); }
public static DirEntry createDirEntry(SVNDirEntry dirEntry) { if(dirEntry == null){ return null; } return new DirEntry( dirEntry.getRelativePath(), getNodeKind(dirEntry.getKind()), dirEntry.getSize(), dirEntry.hasProperties(), dirEntry.getRevision(), dirEntry.getDate() != null ? dirEntry.getDate().getTime()*1000 : 0, dirEntry.getAuthor() ); }
public static DirEntry createDirEntry(SVNDirEntry dirEntry) { if(dirEntry == null){ return null; } SVNURL url = dirEntry.getURL(); SVNURL repositoryRoot = dirEntry.getRepositoryRoot(); String relativeToRepositoryRoot = SVNPathUtil.getRelativePath(repositoryRoot.getPath(), url.getPath()); String relativeToTargetPath = dirEntry.getRelativePath(); String targetToRootPath = relativeToRepositoryRoot.substring(0, relativeToRepositoryRoot.length() - relativeToTargetPath.length()); return new DirEntry( relativeToTargetPath, SVNPathUtil.getAbsolutePath(targetToRootPath), getNodeKind(dirEntry.getKind()), dirEntry.getSize(), dirEntry.hasProperties(), dirEntry.getRevision(), dirEntry.getDate() != null ? dirEntry.getDate().getTime()*1000 : 0, dirEntry.getAuthor() ); }
public static DirEntry createDirEntry(SVNDirEntry dirEntry) { if(dirEntry == null){ return null; } SVNURL url = dirEntry.getURL(); SVNURL repositoryRoot = dirEntry.getRepositoryRoot(); String relativeToRepositoryRoot = SVNPathUtil.getRelativePath(repositoryRoot.getPath(), url.getPath()); String relativeToTargetPath = dirEntry.getRelativePath(); String targetToRootPath = relativeToRepositoryRoot.substring(0, relativeToRepositoryRoot.length() - relativeToTargetPath.length()); return new DirEntry( relativeToTargetPath, SVNPathUtil.getAbsolutePath(targetToRootPath), getNodeKind(dirEntry.getKind()), dirEntry.getSize(), dirEntry.hasProperties(), dirEntry.getRevision(), dirEntry.getDate() != null ? dirEntry.getDate().getTime()*1000 : 0, dirEntry.getAuthor() ); }
private static ConflictVersion createConflictVersion(SVNConflictVersion version) { if (version == null) { return null; } String url = version.getRepositoryRoot() != null ? version.getRepositoryRoot().toString() : null; return new ConflictVersion(url, version.getPegRevision(), version.getPath(), getNodeKind(version.getKind())); }
private static ConflictVersion createConflictVersion(SVNConflictVersion version) { if (version == null) { return null; } String url = version.getRepositoryRoot() != null ? version.getRepositoryRoot().toString() : null; return new ConflictVersion(url, version.getPegRevision(), version.getPath(), getNodeKind(version.getKind())); }
private static ConflictVersion createConflictVersion(SVNConflictVersion version) { if (version == null) { return null; } String url = version.getRepositoryRoot() != null ? version.getRepositoryRoot().toString() : null; return new ConflictVersion(url, version.getPegRevision(), version.getPath(), getNodeKind(version.getKind())); }
private static ConflictVersion createConflictVersion(SVNConflictVersion version) { if (version == null) { return null; } String url = version.getRepositoryRoot() != null ? version.getRepositoryRoot().toString() : null; return new ConflictVersion(url, version.getPegRevision(), version.getPath(), getNodeKind(version.getKind())); }
public static DirEntry createDirEntry(SVNDirEntry dirEntry) { if(dirEntry == null){ return null; } SVNURL url = dirEntry.getURL(); SVNURL repositoryRoot = dirEntry.getRepositoryRoot(); String relativeToRepositoryRoot = SVNPathUtil.getRelativePath(repositoryRoot.getPath(), url.getPath()); String relativeToTargetPath = dirEntry.getRelativePath(); String targetToRootPath = relativeToRepositoryRoot.substring(0, relativeToRepositoryRoot.length() - relativeToTargetPath.length()); return new DirEntry( relativeToTargetPath, SVNPathUtil.getAbsolutePath(targetToRootPath), getNodeKind(dirEntry.getKind()), dirEntry.getSize(), dirEntry.hasProperties(), dirEntry.getRevision(), dirEntry.getDate() != null ? dirEntry.getDate().getTime()*1000 : 0, dirEntry.getAuthor() ); }
public static DirEntry createDirEntry(SVNDirEntry dirEntry) { if(dirEntry == null){ return null; } SVNURL url = dirEntry.getURL(); SVNURL repositoryRoot = dirEntry.getRepositoryRoot(); String relativeToRepositoryRoot = SVNPathUtil.getRelativePath(repositoryRoot.getPath(), url.getPath()); String relativeToTargetPath = dirEntry.getRelativePath(); String targetToRootPath = relativeToRepositoryRoot.substring(0, relativeToRepositoryRoot.length() - relativeToTargetPath.length()); return new DirEntry( relativeToTargetPath, SVNPathUtil.getAbsolutePath(targetToRootPath), getNodeKind(dirEntry.getKind()), dirEntry.getSize(), dirEntry.hasProperties(), dirEntry.getRevision(), dirEntry.getDate() != null ? dirEntry.getDate().getTime()*1000 : 0, dirEntry.getAuthor() ); }
public static DiffSummary createDiffSummary(SVNDiffStatus status) { int diffStatus = -1; if (status.getModificationType() == SVNStatusType.STATUS_NORMAL || status.getModificationType() == SVNStatusType.STATUS_NONE) { diffStatus = 0; } else if (status.getModificationType() == SVNStatusType.STATUS_ADDED) { diffStatus = 1; } else if (status.getModificationType() == SVNStatusType.STATUS_MODIFIED) { diffStatus = 2; } else if (status.getModificationType() == SVNStatusType.STATUS_DELETED) { diffStatus = 3; } return new DiffSummary(status.getPath(), diffStatus, status.isPropertiesModified(), getNodeKind(status.getKind())); }
public static DiffSummary createDiffSummary(SVNDiffStatus status) { int diffStatus = -1; if (status.getModificationType() == SVNStatusType.STATUS_NORMAL || status.getModificationType() == SVNStatusType.STATUS_NONE) { diffStatus = 0; } else if (status.getModificationType() == SVNStatusType.STATUS_ADDED) { diffStatus = 1; } else if (status.getModificationType() == SVNStatusType.STATUS_MODIFIED) { diffStatus = 2; } else if (status.getModificationType() == SVNStatusType.STATUS_DELETED) { diffStatus = 3; } return new DiffSummary(status.getPath(), diffStatus, status.isPropertiesModified(), getNodeKind(status.getKind())); }
public static DiffSummary createDiffSummary(SVNDiffStatus status) { int diffStatus = -1; if (status.getModificationType() == SVNStatusType.STATUS_NORMAL || status.getModificationType() == SVNStatusType.STATUS_NONE) { diffStatus = 0; } else if (status.getModificationType() == SVNStatusType.STATUS_ADDED) { diffStatus = 1; } else if (status.getModificationType() == SVNStatusType.STATUS_MODIFIED) { diffStatus = 2; } else if (status.getModificationType() == SVNStatusType.STATUS_DELETED) { diffStatus = 3; } return new DiffSummary(status.getPath(), diffStatus, status.isPropertiesModified(), getNodeKind(status.getKind())); }
public static DiffSummary createDiffSummary(SVNDiffStatus status) { int diffStatus = -1; if (status.getModificationType() == SVNStatusType.STATUS_NORMAL || status.getModificationType() == SVNStatusType.STATUS_NONE) { diffStatus = 0; } else if (status.getModificationType() == SVNStatusType.STATUS_ADDED) { diffStatus = 1; } else if (status.getModificationType() == SVNStatusType.STATUS_MODIFIED) { diffStatus = 2; } else if (status.getModificationType() == SVNStatusType.STATUS_DELETED) { diffStatus = 3; } return new DiffSummary(status.getPath(), diffStatus, status.isPropertiesModified(), getNodeKind(status.getKind())); }
public void handleEvent(SVNEvent event, double progress) { String path = event.getFile() == null ? event.getPath() : event.getFile().getAbsolutePath(); if (path != null) { path = path.replace(File.separatorChar, '/'); } if(myNotify != null && event.getErrorMessage() == null){ myNotify.onNotify( path, JavaHLObjectFactory.getNotifyActionValue(event.getAction()), JavaHLObjectFactory.getNodeKind(event.getNodeKind()), event.getMimeType(), JavaHLObjectFactory.getStatusValue(event.getContentsStatus()), JavaHLObjectFactory.getStatusValue(event.getPropertiesStatus()), event.getRevision() ); } if(myNotify2 != null){ NotifyInformation info = JavaHLObjectFactory.createNotifyInformation(event, path); myNotify2.onNotify(info); } }
public static NotifyInformation createNotifyInformation(SVNEvent event, String path) { // include full error message. String errMsg = null; if (event.getErrorMessage() != null) { errMsg = event.getErrorMessage().getFullMessage(); } return new NotifyInformation( path, JavaHLObjectFactory.getNotifyActionValue(event.getAction()), JavaHLObjectFactory.getNodeKind(event.getNodeKind()), event.getMimeType(), JavaHLObjectFactory.createLock(event.getLock()), errMsg, JavaHLObjectFactory.getStatusValue(event.getContentsStatus()), JavaHLObjectFactory.getStatusValue(event.getPropertiesStatus()), JavaHLObjectFactory.getLockStatusValue(event.getLockStatus()), event.getRevision() ); }
public static NotifyInformation createNotifyInformation(SVNEvent event, String path) { // include full error message. String errMsg = null; if (event.getErrorMessage() != null) { errMsg = event.getErrorMessage().getFullMessage(); } // TODO 16 return new NotifyInformation( path, getNotifyActionValue(event.getAction()), getNodeKind(event.getNodeKind()), event.getMimeType(), createLock(event.getLock()), errMsg, getStatusValue(event.getContentsStatus()), getStatusValue(event.getPropertiesStatus()), getLockStatusValue(event.getLockStatus()), event.getRevision(), event.getChangelistName(), createRevisionRange(event.getMergeRange()), "" ); }
public static NotifyInformation createNotifyInformation(SVNEvent event, String path) { // include full error message. String errMsg = null; if (event.getErrorMessage() != null) { errMsg = event.getErrorMessage().getFullMessage(); } // TODO 16 return new NotifyInformation( path, getNotifyActionValue(event.getAction()), getNodeKind(event.getNodeKind()), event.getMimeType(), createLock(event.getLock()), errMsg, getStatusValue(event.getContentsStatus()), getStatusValue(event.getPropertiesStatus()), getLockStatusValue(event.getLockStatus()), event.getRevision(), event.getChangelistName(), createRevisionRange(event.getMergeRange()), "" ); }
public static NotifyInformation createNotifyInformation(SVNEvent event, String path) { // include full error message. String errMsg = null; if (event.getErrorMessage() != null) { errMsg = event.getErrorMessage().getFullMessage(); } // TODO 16 return new NotifyInformation( path, getNotifyActionValue(event.getAction()), getNodeKind(event.getNodeKind()), event.getMimeType(), createLock(event.getLock()), errMsg, getStatusValue(event.getContentsStatus()), getStatusValue(event.getPropertiesStatus()), getLockStatusValue(event.getLockStatus()), event.getRevision(), event.getChangelistName(), createRevisionRange(event.getMergeRange()), "" ); }