Re: svn commit: r1905663 - in /subversion/branches/pristines-on-demand-on-mwf/subversion: include/ include/private/ libsvn_client/ libsvn_wc/

2022-12-01 Thread Evgeny Kotkov via commits
Daniel Sahlberg  writes:

>> +  /** @since New in 1.15 */
>> +  SVN_ERRDEF(SVN_ERR_WC_DEPRECATED_API_STORE_PRISTINE,
>> + SVN_ERR_WC_CATEGORY_START + 43,
>> + "This client was not updated to support working copies "
>> + "without local pristines")
>> +
>>/* fs errors */
>
> Is it really "This client"? It looks more to be based on the WC setting.

This new error should only occur when someone (a 3rd party client) uses the
deprecated API function for a working copy without pristines.

>From that point of view, I would say that the problem is in the client that is
still using the deprecated API and thus cannot properly handle such working
copies.

Also, the current message aims to be somewhat consistent with another existing
error for a case when a client is too old to read a newer working copy format:
 "This client is too old to work with the working copy […] (format 32)"

(After writing this, I realized that the "was not updated" part of the message
 may be misinterpreted as a requirement to update to the newer version of the
 software.  In r1905682, I slightly rephrased that part so that it would say:
   "This client uses a deprecated API that does not support working copies
without local pristines")


Thanks,
Evgeny Kotkov


Re: svn commit: r1905663 - in /subversion/branches/pristines-on-demand-on-mwf/subversion: include/ include/private/ libsvn_client/ libsvn_wc/

2022-12-01 Thread Daniel Sahlberg
Den tors 1 dec. 2022 kl 11:42 skrev :

> Author: kotkov
> Date: Thu Dec  1 10:42:41 2022
> New Revision: 1905663
>

[...]


> Modified:
> subversion/branches/pristines-on-demand-on-mwf/subversion/include/svn_error_codes.h
> URL:
> http://svn.apache.org/viewvc/subversion/branches/pristines-on-demand-on-mwf/subversion/include/svn_error_codes.h?rev=1905663=1905662=1905663=diff
>
> ==
> ---
> subversion/branches/pristines-on-demand-on-mwf/subversion/include/svn_error_codes.h
> (original)
> +++
> subversion/branches/pristines-on-demand-on-mwf/subversion/include/svn_error_codes.h
> Thu Dec  1 10:42:41 2022
> @@ -581,6 +581,12 @@ SVN_ERROR_START
>   SVN_ERR_WC_CATEGORY_START + 42,
>   "Incompatible working copy settings")
>
> +  /** @since New in 1.15 */
> +  SVN_ERRDEF(SVN_ERR_WC_DEPRECATED_API_STORE_PRISTINE,
> + SVN_ERR_WC_CATEGORY_START + 43,
> + "This client was not updated to support working copies "
> + "without local pristines")
> +
>/* fs errors */
>

Is it really "This client"? It looks more to be based on the WC setting.

Kind regards,
/Daniel


svn commit: r1905663 - in /subversion/branches/pristines-on-demand-on-mwf/subversion: include/ include/private/ libsvn_client/ libsvn_wc/

2022-12-01 Thread kotkov
Author: kotkov
Date: Thu Dec  1 10:42:41 2022
New Revision: 1905663

URL: http://svn.apache.org/viewvc?rev=1905663=rev
Log:
On the 'pristines-on-demand-on-mwf' branch: Bump libsvn_wc APIs that may
need to access pristine contents and adjust their deprecated versions so
that they would return an error for working copies without pristines.

Additionally, change the existing deprecated function that may need to
access pristines so that they would also return an error in such cases.

With this change, the deprecated functions will fail predictably — instead
of only failing on attempts to read a pristine that was not fetched during
any of the previous API calls.

* subversion/include/svn_error_codes.h
  (SVN_ERR_WC_DEPRECATED_API_STORE_PRISTINE): New error code.

* subversion/include/svn_wc.h
  (svn_wc_crawl_revisions6): New, revved from …
  (svn_wc_crawl_revisions5): …this function, which is now deprecated.
  (svn_wc_diff7): New, revved from …
  (svn_wc_diff6): …this function, which is now deprecated.
  (svn_wc_merge6): New, revved from …
  (svn_wc_merge5): …this function, which is now deprecated.
  (svn_wc_get_pristine_contents3): New, revved from …
  (svn_wc_get_pristine_contents2): …this function, which is now deprecated.
  (svn_wc_revert7): New, revved from …
  (svn_wc_revert6): …this function, which is now deprecated.
  (svn_wc_restore2): New, revved from …
  (svn_wc_restore): …this function, which is now deprecated.
  (svn_wc_transmit_text_deltas4): New, revved from …
  (svn_wc_transmit_text_deltas3): …this function, which is now deprecated.

* subversion/libsvn_wc/deprecated.c
  (svn_wc_crawl_revisions5,
   svn_wc_diff6,
   svn_wc_merge5,
   svn_wc_get_pristine_contents2,
   svn_wc_revert6,
   svn_wc_restore,
   svn_wc_transmit_text_deltas3): Now reside in this file.
   Check working copy settings and forward call to the newer version.

* subversion/libsvn_wc/adm_crawler.c
  (svn_wc_restore): Replace with …
  (svn_wc_restore2): …this new function.
  (svn_wc_crawl_revisions5): Replace with …
  (svn_wc_crawl_revisions6): …this new function.
  (svn_wc_transmit_text_deltas3): Replace with …
  (svn_wc_transmit_text_deltas4): …this new function.
  (report_revisions_and_depths): Update comment.

* subversion/libsvn_wc/adm_ops.c
  (svn_wc_get_pristine_copy_path): Make this existing deprecated function
   return an error for working copies without pristines.
  (svn_wc_get_pristine_contents2): Replace with …
  (svn_wc_get_pristine_contents3): …this new function.

* subversion/libsvn_wc/conflicts.c
  (svn_wc_resolved_conflict5): Make this existing deprecated function
   return an error for working copies without pristines.

* subversion/libsvn_wc/diff_local.c
  (svn_wc_diff6): Replace with …
  (svn_wc_diff7): …this new function.

* subversion/libsvn_wc/externals.c
  (svn_wc__crawl_file_external): Switch to a newer version of the API.

* subversion/libsvn_wc/merge.c
  (svn_wc_merge5): Replace with …
  (svn_wc_merge6): …this new function.
 
* subversion/libsvn_wc/revert.c
  (svn_wc_revert6): Replace with …
  (svn_wc_revert7): …this new function.

* subversion/libsvn_wc/wc.h
  (svn_wc__internal_merge,
   svn_wc__internal_transmit_text_deltas): Update docstrings.

* subversion/include/private/svn_wc_private.h
  (svn_wc__get_pristine_contents_by_checksum,
   svn_wc__get_diff_editor,
   svn_wc__diff7): Update docstrings.

* subversion/libsvn_client/cat.c
  (svn_client__get_normalized_stream): Switch to a newer version of the API.

* subversion/libsvn_client/commit_util.c
  (svn_client__do_commit): Switch to a newer version of the API.

* subversion/libsvn_client/conflicts.c
  (resolve_merge_incoming_added_file_text_update,
   resolve_merge_incoming_added_file_text_merge,
   resolve_merge_incoming_added_file_replace_and_merge,
   merge_added_files,
   resolve_update_incoming_added_dir_merge,
   resolve_incoming_move_file_text_merge,
   resolve_both_moved_file_text_merge,
   resolve_both_moved_dir_merge,
   resolve_both_moved_dir_move_merge,
   resolve_incoming_move_dir_merge,
   resolve_local_move_file_merge,
   resolve_both_moved_file_update_keep_local_move,
   resolve_both_moved_file_update_keep_incoming_move):
   Switch to newer versions of the API.

* subversion/libsvn_client/diff.c
  (diff_repos_wc): Switch to a newer version of the API.

* subversion/libsvn_client/export.c
  (export_node): Switch to a newer version of the API.

* subversion/libsvn_client/layout.c
  (svn_client__layout_list): Switch to a newer version of the API.

* subversion/libsvn_client/merge.c
  (merge_file_changed): Switch to a newer version of the API.

* subversion/libsvn_client/ra.c
  (svn_client__ra_provide_base): Switch to a newer version of the API.

* subversion/libsvn_client/revert.c
  (revert): Switch to a newer version of the API.

* subversion/libsvn_client/status.c
  (svn_client_status6): Switch to a newer version of the API.

* subversion/libsvn_client/switch.c
  (switch_internal): Switch to a newer version of the API.

*