Author: philip
Date: Tue Nov 27 13:35:31 2012
New Revision: 1414181

URL: http://svn.apache.org/viewvc?rev=1414181&view=rev
Log:
Handle a limitaion of svn_fs_delete_fs.

* subversion/include/svn_fs.h
  (svn_fs_delete_fs): Document a limitation.

* subversion/tests/libsvn_fs/fs-test.c
  (delete_fs): Use a subpool.

Modified:
    subversion/trunk/subversion/include/svn_fs.h
    subversion/trunk/subversion/tests/libsvn_fs/fs-test.c

Modified: subversion/trunk/subversion/include/svn_fs.h
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/include/svn_fs.h?rev=1414181&r1=1414180&r2=1414181&view=diff
==============================================================================
--- subversion/trunk/subversion/include/svn_fs.h (original)
+++ subversion/trunk/subversion/include/svn_fs.h Tue Nov 27 13:35:31 2012
@@ -320,6 +320,10 @@ svn_fs_path(svn_fs_t *fs,
 /**
  * Delete the filesystem at @a path.
  *
+ * @note: Deleting a filesystem that has an open svn_fs_t is not
+ * supported.  Clear/destroy all pools used to create/open @a path.
+ * See issue 4264.
+ *
  * @since New in 1.1.
  */
 svn_error_t *

Modified: subversion/trunk/subversion/tests/libsvn_fs/fs-test.c
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/libsvn_fs/fs-test.c?rev=1414181&r1=1414180&r2=1414181&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/libsvn_fs/fs-test.c (original)
+++ subversion/trunk/subversion/tests/libsvn_fs/fs-test.c Tue Nov 27 13:35:31 
2012
@@ -4901,12 +4901,19 @@ static svn_error_t *
 delete_fs(const svn_test_opts_t *opts,
              apr_pool_t *pool)
 {
-  svn_fs_t *fs;
   const char *path;
   svn_node_kind_t kind;
 
-  SVN_ERR(svn_test__create_fs(&fs, "test-repo-delete-fs", opts, pool));
-  path = svn_fs_path(fs, pool);
+  /* We have to use a subpool to close the svn_fs_t before calling
+     svn_fs_delete_fs.  See issue 4264. */
+  {
+    svn_fs_t *fs;
+    apr_pool_t *subpool = svn_pool_create(pool);
+    SVN_ERR(svn_test__create_fs(&fs, "test-repo-delete-fs", opts, subpool));
+    path = svn_fs_path(fs, pool);
+    svn_pool_destroy(subpool);
+  }
+
   SVN_ERR(svn_io_check_path(path, &kind, pool));
   SVN_TEST_ASSERT(kind != svn_node_none);
   SVN_ERR(svn_fs_delete_fs(path, pool));


Reply via email to