Author: julianfoad
Date: Wed Mar 2 12:24:40 2022
New Revision: 1898525
URL: http://svn.apache.org/viewvc?rev=1898525=rev
Log:
Multi-WC-format: clean up some client APIs.
* subversion/include/svn_client.h,
subversion/libsvn_client/upgrade.c
(svn_client_wc_format_t): Delete.
(svn_client_get_wc_formats_supported): New, simpler replacement for...
(svn_client_supported_wc_formats): ... this, now removed.
(svn_client_wc_version_from_format): Rename from
'svn_client__wc_version_from_format' to be a public API; remove a
scratch-pool argument that was likely to be of net negative value.
* subversion/libsvn_wc/wc.h
(SVN_WC__SUPPORTED_VERSION): Update comment.
* subversion/svn/help-cmd.c
(print_supported_wc_formats): Update callers.
* subversion/svn/info-cmd.c
(print_info_item): Update callers.
* subversion/svn/svn.c
(parse_compatible_version): Update callers.
Modified:
subversion/trunk/subversion/include/svn_client.h
subversion/trunk/subversion/libsvn_client/upgrade.c
subversion/trunk/subversion/libsvn_wc/wc.h
subversion/trunk/subversion/svn/help-cmd.c
subversion/trunk/subversion/svn/info-cmd.c
subversion/trunk/subversion/svn/svn.c
Modified: subversion/trunk/subversion/include/svn_client.h
URL:
http://svn.apache.org/viewvc/subversion/trunk/subversion/include/svn_client.h?rev=1898525=1898524=1898525=diff
==
--- subversion/trunk/subversion/include/svn_client.h (original)
+++ subversion/trunk/subversion/include/svn_client.h Wed Mar 2 12:24:40 2022
@@ -1244,7 +1244,7 @@ svn_client_args_to_target_array(apr_arra
* client that supports the metadata format of the
* created working copy; @c NULL means the library's default
* format. See svn_client_default_wc_version(),
- * svn_client_supported_wc_formats().
+ * svn_client_get_wc_formats_supported().
* @param[in] ctx The standard client context, used for authentication and
* notification.
* @param[in] pool Used for any temporary allocation.
@@ -4402,7 +4402,7 @@ svn_client_cleanup(const char *dir,
* @a wc_format_version is the version number of the Subversion client
* that supports a given WC metadata format; @c NULL means the library's
* default format. See svn_client_default_wc_version(),
- * svn_client_supported_wc_formats().
+ * svn_client_get_wc_formats_supported().
*
* Use @a scratch_pool for any temporary allocations.
*
@@ -4446,24 +4446,16 @@ const svn_version_t *
svn_client_latest_wc_version(apr_pool_t *result_pool);
/**
- * Information about a WC version.
+ * Returns a list of the WC formats supported by the client library.
*
- * Only the @c .major and @c .minor version fields are significant: so a
- * version_max value of 1.15.0 for example means "up to 1.15.x".
+ * The list is sorted from oldest to newest, and terminated by a zero entry.
*
- * @warning Do not manually allocate structs of this type, as fields may
- * be added in the future.
+ * The result is allocated in @a result_pool and/or statically.
*
* @since New in 1.15.
*/
-typedef struct svn_client_wc_format_t {
-/* Oldest version of svn libraries known to support this WC version */
-const svn_version_t *version_min;
-/* Newest version of svn libraries known to support this WC version. */
-const svn_version_t *version_max;
-/* The WC format number of this format, as defined by libsvn_wc. */
-int wc_format;
-} svn_client_wc_format_t;
+const int *
+svn_client_get_wc_formats_supported(apr_pool_t *result_pool);
/** Return the version of the Subversion library that first supported
* the given WC format, @a wc_format.
@@ -4471,23 +4463,8 @@ typedef struct svn_client_wc_format_t {
* @since New in 1.15.
*/
const svn_version_t *
-svn_client__wc_version_from_format(int wc_format,
- apr_pool_t *result_pool,
- apr_pool_t *scratch_pool);
-
-/**
- * Returns a list of the WC formats supported by the client library.
- *
- * The list is sorted from oldest to newest, and terminated by an entry
- * containing all null/zero fields.
- *
- * The returned data are allocated in @a result_pool and/or statically.
- *
- * @since New in 1.15.
- */
-const svn_client_wc_format_t *
-svn_client_supported_wc_formats(apr_pool_t *result_pool,
-apr_pool_t *scratch_pool);
+svn_client_wc_version_from_format(int wc_format,
+ apr_pool_t *result_pool);
/** @} */
Modified: subversion/trunk/subversion/libsvn_client/upgrade.c
URL:
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/upgrade.c?rev=1898525=1898524=1898525=diff
==
--- subversion/trunk/subversion/libsvn_client/upgrade.c (original)
+++