Rev the standard libsvn_client api used for opening ra sessions, to allow
access to the libsvn_wc pristine store in many more cases. This allows serf
to obtain texts from the local working copy in many cases where it first
couldn't.

For just merge_tests.py this patch makes libsvn_ra_serf avoid more than 550
http requests.

* subversion/include/private/svn_client_private.h
  (svn_client__ra_session_from_path2): Update documentation.

* subversion/include/svn_client.h
  (svn_client_open_ra_session2): New function.
  (svn_client_open_ra_session): Deprecate function.

* subversion/libsvn_client/add.c
  (mkdir_urls): Update caller.

* subversion/libsvn_client/client.h
  (svn_client__open_ra_session_internal): Change some arguments. Update
    documentation. Add scratch_pool.

* subversion/libsvn_client/commit.c
  (check_url_kind): Update caller.

* subversion/libsvn_client/copy.c
  (repos_to_repos_copy): Update caller.

  (wc_to_repos_copy): Use session pool to avoid opening two sessions at the
    same time. Remove unneeded wait for timestamps, as we do a repository only
    commit here.
  (repos_to_wc_copy): Update caller.

* subversion/libsvn_client/delete.c
  (delete_urls_multi_repos): Update caller.

* subversion/libsvn_client/deprecated.c
  (svn_client_open_ra_session): New function.
  (svn_client_uuid_from_url): Wrap svn_client_get_repos_root, but with a
    subpool to avoid keeping ra sessions open in functions without dual pools.

  (svn_client_root_url_from_path): Use session pool, as there is no result_pool.

* subversion/libsvn_client/diff.c
  (diff_prepare_repos_repos,
   diff_repos_repos): Obtain wri_abspath and use it when opening ra
    session.
  (diff_repos_wc,
   diff_summarize_repos_repos): Update caller.

* subversion/libsvn_client/import.c
  (svn_client_import5): Update caller.

* subversion/libsvn_client/iprops.c
  (get_inheritable_props): Update caller.

* subversion/libsvn_client/list.c
  (svn_client__ra_stat_compatible): Update caller.

* subversion/libsvn_client/locking_commands.c
  (svn_client_lock,
   svn_client_unlock): Update caller.

* subversion/libsvn_client/merge.c
  (ensure_ra_session_url): Pass wri_abspath to speed up merging.
  (open_reintegrate_source_and_target,
   svn_client_find_automatic_merge,
   do_automatic_merge_locked): Update caller.

* subversion/libsvn_client/mergeinfo.c
  (svn_client__get_wc_or_repos_mergeinfo_catalog): Update caller.

* subversion/libsvn_client/prop_commands.c
  (propset_on_url,
   svn_client_revprop_set2): Update caller.

  (svn_client_revprop_get,
   svn_client_revprop_list): Update caller. Introduce subpool for function
     without result_pool argument.

* subversion/libsvn_client/ra.c
  (callback_baton_t): Add wcroot_abspath argument to make looking this up
    from the ra call a hashtable lookup.
  (get_wc_contents): Use wcroot_abspath.
  (svn_client__open_ra_session_internal): Separate wri_abspath and base
    abspath handling. Use scratch_pool where possible.
  (svn_client_open_ra_session): Rename to ...
  (svn_client_open_ra_session2): ... this and update caller.
  (svn_client__ra_session_from_path2): Update caller.
  (svn_client__repos_locations): Update caller.
  (svn_client__get_youngest_common_ancestor): Update caller.

* subversion/libsvn_client/status.c
  (reporter_finish_report,
   svn_client_status5): Update caller.

* subversion/libsvn_client/update.c
  (update_internal): Update caller.

* subversion/libsvn_client/util.c
  (svn_client_get_repos_root): Update caller.


git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1450279 13f79535-47bb-0310-9956-ffa450edef68