[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Separating deprecated code.

From: Philip Martin <philip.martin_at_wandisco.com>
Date: Mon, 03 Jun 2013 12:09:18 +0100

Branko Čibej <brane_at_apache.org> writes:

> On 03.06.2013 11:30, Bert Huijben wrote:
>> This function is also used from deprecated code in libsvn_cliënt and
>> some binding code, unlike most other deprecated code...
>>
>> In some ways this code is 'a bit less deprecated' ;-)
>
> And anyway, only public APIs can be deprecated. Private APIs are either
> kept or removed as necessary.

We don't currently have any private deprecated APIs but that's just
because we haven't yet needed any. If I move svn_wc__get_tree_conflict
and svn_wc__status2_from_3 to libsvn_wc/deprecated.c the only problem
with adding deprecated markers is where the testsuite calls one of the
functions:

Index: ../src/subversion/include/private/svn_wc_private.h
===================================================================
--- ../src/subversion/include/private/svn_wc_private.h (revision 1488952)
+++ ../src/subversion/include/private/svn_wc_private.h (working copy)
@@ -292,6 +292,7 @@
  * used to access @a victim_path. Allocate @a *tree_conflict in @a result_pool,
  * use @a scratch_pool for temporary allocations.
  */
+SVN_DEPRECATED
 svn_error_t *
 svn_wc__get_tree_conflict(const svn_wc_conflict_description2_t **tree_conflict,
                           svn_wc_context_t *wc_ctx,
@@ -371,6 +372,7 @@
  * Convert from svn_wc_status3_t to svn_wc_status2_t.
  * Allocate the result in RESULT_POOL.
  */
+SVN_DEPRECATED
 svn_error_t *
 svn_wc__status2_from_3(svn_wc_status2_t **status,
                        const svn_wc_status3_t *old_status,

Index: ../src/subversion/tests/libsvn_wc/conflict-data-test.c
===================================================================
--- ../src/subversion/tests/libsvn_wc/conflict-data-test.c (revision 1488952)
+++ ../src/subversion/tests/libsvn_wc/conflict-data-test.c (working copy)
@@ -23,6 +23,8 @@
  * conflict-data-test.c -- test the storage of tree conflict data
  */
 
+#define SVN_DEPRECATED
+
 #include <stdio.h>
 #include <string.h>
 #include <apr_hash.h>
@@ -339,6 +341,7 @@
   {
     const svn_wc_conflict_description2_t *read_conflict;
 
+ /* SVN_DEPRECATED API. */
     SVN_ERR(svn_wc__get_tree_conflict(&read_conflict, sbox.wc_ctx,
                                       child1_abspath, pool, pool));
     SVN_ERR(compare_conflict(read_conflict, conflict1));

-- 
Certified & Supported Apache Subversion Downloads:
http://www.wandisco.com/subversion/download
Received on 2013-06-03 13:09:56 CEST

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.