Author: julianfoad
Date: Wed Feb  9 09:55:07 2022
New Revision: 1897891

URL: http://svn.apache.org/viewvc?rev=1897891&view=rev
Log:
On the 'multi-wc-format' branch: add supported-format query functions.

* subversion/include/private/svn_wc_private.h,
  subversion/libsvn_wc/upgrade.c
  (svn_wc__is_supported_format,
   svn_wc__max_supported_format,
   svn_wc__min_supported_format): New.

Modified:
    
subversion/branches/multi-wc-format/subversion/include/private/svn_wc_private.h
    subversion/branches/multi-wc-format/subversion/libsvn_wc/upgrade.c

Modified: 
subversion/branches/multi-wc-format/subversion/include/private/svn_wc_private.h
URL: 
http://svn.apache.org/viewvc/subversion/branches/multi-wc-format/subversion/include/private/svn_wc_private.h?rev=1897891&r1=1897890&r2=1897891&view=diff
==============================================================================
--- 
subversion/branches/multi-wc-format/subversion/include/private/svn_wc_private.h 
(original)
+++ 
subversion/branches/multi-wc-format/subversion/include/private/svn_wc_private.h 
Wed Feb  9 09:55:07 2022
@@ -2193,6 +2193,24 @@ svn_wc__format_from_version(int *format,
                             apr_pool_t *scratch_pool);
 
 /**
+ * Return true iff @a format is a supported format.
+ */
+svn_boolean_t
+svn_wc__is_supported_format(int format);
+
+/**
+ * Return the highest WC format supported by this client.
+ */
+int
+svn_wc__max_supported_format(void);
+
+/**
+ * Return the lowest WC format supported by this client.
+ */
+int
+svn_wc__min_supported_format(void);
+
+/**
  * Set @a format to the format of the nearest parent working copy root of
  * @a local_abspath in @a wc_ctx, or to the oldest format of any root stored
  * there. If @a wc_ctx is empty, return the newset supported format.

Modified: subversion/branches/multi-wc-format/subversion/libsvn_wc/upgrade.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/multi-wc-format/subversion/libsvn_wc/upgrade.c?rev=1897891&r1=1897890&r2=1897891&view=diff
==============================================================================
--- subversion/branches/multi-wc-format/subversion/libsvn_wc/upgrade.c 
(original)
+++ subversion/branches/multi-wc-format/subversion/libsvn_wc/upgrade.c Wed Feb  
9 09:55:07 2022
@@ -1680,6 +1680,24 @@ svn_wc__format_from_version(int *format,
   return SVN_NO_ERROR;
 }
 
+svn_boolean_t
+svn_wc__is_supported_format(int format)
+{
+  return format >= SVN_WC__SUPPORTED_VERSION && format <= SVN_WC__VERSION;
+}
+
+int
+svn_wc__max_supported_format(void)
+{
+  return SVN_WC__VERSION;
+}
+
+int
+svn_wc__min_supported_format(void)
+{
+  return SVN_WC__SUPPORTED_VERSION;
+}
+
 svn_error_t *
 svn_wc__upgrade_sdb(int *result_format,
                     const char *wcroot_abspath,


Reply via email to