On the 'pristines-on-demand-on-mwf' branch: Rework the RA part of the
text-base fetching.
This changeset solves a performance issue where fetching a single text-base
over ra_serf required two requests (PROPFIND + GET) instead of one (GET).
It also lays the groundwork for reusing RA sessions. Such reuse was partly
blocked by having to open a session that is not associated with a specific
working copy, because otherwise a content fetch would first try the local
pristine cache — which is a waste of resources for the case when we are
fetching the pristines ourselves.
* subversion/include/svn_ra.h
(svn_ra_fetch_file_contents): New.
* subversion/libsvn_ra/ra_loader.h
(svn_ra__vtable_t.fetch_file_contents): New
* subversion/libsvn_ra/ra_loader.c
(svn_ra_fetch_file_contents): Call the new vtable member.
* subversion/libsvn_ra_local/ra_plugin.c
(get_file): Factor out this helper function. Always close the stream.
(svn_ra_local__get_file): Call the helper function, disowning the stream
to keep the current behavior.
(svn_ra_local__fetch_file_contents): New, implemented with a call to the
new helper function.
(ra_local_vtable): Add new function to vtable.
* subversion/libsvn_ra_svn/client.c
(get_file): Factor out this helper function. Always close the stream.
(ra_svn_get_file): Call the helper function, disowning the stream
to keep the current behavior.
(ra_svn_fetch_file_contents): New, implemented with a call to the
new helper function.
(ra_svn_vtable): Add new function to vtable.
* subversion/libsvn_ra_serf/ra_serf.h
(svn_ra_serf__fetch_file_contents): New.
* subversion/libsvn_ra_serf/get_file.c
(svn_ra_serf__fetch_file_contents): New.
* subversion/libsvn_ra_serf/serf.c
(serf_vtable): Add new function to vtable.
* subversion/libsvn_client/textbase.c
(textbase_hydrate_cb): Use the new RA function to fetch the contents.
git-svn-id: https://svn.apache.org/repos/asf/subversion/branches/pristines-on-demand-on-mwf@1905528 13f79535-47bb-0310-9956-ffa450edef68
9 files changed