DebugLog.log("entry: " + entry.getName()); DebugLog.log("processed: " + info.myComparedEntries);
    private void localDirectoryDiff(SVNDirectoryInfo info, boolean isAdded,            OutputStream result) throws SVNException {        if (myIsCompareToBase) {            return;        }        SVNDirectory dir = myWCAccess.getDirectory(info.myPath);        boolean anchor = !"".equals(myWCAccess.getTargetName())                && dir == myWCAccess.getAnchor();        if (!anchor) {            // generate prop diff for dir.            if (dir.hasPropModifications("")) {                SVNProperties baseProps = dir.getBaseProperties("", false);                Map propDiff = baseProps                        .compareTo(dir.getProperties("", false));                String displayPath = myDiffGenerator.getDisplayPath(dir                        .getRoot());                myDiffGenerator.displayPropDiff(displayPath, baseProps.asMap(),                        propDiff, result);            }        }        DebugLog.log("local diff: " + dir.getRoot());        SVNEntries svnEntries = dir.getEntries();        for (Iterator entries = svnEntries.entries(false); entries.hasNext();) {            SVNEntry entry = (SVNEntry) entries.next();            if (anchor && !myWCAccess.getTargetName().equals(entry.getName())) {                continue;            }            if ("".equals(entry.getName())) {                continue;            }            DebugLog.log("entry: " + entry.getName());            DebugLog.log("processed: " + info.myComparedEntries);            if (info.myComparedEntries.contains(entry.getName())) {                continue;            }            info.myComparedEntries.add(entry.getName());            if (entry.isDirectory()) {                // recurse here.                SVNDirectoryInfo childInfo = createDirInfo(info, PathUtil                        .append(info.myPath, entry.getName()), false);                SVNDirectory childDir = myWCAccess                        .getDirectory(childInfo.myPath);                if (childDir != null) {                    localDirectoryDiff(childInfo, isAdded, myResult);                }                continue;            }            String name = entry.getName();            boolean added = entry.isScheduledForAddition() || isAdded;            boolean replaced = entry.isScheduledForReplacement();            boolean deleted = entry.isScheduledForDeletion();            boolean copied = entry.isCopied();            if (copied) {                added = false;                deleted = false;                replaced = false;            }            if (replaced && !myUseAncestry) {                replaced = false;            }            SVNProperties props = dir.getProperties(name, false);            String fullPath = myDiffGenerator.getDisplayPath(dir.getFile(name));            DebugLog.log("entry: " + fullPath);            Map baseProps = dir.getBaseProperties(name, false).asMap();            Map propDiff = null;            if (!deleted && dir.hasPropModifications(name)) {                propDiff = dir.getBaseProperties(name, false).compareTo(                        dir.getProperties(name, false));            }            if (deleted || replaced) {                DebugLog.log("as deleted: " + entry.getName());                // display text diff for deleted file.                String mimeType1 = (String) baseProps                        .get(SVNProperty.MIME_TYPE);                String rev1 = "(revision " + Long.toString(entry.getRevision())                        + ")";                myDiffGenerator.displayFileDiff(fullPath, dir.getBaseFile(name,                        false), null, rev1, null, mimeType1, null, result);                if (deleted) {                    return;                }            }            File tmpFile = null;            try {                if (added || replaced) {                    DebugLog.log("as added: " + entry.getName());                    tmpFile = dir.getBaseFile(name, true);                    SVNTranslator.translate(dir, name, name, SVNFileUtil                            .getBasePath(tmpFile), false, false);                    // display text diff for added file.                    String mimeType1 = null;                    String mimeType2 = props                            .getPropertyValue(SVNProperty.MIME_TYPE);                    String rev2 = "(revision "                            + Long.toString(entry.getRevision()) + ")";                    String rev1 = "(revision 0)";                    myDiffGenerator.displayFileDiff(fullPath, null, tmpFile,                            rev1, rev2, mimeType1, mimeType2, result);                    if (propDiff != null && propDiff.size() > 0) {                        // display prop diff.                        myDiffGenerator.displayPropDiff(fullPath, baseProps,                                propDiff, result);                    }                    continue;                }                boolean isTextModified = dir.hasTextModifications(name, false);                DebugLog.log("modified: " + isTextModified);                if (isTextModified) {                    DebugLog.log("as modified: " + entry.getName());                    tmpFile = dir.getBaseFile(name, true);                    SVNTranslator.translate(dir, name, name, SVNFileUtil                            .getBasePath(tmpFile), false, false);                    String mimeType1 = (String) baseProps                            .get(SVNProperty.MIME_TYPE);                    String mimeType2 = props                            .getPropertyValue(SVNProperty.MIME_TYPE);                    String rev1 = "(revision "                            + Long.toString(entry.getRevision()) + ")";                    myDiffGenerator.displayFileDiff(fullPath, dir.getBaseFile(                            name, false), tmpFile, rev1, null, mimeType1,                            mimeType2, result);                    if (propDiff != null && propDiff.size() > 0) {                        myDiffGenerator.displayPropDiff(fullPath, baseProps,                                propDiff, result);                    }                }            } finally {                if (tmpFile != null) {                    tmpFile.delete();                }            }        }    }