public void go(final FilePath rootPath, final SVNDepth depth) throws SVNException { final MyItem root = new MyItem(myProject, rootPath, depth, myPartner.createStatusClient(), false); myQueue.add(root); while (!myQueue.isEmpty()) { myPartner.checkCanceled(); final MyItem item = myQueue.removeFirst(); final FilePath path = item.getPath(); final File ioFile = path.getIOFile(); if (path.isDirectory()) { myHandler.setCurrentItem(item); try { item.getClient(ioFile) .doStatus( ioFile, SVNRevision.WORKING, item.getDepth(), false, false, true, false, myHandler, null); myHandler.checkIfCopyRootWasReported(); } catch (SVNException e) { if (e.getErrorMessage().getErrorCode() == SVNErrorCode.WC_NOT_DIRECTORY) { final VirtualFile virtualFile = path.getVirtualFile(); if (virtualFile != null) { if (myPartner.isExcluded(virtualFile)) return; // self is unversioned myReceiver.processUnversioned(virtualFile); processRecursively(virtualFile, item.getDepth()); } } else { throw e; } } } else { if (item.isIsInnerCopyRoot()) { // this means that the status of parent directory had already been checked and is // unversioned; // to avoid SVN exception on status query to unversioned directory; and since we already // know then that the file // status is "unversioned" -> just register the unversioned file if (path.getVirtualFile() != null) { myReceiver.processUnversioned(path.getVirtualFile()); } } else { // just file final SVNStatus status = item.getClient().doStatus(ioFile, false, false); myReceiver.process(path, status); } } } }
public void handleStatus(final SVNStatus status) throws SVNException { myPartner.checkCanceled(); final File ioFile = status.getFile(); checkIfCopyRootWasReported(); final LocalFileSystem lfs = LocalFileSystem.getInstance(); VirtualFile vFile = lfs.findFileByIoFile(ioFile); if (vFile == null) { vFile = lfs.refreshAndFindFileByIoFile(ioFile); } if ((vFile != null) && myPartner.isExcluded(vFile)) return; if ((vFile != null) && (SvnVcs.svnStatusIsUnversioned(status))) { myReceiver.processUnversioned(vFile); if (vFile.isDirectory()) { processRecursively(vFile, myCurrentItem.getDepth()); } } else { final FilePath path = VcsUtil.getFilePath(ioFile, status.getKind().equals(SVNNodeKind.DIR)); myReceiver.process(path, status); } }