subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cmpil...@apache.org
Subject svn commit: r1136597 - in /subversion/trunk/subversion: include/ include/private/ libsvn_client/ libsvn_wc/ svn/
Date Thu, 16 Jun 2011 18:50:32 GMT
Author: cmpilato
Date: Thu Jun 16 18:50:31 2011
New Revision: 1136597

URL: http://svn.apache.org/viewvc?rev=1136597&view=rev
Log:
Fix issue #3924 ("svn_client* wrapper for svn_wc_get_wc_root").

In order to avoid introducing a new svn_wc API function in 1.7 (a
policy I personal would like to see continued indefinitely), expose
its functionality via a new svn_client API instead (which itself is a
wrapper around the now-private WC function).

* subversion/include/svn_client.h,
* subversion/libsvn_client/info.c
  (svn_client_get_wc_root): New.

* subversion/include/svn_wc.h
  (svn_wc_get_wc_root): Renamed to svn_wc__get_wc_root() (in svn_wc_private.h).

* subversion/include/private/svn_wc_private.h,
  (svn_wc__get_wc_root): Was svn_wc_get_wc_root() (in svn_wc.h).

* subversion/libsvn_wc/update_editor.c
  (svn_wc__get_wc_root): Was svn_wc_get_wc_root().

* subversion/libsvn_client/commit.c
  (determine_lock_targets): Track rename of svn_wc_get_wc_root().

* subversion/libsvn_client/commit_util.c
  (bail_on_tree_conflicted_ancestor): Track rename of svn_wc_get_wc_root().

* subversion/libsvn_client/diff.c
  (diff_repos_wc): Track rename of svn_wc_get_wc_root().

* subversion/libsvn_client/externals.c
  (switch_file_external): Track rename of svn_wc_get_wc_root().

* subversion/svn/cleanup-cmd.c
  (svn_cl__cleanup): Use svn_client_get_wc_root() now.

Modified:
    subversion/trunk/subversion/include/private/svn_wc_private.h
    subversion/trunk/subversion/include/svn_client.h
    subversion/trunk/subversion/include/svn_wc.h
    subversion/trunk/subversion/libsvn_client/commit.c
    subversion/trunk/subversion/libsvn_client/commit_util.c
    subversion/trunk/subversion/libsvn_client/diff.c
    subversion/trunk/subversion/libsvn_client/externals.c
    subversion/trunk/subversion/libsvn_client/info.c
    subversion/trunk/subversion/libsvn_wc/update_editor.c
    subversion/trunk/subversion/svn/cleanup-cmd.c

Modified: subversion/trunk/subversion/include/private/svn_wc_private.h
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/include/private/svn_wc_private.h?rev=1136597&r1=1136596&r2=1136597&view=diff
==============================================================================
--- subversion/trunk/subversion/include/private/svn_wc_private.h (original)
+++ subversion/trunk/subversion/include/private/svn_wc_private.h Thu Jun 16 18:50:31 2011
@@ -262,6 +262,16 @@ svn_wc__strictly_is_wc_root(svn_boolean_
                             apr_pool_t *scratch_pool);
 
 
+/** Set @a *wcroot_abspath to the local abspath of the root of the
+ * working copy in which @a local_abspath resides.
+ */
+svn_error_t *
+svn_wc__get_wc_root(const char **wcroot_abspath,
+                    svn_wc_context_t *wc_ctx,
+                    const char *local_abspath,
+                    apr_pool_t *result_pool,
+                    apr_pool_t *scratch_pool);
+
 /**
  * The following are temporary APIs to aid in the transition from wc-1 to
  * wc-ng.  Use them for new development now, but they may be disappearing

Modified: subversion/trunk/subversion/include/svn_client.h
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/include/svn_client.h?rev=1136597&r1=1136596&r2=1136597&view=diff
==============================================================================
--- subversion/trunk/subversion/include/svn_client.h (original)
+++ subversion/trunk/subversion/include/svn_client.h Thu Jun 16 18:50:31 2011
@@ -5502,6 +5502,19 @@ svn_client_info(const char *path_or_url,
                 svn_client_ctx_t *ctx,
                 apr_pool_t *pool);
 
+/**
+ * Set @a *wcroot_abspath to the local abspath of the root of the
+ * working copy in which @a local_abspath resides.
+ *
+ * @since New in 1.7.
+ */
+svn_error_t *
+svn_client_get_wc_root(const char **wcroot_abspath,
+                       svn_client_ctx_t *ctx,
+                       const char *local_abspath,
+                       apr_pool_t *result_pool,
+                       apr_pool_t *scratch_pool);
+
 /** @} */
 
 

Modified: subversion/trunk/subversion/include/svn_wc.h
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/include/svn_wc.h?rev=1136597&r1=1136596&r2=1136597&view=diff
==============================================================================
--- subversion/trunk/subversion/include/svn_wc.h (original)
+++ subversion/trunk/subversion/include/svn_wc.h Thu Jun 16 18:50:31 2011
@@ -5292,19 +5292,6 @@ svn_wc_is_wc_root(svn_boolean_t *wc_root
                   svn_wc_adm_access_t *adm_access,
                   apr_pool_t *pool);
 
-/**
- * Set @a *wcroot_abspath to the local abspath of the root of the
- * working copy in which @a local_abspath resides.
- *
- * @since New in 1.7.
- */
-svn_error_t *
-svn_wc_get_wc_root(const char **wcroot_abspath,
-                   svn_wc_context_t *wc_ctx,
-                   const char *local_abspath,
-                   apr_pool_t *result_pool,
-                   apr_pool_t *scratch_pool);
-
 /** @} */
 
 

Modified: subversion/trunk/subversion/libsvn_client/commit.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/commit.c?rev=1136597&r1=1136596&r2=1136597&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/commit.c (original)
+++ subversion/trunk/subversion/libsvn_client/commit.c Thu Jun 16 18:50:31 2011
@@ -1049,8 +1049,8 @@ determine_lock_targets(apr_array_header_
       target_abspath = svn_dirent_join(base_abspath, target_relpath,
                                        scratch_pool);
 
-      err = svn_wc_get_wc_root(&wcroot_abspath, wc_ctx, target_abspath,
-                               iterpool, iterpool);
+      err = svn_wc__get_wc_root(&wcroot_abspath, wc_ctx, target_abspath,
+                                iterpool, iterpool);
 
       if (err)
         {

Modified: subversion/trunk/subversion/libsvn_client/commit_util.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/commit_util.c?rev=1136597&r1=1136596&r2=1136597&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/commit_util.c (original)
+++ subversion/trunk/subversion/libsvn_client/commit_util.c Thu Jun 16 18:50:31 2011
@@ -262,8 +262,8 @@ bail_on_tree_conflicted_ancestor(svn_wc_
 {
   const char *wcroot_abspath;
 
-  SVN_ERR(svn_wc_get_wc_root(&wcroot_abspath, wc_ctx, local_abspath,
-                             scratch_pool, scratch_pool));
+  SVN_ERR(svn_wc__get_wc_root(&wcroot_abspath, wc_ctx, local_abspath,
+                              scratch_pool, scratch_pool));
 
   local_abspath = svn_dirent_dirname(local_abspath, scratch_pool);
 

Modified: subversion/trunk/subversion/libsvn_client/diff.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/diff.c?rev=1136597&r1=1136596&r2=1136597&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/diff.c (original)
+++ subversion/trunk/subversion/libsvn_client/diff.c Thu Jun 16 18:50:31 2011
@@ -1864,9 +1864,9 @@ diff_repos_wc(const char *path1,
   callback_baton->ra_session = ra_session;
   if (use_git_diff_format)
     {
-      SVN_ERR(svn_wc_get_wc_root(&callback_baton->wc_root_abspath,
-                                 ctx->wc_ctx, anchor_abspath,
-                                 pool, pool));
+      SVN_ERR(svn_wc__get_wc_root(&callback_baton->wc_root_abspath,
+                                  ctx->wc_ctx, anchor_abspath,
+                                  pool, pool));
     }
   callback_baton->anchor = anchor;
 

Modified: subversion/trunk/subversion/libsvn_client/externals.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/externals.c?rev=1136597&r1=1136596&r2=1136597&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/externals.c (original)
+++ subversion/trunk/subversion/libsvn_client/externals.c Thu Jun 16 18:50:31 2011
@@ -361,8 +361,8 @@ switch_file_external(const char *local_a
     {
       const char *wcroot_abspath;
 
-      SVN_ERR(svn_wc_get_wc_root(&wcroot_abspath, ctx->wc_ctx, dir_abspath,
-                                 subpool, subpool));
+      SVN_ERR(svn_wc__get_wc_root(&wcroot_abspath, ctx->wc_ctx, dir_abspath,
+                                  subpool, subpool));
 
       if (!svn_dirent_is_ancestor(wcroot_abspath, def_dir_abspath))
         return svn_error_createf(

Modified: subversion/trunk/subversion/libsvn_client/info.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/info.c?rev=1136597&r1=1136596&r2=1136597&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/info.c (original)
+++ subversion/trunk/subversion/libsvn_client/info.c Thu Jun 16 18:50:31 2011
@@ -437,3 +437,15 @@ pre_1_2_recurse:
 
   return SVN_NO_ERROR;
 }
+
+
+svn_error_t *
+svn_client_get_wc_root(const char **wcroot_abspath,
+                       svn_client_ctx_t *ctx,
+                       const char *local_abspath,
+                       apr_pool_t *result_pool,
+                       apr_pool_t *scratch_pool)
+{
+  return svn_wc__get_wc_root(wcroot_abspath, ctx->wc_ctx, local_abspath,
+                             result_pool, scratch_pool);
+}

Modified: subversion/trunk/subversion/libsvn_wc/update_editor.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/update_editor.c?rev=1136597&r1=1136596&r2=1136597&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/update_editor.c (original)
+++ subversion/trunk/subversion/libsvn_wc/update_editor.c Thu Jun 16 18:50:31 2011
@@ -5036,11 +5036,11 @@ svn_wc__strictly_is_wc_root(svn_boolean_
 
 
 svn_error_t *
-svn_wc_get_wc_root(const char **wcroot_abspath,
-                   svn_wc_context_t *wc_ctx,
-                   const char *local_abspath,
-                   apr_pool_t *result_pool,
-                   apr_pool_t *scratch_pool)
+svn_wc__get_wc_root(const char **wcroot_abspath,
+                    svn_wc_context_t *wc_ctx,
+                    const char *local_abspath,
+                    apr_pool_t *result_pool,
+                    apr_pool_t *scratch_pool)
 {
   return svn_wc__db_get_wcroot(wcroot_abspath, wc_ctx->db,
                                local_abspath, result_pool, scratch_pool);

Modified: subversion/trunk/subversion/svn/cleanup-cmd.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/svn/cleanup-cmd.c?rev=1136597&r1=1136596&r2=1136597&view=diff
==============================================================================
--- subversion/trunk/subversion/svn/cleanup-cmd.c (original)
+++ subversion/trunk/subversion/svn/cleanup-cmd.c Thu Jun 16 18:50:31 2011
@@ -92,8 +92,8 @@ svn_cl__cleanup(apr_getopt_t *os,
             {
               const char *wcroot_abspath;
 
-              err2 = svn_wc_get_wc_root(&wcroot_abspath, ctx->wc_ctx,
-                                        target_abspath, subpool, subpool);
+              err2 = svn_client_get_wc_root(&wcroot_abspath, ctx,
+                                            target_abspath, subpool, subpool);
               if (err2)
                 err =  svn_error_compose_create(err, err2);
               else



Mime
View raw message