myReporterContext.getEditor().addFile(editPath, null, -1);
myReporterContext.getEditor().addFile(editPath, null, FSConstants.SVN_INVALID_REVNUM);
    private void updateEntry(long sourceRevision, String sourcePath, FSEntry sourceEntry, String targetPath, FSEntry targetEntry, String editPath, PathInfo pathInfo, boolean recursive) throws SVNException {        /* For non-switch operations, follow link path in the target. */        if(pathInfo != null && pathInfo.getLinkPath() != null && !myReporterContext.isSwitch()){            targetPath = pathInfo.getLinkPath();            targetEntry = fakeDirEntry(targetPath, myReporterContext.getTargetRoot(), myReporterContext.getTargetRevision());        }        if(pathInfo != null && isInvalidRevision(pathInfo.getRevision())){            /* Delete this entry in the source. */            sourcePath = null;            sourceEntry = null;        }else if(pathInfo != null && sourcePath != null){            /* Follow the rev and possibly path in this entry. */            sourcePath = pathInfo.getLinkPath() != null ? pathInfo.getLinkPath() : sourcePath;            sourceRevision = pathInfo.getRevision();            sourceEntry = fakeDirEntry(sourcePath, null, sourceRevision);        }        /* Don't let the report carry us somewhere nonexistent. */        if(sourcePath != null && sourceEntry == null){            SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.FS_NOT_FOUND, "Working copy path ''{0}'' does not exist in repository", editPath);            SVNErrorManager.error(err);        }        if(!recursive && ((sourceEntry != null && sourceEntry.getType() == SVNNodeKind.DIR) || (targetEntry != null && targetEntry.getType() == SVNNodeKind.DIR))){            skipPathInfo(editPath);            return;        }        /* If the source and target both exist and are of the same kind,         * then find out whether they're related.  If they're exactly the         * same, then we don't have to do anything (unless the report has         * changes to the source).  If we're ignoring ancestry, then any two         * nodes of the same type are related enough for us.          */        boolean related = false;        if(sourceEntry != null && targetEntry != null && sourceEntry.getType() == targetEntry.getType()){            int distance = FSID.compareIds(sourceEntry.getId(), targetEntry.getId());            if(distance == 0 && !PathInfo.isRelevant(myReporterContext.getCurrentPathInfo(), editPath) && (pathInfo == null || (!pathInfo.isStartEmpty() && pathInfo.getLinkPath() == null))){                return;            }else if(distance != -1 || myReporterContext.isIgnoreAncestry()){                related = true;            }        }        /* If there's a source and it's not related to the target, nuke it. */        if(sourceEntry != null && !related){            myReporterContext.getEditor().deleteEntry(editPath, -1);            sourcePath = null;        }        /* If there's no target, we have nothing more to do. */        if(targetEntry == null){            skipPathInfo(editPath);            return;        }        if(targetEntry.getType() == SVNNodeKind.DIR){            if(related){                myReporterContext.getEditor().openDir(editPath, sourceRevision);            }else{                myReporterContext.getEditor().addDir(editPath, null, -1);            }            diffDirs(sourceRevision, sourcePath, targetPath, editPath, pathInfo != null ? pathInfo.isStartEmpty() : false);            myReporterContext.getEditor().closeDir();        }else{            if(related){                myReporterContext.getEditor().openFile(editPath, sourceRevision);            }else{                myReporterContext.getEditor().addFile(editPath, null, -1);            }            diffFiles(sourceRevision, sourcePath, targetPath, editPath, pathInfo != null ? pathInfo.getLockToken() : null);            FSRevisionNode targetNode = myRevNodesPool.getRevisionNode(myReporterContext.getTargetRoot(), targetPath, myReposRootDir);            String targetHexDigest = FSRepositoryUtil.getFileChecksum(targetNode);            myReporterContext.getEditor().closeFile(editPath, targetHexDigest);        }    }