You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by "Hyrum K. Wright" <hy...@hyrumwright.org> on 2009/05/28 12:21:00 UTC

Re: svn commit: r37873 - trunk/subversion/tests/libsvn_wc

Please revert this change.  As the comment you modified in r37874 says:
"Make sure SVN_DEPRECATED is defined as empty before including  
svn_path.h.  We don't want to trigger deprecation warnings by the  
tests of those funtions."

New code will test the new APIs, but old tests should still continue  
to work, even after the old APIs have been re-implemented as wrappers  
around the new APIs.  By leaving the deprecated function calls in the  
tests, we can ensure this is still true.

The correct fix to get rid of the warning is something similar to what  
is done in the other C tests for deprecated functions, by playing with  
SVN_DEPRECATED so that the warning isn't generated in the first  
place.  I leave the exact implementation as an exercise to the  
reader. :)

-Hyrum

On May 28, 2009, at 2:12 AM, Senthil Kumaran S wrote:

> Author: stylesen
> Date: Thu May 28 00:12:34 2009
> New Revision: 37873
>
> Log:
> * subversion/tests/libsvn_wc/db-test.c
>  (create_fake_wc): Fix deprecated warning of 'svn_io_remove_file'  
> usage.
>
> Modified:
>   trunk/subversion/tests/libsvn_wc/db-test.c
>
> Modified: trunk/subversion/tests/libsvn_wc/db-test.c
> URL: http://svn.collab.net/viewvc/svn/trunk/subversion/tests/libsvn_wc/db-test.c?pathrev=37873&r1=37872&r2=37873
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> ======================================================================
> --- trunk/subversion/tests/libsvn_wc/db-test.c	Wed May 27 21:33:14  
> 2009	(r37872)
> +++ trunk/subversion/tests/libsvn_wc/db-test.c	Thu May 28 00:12:34  
> 2009	(r37873)
> @@ -296,7 +296,7 @@ create_fake_wc(const char *subdir, apr_p
>   svn_sqlite__db_t *sdb;
>
>   SVN_ERR(svn_io_make_dir_recursively(dirpath, scratch_pool));
> -  svn_error_clear(svn_io_remove_file(dbpath, scratch_pool));
> +  svn_error_clear(svn_io_remove_file2(dbpath, FALSE, scratch_pool));
>   SVN_ERR(svn_sqlite__open(&sdb, dbpath, svn_sqlite__mode_rwcreate,  
> NULL,
>                            SVN_WC__VERSION,
>                            data_loading_sql, scratch_pool,  
> scratch_pool));
>
> ------------------------------------------------------
> http://subversion.tigris.org/ds/viewMessage.do?dsForumId=495&dsMessageId=2356054

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2356120

Re: svn commit: r37873 - trunk/subversion/tests/libsvn_wc

Posted by Senthil Kumaran S <se...@collab.net>.
Hyrum K. Wright wrote:
> Please revert this change.  As the comment you modified in r37874 says:

Done in r37886.

> The correct fix to get rid of the warning is something similar to what  
> is done in the other C tests for deprecated functions, by playing with  
> SVN_DEPRECATED so that the warning isn't generated in the first  
> place.  I leave the exact implementation as an exercise to the  
> reader. :)

Committed in r37887.

Thank You.
-- 
Senthil Kumaran S
http://www.stylesen.org/

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2356739

Re: svn commit: r37873 - trunk/subversion/tests/libsvn_wc

Posted by Greg Stein <gs...@gmail.com>.
Hunh? What are you talking about here?

This is a test for wc_db. It *should* go ahead and use the latest
svn_io functions. We aren't trying to test *those* in this test.

On Thu, May 28, 2009 at 14:21, Hyrum K. Wright<hy...@hyrumwright.org> wrote:
> Please revert this change.  As the comment you modified in r37874 says:
> "Make sure SVN_DEPRECATED is defined as empty before including
> svn_path.h.  We don't want to trigger deprecation warnings by the
> tests of those funtions."
>
> New code will test the new APIs, but old tests should still continue
> to work, even after the old APIs have been re-implemented as wrappers
> around the new APIs.  By leaving the deprecated function calls in the
> tests, we can ensure this is still true.
>
> The correct fix to get rid of the warning is something similar to what
> is done in the other C tests for deprecated functions, by playing with
> SVN_DEPRECATED so that the warning isn't generated in the first
> place.  I leave the exact implementation as an exercise to the
> reader. :)
>
> -Hyrum
>
> On May 28, 2009, at 2:12 AM, Senthil Kumaran S wrote:
>
>> Author: stylesen
>> Date: Thu May 28 00:12:34 2009
>> New Revision: 37873
>>
>> Log:
>> * subversion/tests/libsvn_wc/db-test.c
>>  (create_fake_wc): Fix deprecated warning of 'svn_io_remove_file'
>> usage.
>>
>> Modified:
>>   trunk/subversion/tests/libsvn_wc/db-test.c
>>
>> Modified: trunk/subversion/tests/libsvn_wc/db-test.c
>> URL: http://svn.collab.net/viewvc/svn/trunk/subversion/tests/libsvn_wc/db-test.c?pathrev=37873&r1=37872&r2=37873
>> =
>> =
>> =
>> =
>> =
>> =
>> =
>> =
>> ======================================================================
>> --- trunk/subversion/tests/libsvn_wc/db-test.c        Wed May 27 21:33:14
>> 2009  (r37872)
>> +++ trunk/subversion/tests/libsvn_wc/db-test.c        Thu May 28 00:12:34
>> 2009  (r37873)
>> @@ -296,7 +296,7 @@ create_fake_wc(const char *subdir, apr_p
>>   svn_sqlite__db_t *sdb;
>>
>>   SVN_ERR(svn_io_make_dir_recursively(dirpath, scratch_pool));
>> -  svn_error_clear(svn_io_remove_file(dbpath, scratch_pool));
>> +  svn_error_clear(svn_io_remove_file2(dbpath, FALSE, scratch_pool));
>>   SVN_ERR(svn_sqlite__open(&sdb, dbpath, svn_sqlite__mode_rwcreate,
>> NULL,
>>                            SVN_WC__VERSION,
>>                            data_loading_sql, scratch_pool,
>> scratch_pool));
>>
>> ------------------------------------------------------
>> http://subversion.tigris.org/ds/viewMessage.do?dsForumId=495&dsMessageId=2356054
>
> ------------------------------------------------------
> http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2356120
>

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2368820