subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From i...@apache.org
Subject svn commit: r1502545 - in /subversion/branches/reuse-ra-session/subversion: include/svn_client.h libsvn_client/ctx.c libsvn_client/ra.c libsvn_client/ra_cache.c libsvn_client/ra_cache.h libsvn_client/ra_ctx.c libsvn_client/ra_ctx.h
Date Fri, 12 Jul 2013 13:06:53 GMT
Author: ivan
Date: Fri Jul 12 13:06:52 2013
New Revision: 1502545

URL: http://svn.apache.org/r1502545
Log:
On the reuse-ra-session branch: Rename svn_client__ra_ctx_* to svn_client__
ra_cache_*.

Suggested by: gstein

* subversion/include/svn_client.h
  (svn_client_ctx_t): Rename ra_ctx to ra_cache.

* subversion/libsvn_client/ctx.c
  (): Include ra_cache.h instead of ra_ctx.h.
  (svn_client_create_context2): Use new ra_cache name.

* subversion/libsvn_client/ra.c
  (): Include ra_cache.h instead of ra_ctx.h.
  (svn_client__open_ra_session_internal, svn_client__ra_session_release):
   Use updates function names.

* subversion/libsvn_client/ra_ctx.c: Rename to ra_cache.c.
* subversion/libsvn_client/ra_ctx.h: Rename to ra_cache.h.

* subversion/libsvn_client/ra_cache.c
* subversion/libsvn_client/ra_cache.h
  (): Include ra_cache.h instead of ra_ctx.h.
  (svn_client__ra_cache_t, svn_client__ra_ctx_create,
   svn_client__ra_ctx_open_session, svn_client__ra_cache_release_session):
   Rename to to svn_client__ra_cache_*.

Added:
    subversion/branches/reuse-ra-session/subversion/libsvn_client/ra_cache.c
      - copied, changed from r1502537, subversion/branches/reuse-ra-session/subversion/libsvn_client/ra_ctx.c
    subversion/branches/reuse-ra-session/subversion/libsvn_client/ra_cache.h
      - copied, changed from r1502519, subversion/branches/reuse-ra-session/subversion/libsvn_client/ra_ctx.h
Removed:
    subversion/branches/reuse-ra-session/subversion/libsvn_client/ra_ctx.c
    subversion/branches/reuse-ra-session/subversion/libsvn_client/ra_ctx.h
Modified:
    subversion/branches/reuse-ra-session/subversion/include/svn_client.h
    subversion/branches/reuse-ra-session/subversion/libsvn_client/ctx.c
    subversion/branches/reuse-ra-session/subversion/libsvn_client/ra.c

Modified: subversion/branches/reuse-ra-session/subversion/include/svn_client.h
URL: http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/include/svn_client.h?rev=1502545&r1=1502544&r2=1502545&view=diff
==============================================================================
--- subversion/branches/reuse-ra-session/subversion/include/svn_client.h (original)
+++ subversion/branches/reuse-ra-session/subversion/include/svn_client.h Fri Jul 12 13:06:52
2013
@@ -1014,12 +1014,12 @@ typedef struct svn_client_ctx_t
    * @since New in 1.7.  */
   svn_wc_context_t *wc_ctx;
 
-  /** A repository access context for the client operation to use.
-   * this is initialized by svn_client_create_context() and should never
+  /** A RA session cache for the client operation to use.
+   * This is initialized by svn_client_create_context() and should never
    * be directly used or changed.
    *
    * @since New in 1.9.  */
-  void *ra_ctx;
+  void *ra_cache;
 } svn_client_ctx_t;
 
 /** Initialize a client context.

Modified: subversion/branches/reuse-ra-session/subversion/libsvn_client/ctx.c
URL: http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/libsvn_client/ctx.c?rev=1502545&r1=1502544&r2=1502545&view=diff
==============================================================================
--- subversion/branches/reuse-ra-session/subversion/libsvn_client/ctx.c (original)
+++ subversion/branches/reuse-ra-session/subversion/libsvn_client/ctx.c Fri Jul 12 13:06:52
2013
@@ -33,7 +33,7 @@
 #include "svn_error.h"
 
 #include "private/svn_wc_private.h"
-#include "ra_ctx.h"
+#include "ra_cache.h"
 
 
 /*** Code. ***/
@@ -102,7 +102,7 @@ svn_client_create_context2(svn_client_ct
   SVN_ERR(svn_wc_context_create(&(*ctx)->wc_ctx, cfg_config, pool,
                                 pool));
 
-  (*ctx)->ra_ctx = svn_client__ra_ctx_create(cfg_hash, pool);
+  (*ctx)->ra_cache = svn_client__ra_cache_create(cfg_hash, pool);
 
   return SVN_NO_ERROR;
 }

Modified: subversion/branches/reuse-ra-session/subversion/libsvn_client/ra.c
URL: http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/libsvn_client/ra.c?rev=1502545&r1=1502544&r2=1502545&view=diff
==============================================================================
--- subversion/branches/reuse-ra-session/subversion/libsvn_client/ra.c (original)
+++ subversion/branches/reuse-ra-session/subversion/libsvn_client/ra.c Fri Jul 12 13:06:52
2013
@@ -38,7 +38,7 @@
 #include "svn_mergeinfo.h"
 #include "client.h"
 #include "mergeinfo.h"
-#include "ra_ctx.h"
+#include "ra_cache.h"
 
 #include "svn_private_config.h"
 #include "private/svn_wc_private.h"
@@ -388,9 +388,9 @@ svn_client__open_ra_session_internal(svn
 
           /* Try to open the RA session.  If this is our last attempt,
              don't accept corrected URLs from the RA provider. */
-          SVN_ERR(svn_client__ra_ctx_open_session(
+          SVN_ERR(svn_client__ra_cache_open_session(
                     ra_session, attempts_left == 0 ? NULL : &corrected,
-                    ctx->ra_ctx, base_url, uuid, cbtable, cb, 
+                    ctx->ra_cache, base_url, uuid, cbtable, cb, 
                     result_pool, scratch_pool));
 
           /* No error and no corrected URL?  We're done here. */
@@ -423,7 +423,7 @@ svn_client__open_ra_session_internal(svn
     }
   else
     {
-      SVN_ERR(svn_client__ra_ctx_open_session(ra_session, NULL, ctx->ra_ctx,
+      SVN_ERR(svn_client__ra_cache_open_session(ra_session, NULL, ctx->ra_cache,
                                               base_url, uuid, cbtable,
                                               cb, result_pool, scratch_pool));
     }
@@ -1163,6 +1163,6 @@ svn_error_t *
 svn_client__ra_session_release(svn_client_ctx_t *ctx,
                                svn_ra_session_t *session)
 {
-    svn_client__ra_ctx_release_session(ctx->ra_ctx, session);
+    svn_client__ra_cache_release_session(ctx->ra_cache, session);
     return SVN_NO_ERROR;
 }

Copied: subversion/branches/reuse-ra-session/subversion/libsvn_client/ra_cache.c (from r1502537,
subversion/branches/reuse-ra-session/subversion/libsvn_client/ra_ctx.c)
URL: http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/libsvn_client/ra_cache.c?p2=subversion/branches/reuse-ra-session/subversion/libsvn_client/ra_cache.c&p1=subversion/branches/reuse-ra-session/subversion/libsvn_client/ra_ctx.c&r1=1502537&r2=1502545&rev=1502545&view=diff
==============================================================================
--- subversion/branches/reuse-ra-session/subversion/libsvn_client/ra_ctx.c (original)
+++ subversion/branches/reuse-ra-session/subversion/libsvn_client/ra_cache.c Fri Jul 12 13:06:52
2013
@@ -1,5 +1,5 @@
 /*
- * ra.c :  RA session abstraction layer
+ * ra_cache.c :  RA session cache layer
  *
  * ====================================================================
  *    Licensed to the Apache Software Foundation (ASF) under one
@@ -26,7 +26,7 @@
 #include "svn_dirent_uri.h"
 #include "svn_private_config.h"
 
-#include "ra_ctx.h"
+#include "ra_cache.h"
 #include "private/svn_debug.h"
 
 #if 0
@@ -55,7 +55,7 @@ typedef struct cached_session_s
   int id;
 } cached_session_t;
 
-struct svn_client__ra_ctx_s
+struct svn_client__ra_cache_s
 {
   /* Hashtable of cached RA sessions. Keys are RA_SESSION_T and values
    * are CACHED_SESION_T pointers. */
@@ -81,11 +81,11 @@ cleanup_session(void *data)
   return APR_SUCCESS;
 }
 
-svn_client__ra_ctx_t *
-svn_client__ra_ctx_create(apr_hash_t *config,
+svn_client__ra_cache_t *
+svn_client__ra_cache_create(apr_hash_t *config,
                           apr_pool_t *pool)
 {
-  svn_client__ra_ctx_t *ctx = apr_pcalloc(pool, sizeof(*ctx));
+  svn_client__ra_cache_t *ctx = apr_pcalloc(pool, sizeof(*ctx));
 
   ctx->pool = pool;
   ctx->cached_session = apr_hash_make(pool);
@@ -257,7 +257,7 @@ progress_func(apr_off_t progress,
 
 static svn_error_t *
 find_session_by_url(cached_session_t **cache_entry_p,
-                    svn_client__ra_ctx_t *ctx,
+                    svn_client__ra_cache_t *ctx,
                     const char *url,
                     apr_pool_t *scratch_pool)
 {
@@ -281,15 +281,15 @@ find_session_by_url(cached_session_t **c
 }
 
 svn_error_t *
-svn_client__ra_ctx_open_session(svn_ra_session_t **session_p,
-                                const char **corrected_p,
-                                svn_client__ra_ctx_t *ctx,
-                                const char *base_url,
-                                const char *uuid,
-                                svn_ra_callbacks2_t *cbtable,
-                                void *callback_baton,
-                                apr_pool_t *result_pool,
-                                apr_pool_t *scratch_pool)
+svn_client__ra_cache_open_session(svn_ra_session_t **session_p,
+                                  const char **corrected_p,
+                                  svn_client__ra_cache_t *ctx,
+                                  const char *base_url,
+                                  const char *uuid,
+                                  svn_ra_callbacks2_t *cbtable,
+                                  void *callback_baton,
+                                  apr_pool_t *result_pool,
+                                  apr_pool_t *scratch_pool)
 {
   cached_session_t *cache_entry;
 
@@ -394,8 +394,8 @@ svn_client__ra_ctx_open_session(svn_ra_s
 }
 
 void
-svn_client__ra_ctx_release_session(svn_client__ra_ctx_t *ctx,
-                                   svn_ra_session_t *session)
+svn_client__ra_cache_release_session(svn_client__ra_cache_t *ctx,
+                                     svn_ra_session_t *session)
 {
   cached_session_t *cache_entry = apr_hash_get(ctx->cached_session,
                                                &session, sizeof(session));

Copied: subversion/branches/reuse-ra-session/subversion/libsvn_client/ra_cache.h (from r1502519,
subversion/branches/reuse-ra-session/subversion/libsvn_client/ra_ctx.h)
URL: http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/libsvn_client/ra_cache.h?p2=subversion/branches/reuse-ra-session/subversion/libsvn_client/ra_cache.h&p1=subversion/branches/reuse-ra-session/subversion/libsvn_client/ra_ctx.h&r1=1502519&r2=1502545&rev=1502545&view=diff
==============================================================================
--- subversion/branches/reuse-ra-session/subversion/libsvn_client/ra_ctx.h (original)
+++ subversion/branches/reuse-ra-session/subversion/libsvn_client/ra_cache.h Fri Jul 12 13:06:52
2013
@@ -1,5 +1,5 @@
 /**
- * ra_ctx.h : RA session abstraction layer
+ * ra_cache.h : RA session abstraction layer
  *
  * ====================================================================
  *    Licensed to the Apache Software Foundation (ASF) under one
@@ -21,8 +21,8 @@
  * ====================================================================
  */
 
-#ifndef SVN_LIBSVN_RA_CTX_H
-#define SVN_LIBSVN_RA_CTX_H
+#ifndef SVN_LIBSVN_ra_cache_H
+#define SVN_LIBSVN_ra_cache_H
 
 #include <apr_pools.h>
 
@@ -34,12 +34,12 @@
 extern "C" {
 #endif /* __cplusplus */
 
-typedef struct svn_client__ra_ctx_s svn_client__ra_ctx_t;
+typedef struct svn_client__ra_cache_s svn_client__ra_cache_t;
 
-/* Allocates RA_CTX structure in POOL. Will use CONFIG for
+/* Allocates ra_cache structure in POOL. Will use CONFIG for
    for RA sessions created in this context. */
-svn_client__ra_ctx_t *
-svn_client__ra_ctx_create(apr_hash_t *config,
+svn_client__ra_cache_t *
+svn_client__ra_cache_create(apr_hash_t *config,
                           apr_pool_t *pool);
 
 /* Open new repository access session to the repository at BASE_URL or
@@ -49,13 +49,13 @@ svn_client__ra_ctx_create(apr_hash_t *co
    to reuse sessions for same repository.
 
    The created session will be automatically returned to CTX on RESULT_POOL
-   cleanup or by explicit svn_client__ra_ctx_release_session() call.
+   cleanup or by explicit svn_client__ra_cache_release_session() call.
 
    Uses SCRATCH_POOL for temporary allocations. */
 svn_error_t *
-svn_client__ra_ctx_open_session(svn_ra_session_t **session_p,
+svn_client__ra_cache_open_session(svn_ra_session_t **session_p,
                                 const char **corrected_p,
-                                svn_client__ra_ctx_t *ctx,
+                                svn_client__ra_cache_t *ctx,
                                 const char *base_url,
                                 const char *uuid,
                                 svn_ra_callbacks2_t *cbtable,
@@ -65,11 +65,11 @@ svn_client__ra_ctx_open_session(svn_ra_s
 
 /* Returns RA SESSION back to CTX. */
 void
-svn_client__ra_ctx_release_session(svn_client__ra_ctx_t *ctx,
+svn_client__ra_cache_release_session(svn_client__ra_cache_t *ctx,
                                    svn_ra_session_t *session);
 
 #ifdef __cplusplus
 }
 #endif /* __cplusplus */
 
-#endif /* SVN_LIBSVN_RA_CTX_H */
+#endif /* SVN_LIBSVN_ra_cache_H */



Mime
View raw message