childDirectories.put(path, childDir); childDir.dispose();
reportEntries(reporter, childDir, path, childEntry.isIncomplete(), recursive);
    private void reportEntries(ISVNReporter reporter, SVNDirectory directory, String dirPath, boolean reportAll, boolean recursive) throws SVNException {        SVNEntries entries = directory.getEntries();        long baseRevision = entries.getEntry("").getRevision();                Map childDirectories = new HashMap();                SVNExternalInfo[] externals = myWCAccess.addExternals(directory,                 directory.getProperties("", false).getPropertyValue(SVNProperty.EXTERNALS));        for(int i = 0; externals != null && i < externals.length; i++) {            externals[i].setOldExternal(externals[i].getNewURL(), externals[i].getNewRevision());        }                for (Iterator e = entries.entries(); e.hasNext();) {            SVNEntry entry = (SVNEntry) e.next();            if ("".equals(entry.getName())) {                continue;            }            String path = "".equals(dirPath) ? entry.getName() : PathUtil.append(dirPath, entry.getName());            if (entry.isDeleted() || entry.isAbsent()) {                if (!reportAll) {                    reporter.deletePath(path);                }                continue;            }            if (entry.isScheduledForAddition()) {                continue;            }                    File file = directory.getFile(entry.getName(), false);            boolean missing = !file.exists();             if (entry.isFile()) {                if (!reportAll) {                    // check svn:special files -> symlinks that could be directory.                    boolean special = SVNFileUtil.isWindows &&                         directory.getProperties(entry.getName(), false).getPropertyValue(SVNProperty.SPECIAL) != null;                                        if ((special && !file.exists()) || (!special && file.isDirectory())) {                        reporter.deletePath(path);                        continue;                    }                }                if (missing && !entry.isScheduledForDeletion() && !entry.isScheduledForReplacement()) {                    restoreFile(directory, entry.getName());                }                String url = entry.getURL();                String parentURL = entries.getPropertyValue("", SVNProperty.URL);                String expectedURL = PathUtil.append(parentURL, PathUtil.encode(entry.getName()));                if (reportAll) {                    if (!url.equals(expectedURL)) {                        reporter.linkPath(SVNRepositoryLocation.parseURL(url), path, entry.getLockToken(), entry.getRevision(), false);                    } else {                        reporter.setPath(path, entry.getLockToken(), entry.getRevision(), false);                    }                } else if (!entry.isScheduledForReplacement() && !url.equals(expectedURL)) {                    // link path                    reporter.linkPath(SVNRepositoryLocation.parseURL(url), path, entry.getLockToken(), entry.getRevision(), false);                } else if (entry.getRevision() != baseRevision || entry.getLockToken() != null) {                    reporter.setPath(path, entry.getLockToken(), entry.getRevision(), false);                }            } else if (entry.isDirectory() && recursive) {                if (missing) {                    if (!reportAll) {                        reporter.deletePath(path);                    }                }                if (file.isFile()) {                    SVNErrorManager.error(3, null);                }                                SVNDirectory childDir = directory.getChildDirectory(entry.getName());                SVNEntry childEntry = childDir.getEntries().getEntry("");                String url = childEntry.getURL();                if (reportAll) {                    if (!url.equals(entry.getURL())) {                        reporter.linkPath(SVNRepositoryLocation.parseURL(url), path, childEntry.getLockToken(), childEntry.getRevision(), childEntry.isIncomplete());                    } else {                        reporter.setPath(path, childEntry.getLockToken(), childEntry.getRevision(), childEntry.isIncomplete());                    }                } else if (!url.equals(entry.getURL())) {                    reporter.linkPath(SVNRepositoryLocation.parseURL(url), path, childEntry.getLockToken(), childEntry.getRevision(),                             childEntry.isIncomplete());                } else if (childEntry.getLockToken() != null || childEntry.getRevision() != baseRevision) {                    reporter.setPath(path, childEntry.getLockToken(), childEntry.getRevision(),                             childEntry.isIncomplete());                }                childDirectories.put(path, childDir);                childDir.dispose();            }        }        for (Iterator dirs = childDirectories.keySet().iterator(); dirs.hasNext();) {            String path = (String) dirs.next();            SVNDirectory dir = (SVNDirectory) childDirectories.get(path);            SVNEntry childEntry = dir.getEntries().getEntry("");                        boolean childReportAll = childEntry == null ? true : childEntry.isIncomplete();            reportEntries(reporter, dir, path, childReportAll, recursive);            dir.dispose();        }    }