LinkedList revisions = logHandler.getRevisions();
setLocation(reposURL, false);
File lastFile = null;
SVNProperties lastProps = null;
SVNDeltaGenerator deltaGenerator = new SVNDeltaGenerator();
int i = 0;
for (Iterator revsIter = revisions.iterator(); revsIter.hasNext();) {
Revision rev = (Revision) revsIter.next();
File tmpFile = SVNFileUtil.createTempFile("tmp", ".tmp");
SVNProperties props = new SVNProperties();
OutputStream os = null;
try {
os = SVNFileUtil.openFileForWriting(tmpFile);
getFile(rev.myPath, rev.myRevision, props, os);
} finally {
SVNFileUtil.closeFile(os);
}
SVNProperties propDiff = FSRepositoryUtil.getPropsDiffs(lastProps, props);
SVNFileRevision fileRevision = new SVNFileRevision(rev.myPath, rev.myRevision, rev.myProperties,
propDiff, false);
handler.openRevision(fileRevision);
InputStream srcStream = null;
InputStream tgtStream = null;
try {
srcStream = lastFile != null ? SVNFileUtil.openFileForReading(lastFile, SVNLogType.NETWORK) : SVNFileUtil.DUMMY_IN;
tgtStream = SVNFileUtil.openFileForReading(tmpFile, SVNLogType.NETWORK);
deltaGenerator.sendDelta(rev.myPath, srcStream, 0, tgtStream, handler, false);
} finally {
SVNFileUtil.closeFile(srcStream);
SVNFileUtil.closeFile(tgtStream);
}