public void handleDirEntry(SVNDirEntry dirEntry) { if (listCallback != null) { listCallback.doEntry(JavaHLObjectFactory.createDirEntry(dirEntry), JavaHLObjectFactory.createLock(dirEntry.getLock())); } } });
private void info2(String pathOrUrl, Revision revision, Revision pegRevision, int depth, String[] changelists, ISVNInfoHandler handler) throws SVNException { SVNWCClient client = getSVNWCClient(); if (isURL(pathOrUrl)) { client.doInfo(SVNURL.parseURIEncoded(pathOrUrl), JavaHLObjectFactory.getSVNRevision(pegRevision), JavaHLObjectFactory.getSVNRevision(revision), JavaHLObjectFactory.getSVNDepth(depth), handler); } else { Collection changeListsCollection = null; if (changelists != null && changelists.length > 0) { changeListsCollection = Arrays.asList(changelists); } client.doInfo(new File(pathOrUrl).getAbsoluteFile(), JavaHLObjectFactory.getSVNRevision(pegRevision), JavaHLObjectFactory.getSVNRevision(revision), JavaHLObjectFactory.getSVNDepth(depth), changeListsCollection, handler); } }
protected void throwException(SVNException e) throws ClientException { JavaHLObjectFactory.throwException(e, this); }
public void merge(String path, Revision pegRevision, Revision revision1, Revision revision2, String localPath, boolean force, boolean recurse, boolean ignoreAncestry, boolean dryRun) throws ClientException { List rangesToMerge = new LinkedList(); rangesToMerge.add(new SVNRevisionRange(JavaHLObjectFactory.getSVNRevision(revision1), JavaHLObjectFactory.getSVNRevision(revision2))); merge(path, pegRevision, rangesToMerge, localPath, force, JavaHLObjectFactory.infinityOrFiles(recurse), ignoreAncestry, dryRun, false); }
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() ); }
if (conflictDescription.isTreeConflict()) { SVNTreeConflictDescription tc = (SVNTreeConflictDescription) conflictDescription; left = createConflictVersion(tc.getSourceLeftVersion()); right = createConflictVersion(tc.getSourceRightVersion()); op = getConflictOperation(tc.getOperation()); getConflictKind(conflictDescription.isPropertyConflict()), getNodeKind(conflictDescription.getNodeKind()), conflictDescription.getPropertyName(), mergeFiles.isBinary(), mergeFiles.getMimeType(), getConflictAction(conflictDescription.getConflictAction()), getConflictReason(conflictDescription.getConflictReason()), op, basePath,
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); } }
url = status.getRemoteURL().toString(); int nodeKind = getNodeKind(status.getKind()); if (status.getContentsStatus() == SVNStatusType.STATUS_IGNORED) { nodeKind = NodeKind.unknown; int textStatus = getStatusValue(status.getContentsStatus()); int propStatus = getStatusValue(status.getPropertiesStatus()); int repositoryTextStatus = getStatusValue(status.getRemoteContentsStatus()); int repositoryPropStatus = getStatusValue(status.getRemotePropertiesStatus()); boolean locked = status.isLocked(); boolean copied = status.isCopied(); lockCreationDate = status.getLocalLock().getCreationDate().getTime() * 1000; Lock reposLock = createLock(status.getRemoteLock()); if (path != null) { path = path.replace(File.separatorChar, '/'); long reposDate = status.getRemoteDate() != null ? status.getRemoteDate().getTime() * 1000 : -1; String reposAuthor = status.getRemoteAuthor(); int reposKind = getNodeKind(status.getRemoteKind()); if (status.getRemoteKind() == null) { reposKind = NodeKind.none; repositoryTextStatus, repositoryPropStatus, locked, copied, tc != null, createConflictDescription(tc), conflictOld, conflictNew, conflictWorking, urlCopiedFrom, revisionCopiedFrom, switched, false, lockToken, lockOwner, lockComment, lockCreationDate, reposLock,
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()); }
url = status.getRemoteURL().toString(); int nodeKind = getNodeKind(status.getKind()); if (status.getContentsStatus() == SVNStatusType.STATUS_IGNORED) { nodeKind = NodeKind.unknown; int textStatus = getStatusValue(status.getContentsStatus()); int propStatus = getStatusValue(status.getPropertiesStatus()); int repositoryTextStatus = getStatusValue(status.getRemoteContentsStatus()); int repositoryPropStatus = getStatusValue(status.getRemotePropertiesStatus()); boolean locked = status.isLocked(); boolean copied = status.isCopied(); lockCreationDate = status.getLocalLock().getCreationDate().getTime() * 1000; Lock reposLock = createLock(status.getRemoteLock()); if (path != null) { path = path.replace(File.separatorChar, '/'); long reposDate = status.getRemoteDate() != null ? status.getRemoteDate().getTime() * 1000 : -1; String reposAuthor = status.getRemoteAuthor(); int reposKind = getNodeKind(status.getRemoteKind());
info.getURL() != null ? info.getURL().toString() : null, info.getRevision() != null ? info.getRevision().getNumber() : -1, getNodeKind(info.getKind()), info.getRepositoryRootURL() != null ? info.getRepositoryRootURL().toString() : null, info.getRepositoryUUID(), info.getCommittedDate() != null ? info.getCommittedDate().getTime() * 1000 : 0, info.getAuthor(), createLock(info.getLock()), !info.isRemote(), schedule, copyUrl, copyRev, info.getChangelistName(), info.getWorkingSize(), info.getRepositorySize(), depth, createConflictDescription(info.getTreeConflict()) );
public static SVNRevisionRange getSVNRevisionRange(RevisionRange revisionRange) { return new SVNRevisionRange(getSVNRevision(revisionRange.getFromRevision()), getSVNRevision(revisionRange.getToRevision())); }
public SVNConflictResult handleConflict(SVNConflictDescription conflictDescription) throws SVNException { SVNConflictResult result = null; if (myConflictResolverCallback != null) { ConflictDescriptor descriptor = JavaHLObjectFactory.createConflictDescription(conflictDescription); try { result = JavaHLObjectFactory.getSVNConflictResult(myConflictResolverCallback.resolve(descriptor)); } catch (SubversionException e) { SVNErrorManager.error(SVNErrorMessage.create(SVNErrorCode.UNKNOWN, e), e, SVNLogType.DEFAULT); } } return result; } };
public void handleAdminEvent(SVNAdminEvent event, double progress) throws SVNException { if (event.getAction() == SVNAdminEventAction.LOCK_LISTED) { SVNLock svnLock = event.getLock(); Lock lock = JavaHLObjectFactory.createLock(svnLock); locks.add(lock); } } });
public void handleDirEntry(SVNDirEntry dirEntry) { allEntries.add(JavaHLObjectFactory.createDirEntry(dirEntry)); } };
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()), "" ); }
if (conflictDescription.isTreeConflict()) { SVNTreeConflictDescription tc = (SVNTreeConflictDescription) conflictDescription; left = createConflictVersion(tc.getSourceLeftVersion()); right = createConflictVersion(tc.getSourceRightVersion()); op = getConflictOperation(tc.getOperation()); getConflictKind(conflictDescription.isPropertyConflict()), getNodeKind(conflictDescription.getNodeKind()), conflictDescription.getPropertyName(), mergeFiles.isBinary(), mergeFiles.getMimeType(), getConflictAction(conflictDescription.getConflictAction()), getConflictReason(conflictDescription.getConflictReason()), op, basePath,
public void handleEvent(SVNEvent event, double progress) { if (event.getAction() == SVNEventAction.UPGRADE) { return; } String path = null; if (event.getFile() != null) { path = event.getFile().getAbsolutePath(); if (path != null) { path = path.replace(File.separatorChar, '/'); } } if (path == null) { path = ""; } 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); } }
url = status.getRemoteURL().toString(); int nodeKind = getNodeKind(status.getKind()); if (status.getContentsStatus() == SVNStatusType.STATUS_IGNORED) { nodeKind = NodeKind.unknown; int textStatus = getStatusValue(status.getContentsStatus()); int propStatus = getStatusValue(status.getPropertiesStatus()); int repositoryTextStatus = getStatusValue(status.getRemoteContentsStatus()); int repositoryPropStatus = getStatusValue(status.getRemotePropertiesStatus()); boolean locked = status.isLocked(); boolean copied = status.isCopied(); lockCreationDate = status.getLocalLock().getCreationDate().getTime() * 1000; Lock reposLock = createLock(status.getRemoteLock()); if (path != null) { path = path.replace(File.separatorChar, '/'); long reposDate = status.getRemoteDate() != null ? status.getRemoteDate().getTime() * 1000 : -1; String reposAuthor = status.getRemoteAuthor(); int reposKind = getNodeKind(status.getRemoteKind()); if (status.getRemoteKind() == null) { reposKind = NodeKind.none; repositoryTextStatus, repositoryPropStatus, locked, copied, tc != null, createConflictDescription(tc), conflictOld, conflictNew, conflictWorking, urlCopiedFrom, revisionCopiedFrom, switched, false, lockToken, lockOwner, lockComment, lockCreationDate, reposLock,
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()); }