subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From br...@apache.org
Subject svn commit: r1808139 - in /subversion/branches/better-pristines/subversion: include/svn_client.h libsvn_client/checkout.c libsvn_client/deprecated.c svn/checkout-cmd.c tests/libsvn_wc/utils.c
Date Tue, 12 Sep 2017 17:50:05 GMT
Author: brane
Date: Tue Sep 12 17:50:05 2017
New Revision: 1808139

URL: http://svn.apache.org/viewvc?rev=1808139&view=rev
Log:
On the better-pristines branch: Add WC format parameter to svn_client_checkout.
Also tweak some docstrings and update all callers of the deprecated version.

* subversion/include/svn_client.h
  (svn_client_checkout4): New; add option to set the format of the created WC.
  (svn_client_checkout3): Deprecate.
  (svn_client_upgrade2): Tweak docstring.

* subversion/libsvn_client/checkout.c
  (svn_client_checkout4): Implement, based on svn_client_checkout3.
* subversion/libsvn_client/deprecated.c
  (svn_client_checkout3): Move implementation here from checkout.c.
* (svn_client_upgrade): Add missing svn_error_trace() call.

* subversion/svn/checkout-cmd.c
  (svn_cl__checkout): Call svn_client_checkout4().

* subversion/tests/libsvn_wc/utils.c
  (create_repos_and_wc): Call svn_client_checkout4().

Modified:
    subversion/branches/better-pristines/subversion/include/svn_client.h
    subversion/branches/better-pristines/subversion/libsvn_client/checkout.c
    subversion/branches/better-pristines/subversion/libsvn_client/deprecated.c
    subversion/branches/better-pristines/subversion/svn/checkout-cmd.c
    subversion/branches/better-pristines/subversion/tests/libsvn_wc/utils.c

Modified: subversion/branches/better-pristines/subversion/include/svn_client.h
URL: http://svn.apache.org/viewvc/subversion/branches/better-pristines/subversion/include/svn_client.h?rev=1808139&r1=1808138&r2=1808139&view=diff
==============================================================================
--- subversion/branches/better-pristines/subversion/include/svn_client.h (original)
+++ subversion/branches/better-pristines/subversion/include/svn_client.h Tue Sep 12 17:50:05
2017
@@ -1202,6 +1202,11 @@ svn_client_args_to_target_array(apr_arra
  *              set equal to the base properties. <br>
  *              If @c FALSE, then abort if there are any unversioned
  *              obstructing items.
+ * @param[in] wc_format_version is the version number of the Subversion
+ *              client that supports the metadata format of the
+ *              created working copy; @c NULL means the newest
+ *              supported format. The earliest supported version is
+ *              returned by svn_client_supported_wc_version().
  * @param[in] ctx   The standard client context, used for authentication and
  *              notification.
  * @param[in] pool  Used for any temporary allocation.
@@ -1216,13 +1221,13 @@ svn_client_args_to_target_array(apr_arra
  *         #svn_opt_revision_date. <br>
  *         If no error occurred, return #SVN_NO_ERROR.
  *
- * @since New in 1.5.
+ * @since New in 1.10.
  *
  * @see #svn_depth_t <br> #svn_client_ctx_t <br> @ref clnt_revisions for
  *      a discussion of operative and peg revisions.
  */
 svn_error_t *
-svn_client_checkout3(svn_revnum_t *result_rev,
+svn_client_checkout4(svn_revnum_t *result_rev,
                      const char *URL,
                      const char *path,
                      const svn_opt_revision_t *peg_revision,
@@ -1230,9 +1235,29 @@ svn_client_checkout3(svn_revnum_t *resul
                      svn_depth_t depth,
                      svn_boolean_t ignore_externals,
                      svn_boolean_t allow_unver_obstructions,
+                     const svn_version_t *wc_format_version,
                      svn_client_ctx_t *ctx,
                      apr_pool_t *pool);
 
+/**
+ * Similar to svn_client_checkout4() but always creates the newest
+ * supported working copy format.
+ *
+ * @since New in 1.5
+ * @deprecated Provided for backward compatibility with the 1.9 API.
+ */
+SVN_DEPRECATED
+svn_error_t *
+svn_client_checkout3(svn_revnum_t *result_rev,
+                     const char *URL,
+                     const char *path,
+                     const svn_opt_revision_t *peg_revision,
+                     const svn_opt_revision_t *revision,
+                     svn_depth_t depth,
+                     svn_boolean_t ignore_externals,
+                     svn_boolean_t allow_unver_obstructions,
+                     svn_client_ctx_t *ctx,
+                     apr_pool_t *pool);
 
 /**
  * Similar to svn_client_checkout3() but with @a allow_unver_obstructions
@@ -4206,11 +4231,10 @@ svn_client_cleanup(const char *dir,
  * copies from any older format to the given WC metadata storage
  * format.  @a wcroot_dir is the path to the WC root.
  *
- * @a wc_format_version is version number of the Subversion client
+ * @a wc_format_version is the version number of the Subversion client
  * that supports a given WC metadata format; @c NULL means the newest
- * supported format. Any other value must be a string representing a
- * version number, e.g., "1.8" or "1.9.3". The earliest supported
- * version is returned by svn_client_supported_wc_version().
+ * supported format. The earliest supported version is returned by
+ * svn_client_supported_wc_version().
  *
  * Use @a scratch_pool for any temporary allocations.
  *

Modified: subversion/branches/better-pristines/subversion/libsvn_client/checkout.c
URL: http://svn.apache.org/viewvc/subversion/branches/better-pristines/subversion/libsvn_client/checkout.c?rev=1808139&r1=1808138&r2=1808139&view=diff
==============================================================================
--- subversion/branches/better-pristines/subversion/libsvn_client/checkout.c (original)
+++ subversion/branches/better-pristines/subversion/libsvn_client/checkout.c Tue Sep 12 17:50:05
2017
@@ -198,7 +198,7 @@ svn_client__checkout_internal(svn_revnum
 }
 
 svn_error_t *
-svn_client_checkout3(svn_revnum_t *result_rev,
+svn_client_checkout4(svn_revnum_t *result_rev,
                      const char *URL,
                      const char *path,
                      const svn_opt_revision_t *peg_revision,
@@ -206,6 +206,7 @@ svn_client_checkout3(svn_revnum_t *resul
                      svn_depth_t depth,
                      svn_boolean_t ignore_externals,
                      svn_boolean_t allow_unver_obstructions,
+                     const svn_version_t *wc_format_version,
                      svn_client_ctx_t *ctx,
                      apr_pool_t *pool)
 {

Modified: subversion/branches/better-pristines/subversion/libsvn_client/deprecated.c
URL: http://svn.apache.org/viewvc/subversion/branches/better-pristines/subversion/libsvn_client/deprecated.c?rev=1808139&r1=1808138&r2=1808139&view=diff
==============================================================================
--- subversion/branches/better-pristines/subversion/libsvn_client/deprecated.c (original)
+++ subversion/branches/better-pristines/subversion/libsvn_client/deprecated.c Tue Sep 12
17:50:05 2017
@@ -2531,6 +2531,24 @@ svn_client_cat(svn_stream_t *out,
 
 /*** From checkout.c ***/
 svn_error_t *
+svn_client_checkout3(svn_revnum_t *result_rev,
+                     const char *URL,
+                     const char *path,
+                     const svn_opt_revision_t *peg_revision,
+                     const svn_opt_revision_t *revision,
+                     svn_depth_t depth,
+                     svn_boolean_t ignore_externals,
+                     svn_boolean_t allow_unver_obstructions,
+                     svn_client_ctx_t *ctx,
+                     apr_pool_t *pool)
+{
+  return svn_error_trace(svn_client_checkout4(
+                             result_rev, URL, path,
+                             peg_revision, revision, depth,
+                             ignore_externals, FALSE, NULL, ctx, pool));
+}
+
+svn_error_t *
 svn_client_checkout2(svn_revnum_t *result_rev,
                      const char *URL,
                      const char *path,
@@ -3108,10 +3126,11 @@ svn_client_cleanup(const char *path,
                                              ctx, scratch_pool));
 }
 
+/*** From upgrade.c ***/
 svn_error_t *
 svn_client_upgrade(const char *path,
                    svn_client_ctx_t *ctx,
                    apr_pool_t *scratch_pool)
 {
-  return svn_client_upgrade2(path, NULL, ctx, scratch_pool);
+  return svn_error_trace(svn_client_upgrade2(path, NULL, ctx, scratch_pool));
 }

Modified: subversion/branches/better-pristines/subversion/svn/checkout-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/better-pristines/subversion/svn/checkout-cmd.c?rev=1808139&r1=1808138&r2=1808139&view=diff
==============================================================================
--- subversion/branches/better-pristines/subversion/svn/checkout-cmd.c (original)
+++ subversion/branches/better-pristines/subversion/svn/checkout-cmd.c Tue Sep 12 17:50:05
2017
@@ -165,13 +165,14 @@ svn_cl__checkout(apr_getopt_t *os,
           revision.kind = svn_opt_revision_head;
       }
 
-      SVN_ERR(svn_client_checkout3
+      SVN_ERR(svn_client_checkout4
               (NULL, true_url, target_dir,
                &peg_revision,
                &revision,
                opt_state->depth,
                opt_state->ignore_externals,
                opt_state->force,
+               /* TODO: */NULL,
                ctx, subpool));
     }
   svn_pool_destroy(subpool);

Modified: subversion/branches/better-pristines/subversion/tests/libsvn_wc/utils.c
URL: http://svn.apache.org/viewvc/subversion/branches/better-pristines/subversion/tests/libsvn_wc/utils.c?rev=1808139&r1=1808138&r2=1808139&view=diff
==============================================================================
--- subversion/branches/better-pristines/subversion/tests/libsvn_wc/utils.c (original)
+++ subversion/branches/better-pristines/subversion/tests/libsvn_wc/utils.c Tue Sep 12 17:50:05
2017
@@ -103,10 +103,11 @@ create_repos_and_wc(const char **repos_u
 
     SVN_ERR(svn_test__create_client_ctx(&ctx, NULL, subpool));
     SVN_ERR(svn_dirent_get_absolute(wc_abspath, wc_path, pool));
-    SVN_ERR(svn_client_checkout3(NULL, *repos_url, *wc_abspath,
+    SVN_ERR(svn_client_checkout4(NULL, *repos_url, *wc_abspath,
                                  &head_rev, &head_rev, svn_depth_infinity,
                                  FALSE /* ignore_externals */,
                                  FALSE /* allow_unver_obstructions */,
+                                 /* TODO: */NULL /* wc_format_verison */,
                                  ctx, subpool));
     svn_pool_destroy(subpool);
   }



Mime
View raw message