You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by ju...@apache.org on 2011/05/26 15:31:42 UTC

svn commit: r1127902 - /subversion/trunk/subversion/libsvn_wc/wc_db.c

Author: julianfoad
Date: Thu May 26 13:31:41 2011
New Revision: 1127902

URL: http://svn.apache.org/viewvc?rev=1127902&view=rev
Log:
Make all WC test programs use svn_wc__db_util_open_db() instead of calling
svn_sqlite__open() directly, to ensure that the SQLite user-defined function
'relpath_depth' gets installed in the DB connection.  That function will be
needed by the validation triggers in wc-checks.c as soon as we activate
them.

* subversion/libsvn_wc/wc_db_private.h,
  subversion/libsvn_wc/wc_db_util.c
  (svn_wc__db_util_open_db): Add an optional parameter to specify the list
    of statements to prepare instead of the default set. Write a doc string.

* subversion/libsvn_wc/wc_db.c
  (create_db): Update the call to svn_wc__db_util_open_db().

* subversion/libsvn_wc/wc_db_wcroot.c
  (svn_wc__db_wcroot_parse_local_abspath): Same.

* subversion/tests/libsvn_wc/db-test.c
  (create_fake_wc): Call svn_wc__db_wcroot_parse_local_abspath() instead of
    svn_sqlite__open().

* subversion/tests/libsvn_wc/entries-compat.c
  (make_one_db): Same.

* subversion/tests/libsvn_wc/op-depth-test.c
  (open_wc_db): Same.

Modified:
    subversion/trunk/subversion/libsvn_wc/wc_db.c

Modified: subversion/trunk/subversion/libsvn_wc/wc_db.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/wc_db.c?rev=1127902&r1=1127901&r2=1127902&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/wc_db.c (original)
+++ subversion/trunk/subversion/libsvn_wc/wc_db.c Thu May 26 13:31:41 2011
@@ -1371,8 +1371,9 @@ create_db(svn_sqlite__db_t **sdb,
   svn_sqlite__stmt_t *stmt;
 
   SVN_ERR(svn_wc__db_util_open_db(sdb, dir_abspath, sdb_fname,
-                                  svn_sqlite__mode_rwcreate, result_pool,
-                                  scratch_pool));
+                                  svn_sqlite__mode_rwcreate,
+                                  NULL /* my_statements */,
+                                  result_pool, scratch_pool));
 
   /* Create the database's schema.  */
   SVN_ERR(svn_sqlite__exec_statements(*sdb, STMT_CREATE_SCHEMA));