To allow users to browse through all contents of a file (as part of an
interactive blame), it's necessary to have an efficient API to retrieve
these file contents.
AFAIU, the low-level file_rev_handler already provides this information
via svn_txdelta_window_handler_t. Unfortunately, in RemoteSettion.cpp
this information is converted to just a boolean (delta_handler != NULL)
and passed to the JavaHL callback afterwards.
I don't think it's necessary (or even desirable) to provide the
patch/stream logic, like svn_stream_open_readonly, as Java API, just a
way to retrieve complete file contents for all revisions. Suggestion:
interface ISVNRemote {
/**
* @param RemoteFileContentsCallback may be null
*/
void getFileRevisions(String path,
long startRevision, long endRevision,
boolean includeMergedRevisions,
RemoteFileRevisionsCallback handler
RemoteFileContentsCallback contentsHandler)
throws ClientException;
}
interface RemoteFileContentsCallback {
void doFileContent(ISVNRemote.FileRevision fileRevision,
InputStream content);
}
-Marc