Author: julianfoad Date: Wed Oct 19 14:46:04 2011 New Revision: 1186244 URL: http://svn.apache.org/viewvc?rev=1186244&view=rev Log: Promote svn_client__get_repos_root() to a public API, deprecating three APIs that performed subsets of that operation. Calls to the deprecated APIs are not updated in this commit.
* subversion/libsvn_client/client.h (svn_client__get_repos_root): Rename and move to ... * subversion/include/svn_client.h (svn_client_get_repos_root): ... here. (svn_client_root_url_from_path, svn_client_uuid_from_url, svn_client_uuid_from_path2): Deprecate. * subversion/libsvn_client/cmdline.c (check_root_url_of_target): Track the rename. * subversion/libsvn_client/merge.c (merge_locked, merge_reintegrate_locked, merge_peg_locked): Same. * subversion/libsvn_client/url.c (svn_client_root_url_from_path): Same. * subversion/libsvn_client/util.c (svn_client__get_repos_root): Rename. Modified: subversion/trunk/subversion/include/svn_client.h subversion/trunk/subversion/libsvn_client/client.h subversion/trunk/subversion/libsvn_client/cmdline.c subversion/trunk/subversion/libsvn_client/merge.c subversion/trunk/subversion/libsvn_client/url.c subversion/trunk/subversion/libsvn_client/util.c Modified: subversion/trunk/subversion/include/svn_client.h URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/include/svn_client.h?rev=1186244&r1=1186243&r2=1186244&view=diff ============================================================================== --- subversion/trunk/subversion/include/svn_client.h (original) +++ subversion/trunk/subversion/include/svn_client.h Wed Oct 19 14:46:04 2011 @@ -5798,12 +5798,36 @@ svn_client_url_from_path(const char **ur apr_pool_t *pool); + +/* Fetching a repository's root URL and UUID. */ + +/** Set @a *repos_root_url and @a *repos_uuid, to the root URL and UUID of + * the repository in which @a abspath_or_url is versioned. Use the + * authentication baton and working copy context cached in @a ctx as + * necessary. @a repos_root_url and/or @a repos_uuid may be NULL if not + * wanted. + * + * Allocate @a *repos_root_url and @a *repos_uuid in @a result_pool. + * Use @a scratch_pool for temporary allocations. + * + * @since New in 1.8. + */ +svn_error_t * +svn_client_get_repos_root(const char **repos_root_url, + const char **repos_uuid, + const char *abspath_or_url, + svn_client_ctx_t *ctx, + apr_pool_t *result_pool, + apr_pool_t *scratch_pool); + /** Set @a *url to the repository root URL of the repository in which * @a path_or_url is versioned (or scheduled to be versioned), * allocated in @a pool. @a ctx is required for possible repository * authentication. * * @since New in 1.5. + * @deprecated Provided for backward compatibility with the 1.7 API. Use + * svn_client_get_repos_root(). */ svn_error_t * svn_client_root_url_from_path(const char **url, @@ -5811,16 +5835,15 @@ svn_client_root_url_from_path(const char svn_client_ctx_t *ctx, apr_pool_t *pool); - - -/* Fetching repository UUIDs. */ - /** Get repository @a uuid for @a url. * * Use a @a pool to open a temporary RA session to @a url, discover the * repository uuid, and free the session. Return the uuid in @a uuid, * allocated in @a pool. @a ctx is required for possible repository * authentication. + * + * @deprecated Provided for backward compatibility with the 1.7 API. Use + * svn_client_get_repos_root(). */ svn_error_t * svn_client_uuid_from_url(const char **uuid, @@ -5836,6 +5859,8 @@ svn_client_uuid_from_url(const char **uu * Use @a scratch_pool for temporary allocations. * * @since New in 1.7. + * @deprecated Provided for backward compatibility with the 1.7 API. Use + * svn_client_get_repos_root(). */ svn_error_t * svn_client_uuid_from_path2(const char **uuid, Modified: subversion/trunk/subversion/libsvn_client/client.h URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/client.h?rev=1186244&r1=1186243&r2=1186244&view=diff ============================================================================== --- subversion/trunk/subversion/libsvn_client/client.h (original) +++ subversion/trunk/subversion/libsvn_client/client.h Wed Oct 19 14:46:04 2011 @@ -248,21 +248,6 @@ svn_client__ensure_ra_session_url(const const char *session_url, apr_pool_t *pool); -/* Set *REPOS_ROOT and *REPOS_UUID, to the URL and UUID that represent - the root of the repository in with ABSPATH_OR_URL is versioned. - Use the authentication baton and working copy context cached in CTX as - necessary. REPOS_ROOT and/or REPOS_UUID may be NULL if not wanted. - - Allocate *REPOS_ROOT and *REPOS_UUID in RESULT_POOL. - Use SCRATCH_POOL for temporary allocations. */ -svn_error_t * -svn_client__get_repos_root(const char **repos_root, - const char **repos_uuid, - const char *abspath_or_url, - svn_client_ctx_t *ctx, - apr_pool_t *result_pool, - apr_pool_t *scratch_pool); - /* Return the path of ABSPATH_OR_URL relative to the repository root (REPOS_ROOT) in REL_PATH (URI-decoded), both allocated in RESULT_POOL. If INCLUDE_LEADING_SLASH is set, the returned result will have a leading Modified: subversion/trunk/subversion/libsvn_client/cmdline.c URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/cmdline.c?rev=1186244&r1=1186243&r2=1186244&view=diff ============================================================================== --- subversion/trunk/subversion/libsvn_client/cmdline.c (original) +++ subversion/trunk/subversion/libsvn_client/cmdline.c Wed Oct 19 14:46:04 2011 @@ -114,8 +114,8 @@ check_root_url_of_target(const char **ro if (!svn_path_is_url(truepath)) SVN_ERR(svn_dirent_get_absolute(&truepath, truepath, pool)); - err = svn_client__get_repos_root(&tmp_root_url, NULL, truepath, - ctx, pool, pool); + err = svn_client_get_repos_root(&tmp_root_url, NULL, truepath, + ctx, pool, pool); if (err) { Modified: subversion/trunk/subversion/libsvn_client/merge.c URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/merge.c?rev=1186244&r1=1186243&r2=1186244&view=diff ============================================================================== --- subversion/trunk/subversion/libsvn_client/merge.c (original) +++ subversion/trunk/subversion/libsvn_client/merge.c Wed Oct 19 14:46:04 2011 @@ -9444,9 +9444,9 @@ merge_locked(const char *source1, scratch_pool)); /* Determine the working copy target's repository root URL. */ - SVN_ERR(svn_client__get_repos_root(&wc_repos_root, &wc_repos_uuid, - target_abspath, - ctx, scratch_pool, scratch_pool)); + SVN_ERR(svn_client_get_repos_root(&wc_repos_root, &wc_repos_uuid, + target_abspath, + ctx, scratch_pool, scratch_pool)); /* Open some RA sessions to our merge source sides. */ sesspool = svn_pool_create(scratch_pool); @@ -10653,12 +10653,12 @@ merge_reintegrate_locked(const char *sou svn_dirent_local_style(source, scratch_pool)); /* Determine the working copy target's repository root URL. */ - SVN_ERR(svn_client__get_repos_root(&wc_repos_root, NULL, target_abspath, - ctx, scratch_pool, scratch_pool)); + SVN_ERR(svn_client_get_repos_root(&wc_repos_root, NULL, target_abspath, + ctx, scratch_pool, scratch_pool)); /* Determine the source's repository root URL. */ - SVN_ERR(svn_client__get_repos_root(&source_repos_root, NULL, url2, - ctx, scratch_pool, scratch_pool)); + SVN_ERR(svn_client_get_repos_root(&source_repos_root, NULL, url2, + ctx, scratch_pool, scratch_pool)); /* source_repos_root and wc_repos_root are required to be the same, as mergeinfo doesn't come into play for cross-repository merging. */ @@ -10935,9 +10935,9 @@ merge_peg_locked(const char *source, scratch_pool)); /* Determine the working copy target's repository root URL. */ - SVN_ERR(svn_client__get_repos_root(&wc_repos_root, &wc_repos_uuid, - target_abspath, - ctx, scratch_pool, scratch_pool)); + SVN_ERR(svn_client_get_repos_root(&wc_repos_root, &wc_repos_uuid, + target_abspath, + ctx, scratch_pool, scratch_pool)); /* Open an RA session to our source URL, and determine its root URL. */ sesspool = svn_pool_create(scratch_pool); Modified: subversion/trunk/subversion/libsvn_client/url.c URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/url.c?rev=1186244&r1=1186243&r2=1186244&view=diff ============================================================================== --- subversion/trunk/subversion/libsvn_client/url.c (original) +++ subversion/trunk/subversion/libsvn_client/url.c Wed Oct 19 14:46:04 2011 @@ -73,6 +73,6 @@ svn_client_root_url_from_path(const char SVN_ERR(svn_dirent_get_absolute(&path_or_url, path_or_url, pool)); return svn_error_trace( - svn_client__get_repos_root(url, NULL, path_or_url, - ctx, pool, pool)); + svn_client_get_repos_root(url, NULL, path_or_url, + ctx, pool, pool)); } Modified: subversion/trunk/subversion/libsvn_client/util.c URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/util.c?rev=1186244&r1=1186243&r2=1186244&view=diff ============================================================================== --- subversion/trunk/subversion/libsvn_client/util.c (original) +++ subversion/trunk/subversion/libsvn_client/util.c Wed Oct 19 14:46:04 2011 @@ -144,12 +144,12 @@ svn_client__path_relative_to_root(const } svn_error_t * -svn_client__get_repos_root(const char **repos_root, - const char **repos_uuid, - const char *abspath_or_url, - svn_client_ctx_t *ctx, - apr_pool_t *result_pool, - apr_pool_t *scratch_pool) +svn_client_get_repos_root(const char **repos_root, + const char **repos_uuid, + const char *abspath_or_url, + svn_client_ctx_t *ctx, + apr_pool_t *result_pool, + apr_pool_t *scratch_pool) { svn_ra_session_t *ra_session;