Author: philip
Date: Thu Jul 29 14:37:58 2010
New Revision: 980454

URL: http://svn.apache.org/viewvc?rev=980454&view=rev
Log:
This makes the test pass in single-db but shows a limitation of the
legacy 1.6 support.

* subversion/tests/libsvn_client/client-test.c
  (test_wc_add_scenarios): Destroy/recreate wc context.

Modified:
    subversion/trunk/subversion/tests/libsvn_client/client-test.c

Modified: subversion/trunk/subversion/tests/libsvn_client/client-test.c
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/libsvn_client/client-test.c?rev=980454&r1=980453&r2=980454&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/libsvn_client/client-test.c (original)
+++ subversion/trunk/subversion/tests/libsvn_client/client-test.c Thu Jul 29 
14:37:58 2010
@@ -470,6 +470,14 @@ test_wc_add_scenarios(const svn_test_opt
     SVN_ERR(svn_wc_adm_open3(&adm_access, NULL, wc_path, TRUE, -1, NULL, NULL,
                              pool));
 
+    /* ### The above svn_wc_adm_open3 creates a new svn_wc__db_t
+       ### instance.  The svn_wc_add3 below doesn't work while the
+       ### original svn_wc__db_t created by svn_client_create_context
+       ### remains open.  Closing the wc-context gets around the
+       ### problem but is obviously a hack. */
+    SVN_ERR(svn_wc_context_destroy(ctx->wc_ctx));
+    SVN_ERR(svn_wc_context_create(&ctx->wc_ctx, ctx->config, pool, pool));
+
     /* Fix up copy as add with history */
     SVN_ERR(svn_wc_add3(new_dir_path, adm_access, svn_depth_infinity,
                         repos_url, committed_rev, NULL, NULL, NULL, NULL,


Reply via email to