You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by iv...@apache.org on 2013/01/23 12:55:27 UTC
svn commit: r1437354 - /subversion/trunk/subversion/tests/svn_test_fs.c
Author: ivan
Date: Wed Jan 23 11:55:27 2013
New Revision: 1437354
URL: http://svn.apache.org/viewvc?rev=1437354&view=rev
Log:
When removing old repositories before re-creating them for tests, we don't
need to be clean about it, so just recursively remove the directory.
* subversion/tests/svn_test_fs.c
(svn_test__create_repos): Just remove the target directory, rather than
just the repository.
Modified:
subversion/trunk/subversion/tests/svn_test_fs.c
Modified: subversion/trunk/subversion/tests/svn_test_fs.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/svn_test_fs.c?rev=1437354&r1=1437353&r2=1437354&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/svn_test_fs.c (original)
+++ subversion/trunk/subversion/tests/svn_test_fs.c Wed Jan 23 11:55:27 2013
@@ -213,7 +213,10 @@ svn_test__create_repos(svn_repos_t **rep
if (apr_stat(&finfo, name, APR_FINFO_TYPE, pool) == APR_SUCCESS)
{
if (finfo.filetype == APR_DIR)
- SVN_ERR(svn_repos_delete(name, pool));
+ SVN_ERR_W(svn_io_remove_dir2(name, TRUE, NULL, NULL, pool),
+ apr_psprintf(pool,
+ "cannot create repos '%s' there is already "
+ "a directory of that name", name));
else
return svn_error_createf(SVN_ERR_TEST_FAILED, NULL,
"there is already a file named '%s'", name);
Re: svn commit: r1437354 - /subversion/trunk/subversion/tests/svn_test_fs.c
Posted by Ivan Zhakov <iv...@visualsvn.com>.
On Wed, Jan 23, 2013 at 4:42 PM, Philip Martin
<ph...@wandisco.com> wrote:
>> Log:
>> When removing old repositories before re-creating them for tests, we don't
>> need to be clean about it, so just recursively remove the directory.
>>
>> * subversion/tests/svn_test_fs.c
>> (svn_test__create_repos): Just remove the target directory, rather than
>> just the repository.
>>
[.. ]
>> if (finfo.filetype == APR_DIR)
>> - SVN_ERR(svn_repos_delete(name, pool));
>> + SVN_ERR_W(svn_io_remove_dir2(name, TRUE, NULL, NULL, pool),
>> + apr_psprintf(pool,
>> + "cannot create repos '%s' there is already "
>> + "a directory of that name", name));
>> else
>> return svn_error_createf(SVN_ERR_TEST_FAILED, NULL,
>> "there is already a file named '%s'", name);
>>
>>
>
> That was the only call to svn_repos_delete in the testsuite. We should
> have a proper regression test.
>
Done in r1437414.
--
Ivan Zhakov
Re: svn commit: r1437354 - /subversion/trunk/subversion/tests/svn_test_fs.c
Posted by Philip Martin <ph...@wandisco.com>.
ivan@apache.org writes:
> Author: ivan
> Date: Wed Jan 23 11:55:27 2013
> New Revision: 1437354
>
> URL: http://svn.apache.org/viewvc?rev=1437354&view=rev
> Log:
> When removing old repositories before re-creating them for tests, we don't
> need to be clean about it, so just recursively remove the directory.
>
> * subversion/tests/svn_test_fs.c
> (svn_test__create_repos): Just remove the target directory, rather than
> just the repository.
>
> Modified:
> subversion/trunk/subversion/tests/svn_test_fs.c
>
> Modified: subversion/trunk/subversion/tests/svn_test_fs.c
> URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/svn_test_fs.c?rev=1437354&r1=1437353&r2=1437354&view=diff
> ==============================================================================
> --- subversion/trunk/subversion/tests/svn_test_fs.c (original)
> +++ subversion/trunk/subversion/tests/svn_test_fs.c Wed Jan 23 11:55:27 2013
> @@ -213,7 +213,10 @@ svn_test__create_repos(svn_repos_t **rep
> if (apr_stat(&finfo, name, APR_FINFO_TYPE, pool) == APR_SUCCESS)
> {
> if (finfo.filetype == APR_DIR)
> - SVN_ERR(svn_repos_delete(name, pool));
> + SVN_ERR_W(svn_io_remove_dir2(name, TRUE, NULL, NULL, pool),
> + apr_psprintf(pool,
> + "cannot create repos '%s' there is already "
> + "a directory of that name", name));
> else
> return svn_error_createf(SVN_ERR_TEST_FAILED, NULL,
> "there is already a file named '%s'", name);
>
>
That was the only call to svn_repos_delete in the testsuite. We should
have a proper regression test.
--
Certified & Supported Apache Subversion Downloads:
http://www.wandisco.com/subversion/download