public void handleEvent( SVNEvent event, double progress ) { if ( event.getAction() == SVNEventAction.ADD ) { filesAdded.add( new ScmFile( event.getFile().getPath(), ScmFileStatus.ADDED ) ); } }
public void handleEvent(SVNEvent event, double progress) throws SVNException { if (event != null && event.getAction() == SVNEventAction.DELETE) { deletedPaths.add(event.getFile()); } if (eventHandler != null) { eventHandler.handleEvent(event, progress); } }
public void handleEvent(SVNEvent event, double progress) throws SVNException { File path = event.getFile(); if (path != null) { path = SVNWCUtils.skipAncestor(dstPath, path); if (path != null) { path = new File(pair.dst, path.getPath()); event.setFile(path); } else if (dstPath.equals(event.getFile())) { event.setFile(pair.dst); } } if (oldHandler != null) { oldHandler.handleEvent(event, progress); } } });
/** * Gets the item's path relative to the Working Copy root directory. * * @return a string representation of the item's path */ public String getPath() { if (myPath != null) { return myPath; } if (myAdminAreaInfo == null && myRootFile == null) { return myName; } File file = getFile(); File root = myAdminAreaInfo != null ? myAdminAreaInfo.getAnchor().getRoot() : myRootFile; String rootPath = root.getAbsolutePath().replace(File.separatorChar, '/'); String filePath = file.getAbsolutePath().replace(File.separatorChar, '/'); myPath = filePath.substring(rootPath.length()); if (myPath.startsWith("/")) { myPath = myPath.substring(1); } return myPath; }
public String toString() { StringBuffer sb = new StringBuffer(); if (getAction() != null) { sb.append(getAction().toString()); } if (getFile() != null) { if (sb.length() > 0) { sb.append(" "); } sb.append(getFile().toString()); } if (getURL() != null) { if (sb.length() > 0) { sb.append(" "); } sb.append(getURL().toString()); } return sb.toString(); }
public void handleEvent(SVNEvent event, double progress) throws SVNException { if (event.getFile().equals(mergedFile)) { return; } if (event.getAction() == SVNEventAction.DELETE) { event = SVNEventFactory.createMergeEvent(getAdminInfo(), event.getFile(), SVNEventAction.UPDATE_DELETE, SVNEventAction.UPDATE_DELETE, SVNStatusType.UNKNOWN, SVNStatusType.UNKNOWN, event.getNodeKind()); } oldEventHandler.handleEvent(event, progress); } };
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 (notifyCallback != null) { String pathPrefix = this.pathPrefix == null ? "" : this.pathPrefix; ClientNotifyInformation ni = SVNClientImpl.getClientNotifyInformation(pathPrefix, event, path); if (ni != null) { notifyCallback.onNotify(ni); } } }
public String toString() { StringBuffer sb = new StringBuffer(); if (getAction() != null) { sb.append(getAction().toString()); } if (getFile() != null) { if (sb.length() > 0) { sb.append(" "); } sb.append(getFile().toString()); } if (getURL() != null) { if (sb.length() > 0) { sb.append(" "); } sb.append(getURL().toString()); } return sb.toString(); }
public String toString() { StringBuffer sb = new StringBuffer(); if (getAction() != null) { sb.append(getAction().toString()); } if (getFile() != null) { if (sb.length() > 0) { sb.append(" "); } sb.append(getFile().toString()); } if (getURL() != null) { if (sb.length() > 0) { sb.append(" "); } sb.append(getURL().toString()); } return sb.toString(); }
if ( event.getFile() == null || event.getExpectedAction() == SVNEventAction.COMMIT_DELTA_SENT || event.getExpectedAction() == SVNEventAction.COMMIT_COMPLETED || event.getNodeKind() != SVNNodeKind.FILE ) + event.getFile().getAbsolutePath() ); + event.getFile().getAbsolutePath() ); String currentFile = event.getFile().getAbsolutePath(); if ( currentFile.startsWith( baseDirectory.getAbsolutePath() ) )
event.getAction() != SVNEventAction.UPDATE_DELETE, event.getFile()); if (newNearestAncestorIndex != myCurrentAncestorIndex) { MergePath child = (MergePath) childrenWithMergeInfoArray[newNearestAncestorIndex]; event.getPropertiesStatus() == SVNStatusType.CHANGED || event.getAction() == SVNEventAction.UPDATE_ADD) { File mergedPath = event.getFile(); if (myMergedPaths == null) { myMergedPaths = new LinkedList(); File skippedPath = event.getFile(); if (mySkippedPaths == null) { mySkippedPaths = new LinkedList(); } else if (event.getAction() == SVNEventAction.UPDATE_ADD) { boolean isRootOfAddedSubTree = false; File addedPath = event.getFile(); if (myAddedPaths == null) { isRootOfAddedSubTree = true;
event.getAction() != SVNEventAction.UPDATE_DELETE, event.getFile()); if (newNearestAncestorIndex != myCurrentAncestorIndex) { MergePath child = (MergePath) childrenWithMergeInfoArray[newNearestAncestorIndex]; event.getPropertiesStatus() == SVNStatusType.CHANGED || event.getAction() == SVNEventAction.UPDATE_ADD) { File mergedPath = event.getFile(); if (myMergedPaths == null) { myMergedPaths = new LinkedList(); File skippedPath = event.getFile(); if (mySkippedPaths == null) { mySkippedPaths = new LinkedList(); } else if (event.getAction() == SVNEventAction.UPDATE_ADD) { boolean isRootOfAddedSubTree = false; File addedPath = event.getFile(); if (myAddedPaths == null) { isRootOfAddedSubTree = true;
event.getAction() != SVNEventAction.UPDATE_DELETE, event.getFile()); if (newNearestAncestorIndex != myCurrentAncestorIndex) { MergePath child = (MergePath) childrenWithMergeInfoArray[newNearestAncestorIndex]; event.getPropertiesStatus() == SVNStatusType.CHANGED || event.getAction() == SVNEventAction.UPDATE_ADD) { File mergedPath = event.getFile(); if (myMergedPaths == null) { myMergedPaths = new LinkedList(); File skippedPath = event.getFile(); if (mySkippedPaths == null) { mySkippedPaths = new LinkedList(); } else if (event.getAction() == SVNEventAction.UPDATE_ADD) { boolean isRootOfAddedSubTree = false; File addedPath = event.getFile(); if (myAddedPaths == null) { isRootOfAddedSubTree = true;
@Override public void handleEvent(SVNEvent event, double progress) throws SVNException { SVNEventAction action = event.getAction(); if (action == SVNEventAction.UPDATE_EXTERNAL || action == SVNEventAction.UPDATE_COMPLETED) { File file = event.getFile(); SVNExternalDetails details = externalDetails.remove(file); if (details != null) { String path; try { path = getLocalPath(getRelativePath(file)); } catch (IOException e) { throw new SVNException(new RemotableSVNErrorMessage(SVNErrorCode.FS_GENERAL, e)); } out.println(Messages.SubversionUpdateEventHandler_FetchExternal(details.getUrl(), event.getRevision(), file)); externals.add(new External(modulePath + '/' + path, details.getUrl(), details.getRevision())); } } else if (action == SVNEventAction.FAILED_EXTERNAL) { File file = event.getFile(); SVNExternalDetails details = externalDetails.get(file); if (details != null) { out.println(Messages.SubversionUpdateEventHandler_FetchExternal(details.getUrl(), event.getRevision(), file) + " failed!"); } if (cancelProcessOnExternalsFailed) { throw new SVNException(new RemotableSVNErrorMessage(SVNErrorCode.CL_ERROR_PROCESSING_EXTERNALS, SVNErrorCode.CL_ERROR_PROCESSING_EXTERNALS.getDescription() + ": <" + file.getName() + ">")); } } super.handleEvent(event, progress); }
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 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); } }
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); } }