Rework the creation and destruction of svn_wc_context_t within the client library. Specifically, always create a wc_context as part of a client context, and use that internally within the client library.
* subversion/libsvn_client/relocate.c, subversion/libsvn_client/export.c, subversion/libsvn_client/merge.c, subversion/libsvn_client/prop_commands.c, subversion/libsvn_client/ra.c, subversion/libsvn_client/locking_commands.c, subversion/libsvn_client/cat.c, subversion/libsvn_client/copy.c, subversion/libsvn_client/mergeinfo.c, subversion/libsvn_client/blame.c, subversion/libsvn_client/commit_util.c, subversion/libsvn_client/cleanup.c, subversion/libsvn_client/add.c, subversion/libsvn_client/commit.c, subversion/libsvn_client/client.h, subversion/libsvn_client/mergeinfo.h: Don't create a wc_context, just use the one in the client context. Also, adjust function parameter lists and batons to eliminate redundant wc_context members.
* subversion/libsvn_client/ctx.c (svn_client_create_context): Create a wc context.
Let callers to svn_client__get_prop_from_wc() supply a working copy context, in place of creating one each time this function is called.
The result of this change is many new wc_ctx function parameters, primarily within mergeinfo.c and merge.c. The paradigm we are shooting for is that client APIs create a wc_ctx (or reuse ctx->wc_ctx), and then pass it around where ever needed. Although this is similar to passing adm_access batons everywhere, the key insight is that the wc_ctx doesn't change depending on which working copy directory or path we are accessing, which ultimately means less trouble for the callers.
Also, as much as I would love to, we can't yet remove all the adm_access batons, since there are still many APIs which require them. :(
* subversion/libsvn_client/merge.c (merge_cmd_baton_t): Add wc_ctx member. (get_full_mergeinfo, inherit_implicit_mergeinfo_from_parent, ensure_implicit_mergeinfo, filter_merged_revisions, calculate_remaining_ranges, populate_remaining_ranges, calculate_merge_inheritance, do_merge, merge_cousins_and_supplement_mergeinfo): Add wc_ctx param and propogate it to other function calls. (record_skips, get_mergeinfo_paths, do_file_merge, process_children_with_new_mergeinfo, record_mergeinfo_for_dir_merge, record_mergeinfo_for_added_subtrees): Use the wc_ctx from the merge_baton to call other functions. (svn_client_merge3, svn_client_merge_reintegrate, svn_client_merge_peg3): Create (or reuse) a wc_ctx for further use.
* subversion/libsvn_client/prop_commands.c (svn_client__get_prop_from_wc): Add wc_ctx param, and use it instead of creating one. (svn_client_propget3): Get a wc_ctx for later use.
* subversion/libsvn_client/copy.c (calculate_target_mergeinfo, extend_wc_mergeinfo, repos_to_repos_copy, wc_to_repos_copy, repos_to_wc_copy_single, try_copy): Add wc_ctx param and propogate it to other function calls. (svn_client_copy5): Allocate the context from the correct pool.
* subversion/libsvn_client/mergeinfo.c (svn_client__parse_mergeinfo, svn_client__get_wc_mergeinfo, svn_client__get_wc_or_repos_mergeinfo, svn_client__elide_children, svn_client__elide_mergeinfo, svn_client__elide_mergeinfo_for_tree, get_mergeinfo): Add wc_ctx param and propogate it to other function calls. (svn_client__record_wc_mergeinfo): Add wc_ctx param, remove access baton, and make sure the path we receive is an absolute path. Update deprecated function call while we're here. (svn_client_mergeinfo_log_merged, svn_client_mergeinfo_get_merged, svn_client_mergeinfo_log_eligible, svn_client_suggest_merge_sources): Get a wc_ctx to use.