[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

JavaHL RFE: ISVNRemote should provide API to retrieve a contents of a specific file

From: Marc Strapetz <marc.strapetz_at_syntevo.com>
Date: Fri, 24 Apr 2015 13:59:57 +0200

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
Received on 2015-04-24 14:00:34 CEST

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.