On the 'pristines-on-demand-on-mwf' branch: Reuse an RA session when fetching
the text-base contents.

More specifically, we teach svn_client__textbase_sync() to use the passed-in
RA session when available.  If there is no such session, this function will
open one internally, optionally returning it to the caller so that it could
be reused further on.

* subversion/libsvn_client/client.h
  (svn_client__textbase_sync): Add `ra_session_p`, `ra_session` and the
   `result_pool` parameters.

* subversion/libsvn_client/textbase.c
  (textbase_hydrate_baton_t): Rename `pool` to `result_pool`. Store the
   new `base_abspath` field.
  (textbase_hydrate_cb): Open the RA session with standard settings, so
   that it could be reused further on if necessary.  Starting from r1905528,
   there is no performance loss from using an RA session that corresponds to
   a working copy.  Remove the TODO comment.
  (svn_client__textbase_sync): Handle the new input and output RA session
   parameters.  If the session has been provided by the caller, reparent it
   back to the original URL after sync.

* subversion/libsvn_client/cat.c
  (svn_client_cat3): Adjust calls to svn_client__textbase_sync().

* subversion/libsvn_client/commit.c
  (svn_client_commit6): Adjust calls to svn_client__textbase_sync().

* subversion/libsvn_client/conflicts.c
  (begin_resolve, finish_resolve): Adjust calls to svn_client__textbase_sync().

* subversion/libsvn_client/diff.c
  (diff_wc_wc): Adjust calls to svn_client__textbase_sync().
  (diff_repos_wc): Reuse the available RA session.

* subversion/libsvn_client/resolved.c
  (resolve_locked): Adjust calls to svn_client__textbase_sync().
  (svn_client__resolve_conflicts): Reuse one RA session across multiple calls
   to svn_client__textbase_sync().

* subversion/libsvn_client/revert.c
  (revert_with_write_lock_baton): Add `ra_session_p` field.
  (revert, svn_client_revert4): Reuse one RA session across multiple calls
   to svn_client__textbase_sync().

* subversion/libsvn_client/switch.c
  (switch_internal): Reuse the available RA session.

* subversion/libsvn_client/update.c
  (update_internal): Reuse the available RA session.

* subversion/libsvn_client/upgrade.c
  (upgrade_internal): Adjust a call to svn_client__textbase_sync().


git-svn-id: https://svn.apache.org/repos/asf/subversion/branches/pristines-on-demand-on-mwf@1905567 13f79535-47bb-0310-9956-ffa450edef68
11 files changed