deltaGenerator.sendDelta(path, sourceStream, targetStream, handler, false);
deltaGenerator.sendDelta(path, sourceStream, 0, targetStream, handler, false);
    public int getFileRevisions(String path, long startRevision, long endRevision, ISVNFileRevisionHandler handler) throws SVNException {		try{    		openRepository();    		path = getRepositoryPath(path);            startRevision = isInvalidRevision(startRevision) ? FSReader.getYoungestRevision(myReposRootDir) : startRevision;            endRevision = isInvalidRevision(endRevision) ? FSReader.getYoungestRevision(myReposRootDir) : endRevision;            /* Open revision root for endRevision. */            FSRoot root = FSRoot.createRevisionRoot(endRevision, myRevNodesPool.getRootRevisionNode(endRevision, myReposRootDir));            /* The path had better be a file in this revision. This avoids calling             * the callback before reporting an uglier error below.              */            if(checkNodeKind(path, root) != SVNNodeKind.FILE){                SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.FS_NOT_FILE, "''{0}'' is not a file", path);                SVNErrorManager.error(err);            }            LinkedList locationEntries = new LinkedList();            /* Open a history object. */            FSNodeHistory history = FSNodeHistory.getNodeHistory(myReposRootDir, root, path);            /* Get the revisions we are interested in. */            while(true){            	history = history.fsHistoryPrev(myReposRootDir, true, myRevNodesPool);            	            	if(history == null){            		break;            	}            	//SVNLocationEntry revEntry = history.getHistoryEntry();                long histRev = history.getHistoryEntry().getRevision();                String histPath = history.getHistoryEntry().getPath();                locationEntries.addFirst(new SVNLocationEntry(histRev, histPath));                if(histRev <= startRevision){            		break;            	}            }            /* We must have at least one revision to get. */            if(locationEntries.size() == 0){            	SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.UNKNOWN, "FATAL error: there're no file revisions to get");                SVNErrorManager.error(err);            }            /* We want the first txdelta to be against the empty file. */            FSRoot lastRoot = null;            String lastPath = null;            /* Create an empty hash table for the first property diff. */            Map lastProps = new HashMap();            /* Walk through the revisions in chronological order. */            for(ListIterator locations = locationEntries.listIterator(); locations.hasNext();){                                SVNLocationEntry location = (SVNLocationEntry)locations.next();                long rev = location.getRevision();                String revPath = location.getPath();                /* Get the revision properties. */                Map revProps = FSRepositoryUtil.getRevisionProperties(myReposRootDir, rev);                /* Open the revision root. */                root = FSRoot.createRevisionRoot(rev, myRevNodesPool.getRootRevisionNode(rev, myReposRootDir));                /* Get the file's properties for this revision and compute the diffs. */                FSRevisionNode fileNode = myRevNodesPool.getRevisionNode(root.getRootRevisionNode(), revPath, myReposRootDir);            	Map props = FSReader.getProperties(fileNode, myReposRootDir);            	Map propDiffs = FSRepositoryUtil.getPropsDiffs(props, lastProps);                /* Check if the contents changed. */                /* Special case: In the first revision, we always provide a delta. */            	boolean contentsChanged = false;                if(lastRoot != null){                    contentsChanged = areFileContentsChanged(lastRoot, lastPath, root, revPath);                }else{                    contentsChanged = true;                }                /* We have all we need, give to the handler. */                if(handler != null){                    handler.openRevision(new SVNFileRevision(revPath, rev, revProps, propDiffs));                    if(contentsChanged){                        handler.applyTextDelta(path, null);                        InputStream sourceStream = null;                        InputStream targetStream = null;                        try{                            if(lastRoot != null && lastPath != null){                                sourceStream = FSReader.getFileContentsInputStream(lastRoot, lastPath, myRevNodesPool, myReposRootDir);                            }else{                                sourceStream = FSInputStream.createDeltaStream((FSRevisionNode)null, myReposRootDir);                            }                            targetStream = FSReader.getFileContentsInputStream(root, revPath, myRevNodesPool, myReposRootDir);                            SVNDeltaGenerator deltaGenerator = new SVNDeltaGenerator();                            deltaGenerator.sendDelta(path, sourceStream, targetStream, handler, false);                        }finally{                            SVNFileUtil.closeFile(sourceStream);                            SVNFileUtil.closeFile(targetStream);                        }                        handler.closeRevision(path);                    }else{                        handler.closeRevision(path);                    }                }                /* Remember root, path and props for next iteration. */                lastRoot = root;                lastPath = revPath;                lastProps = props;            }            return locationEntries.size();    	}        finally{            closeRepository();        }            }