Just a heads up for those running the trunk client: r39740 bumped the
format to version 14, and it will do an auto upgrade. So if you use
mixed clients, consider yourself warned.
-Hyrum
On Oct 1, 2009, at 11:17 AM, Hyrum K. Wright wrote:
> Author: hwright
> Date: Thu Oct 1 08:17:49 2009
> New Revision: 39740
>
> Log:
> Bump the wc_db format to 14, moving the physical locks files into an
> sqlite table.
>
> * subversion/tests/libsvn_wc/db-test.c
> (data_loading_sql): Add the format 14 sql.
> (test_upgrading_to_f13): Rename to...
> (test_upgrading_to_f14): ...this, since we have to upgrade through
> f13 to
> get to f14, we don't lose any test coverage here.
> (test_funcs): Update test name.
>
> * subversion/tests/cmdline/upgrade_tests.py
> (get_current_format): Update with the now-current f14.
>
> * subversion/tests/cmdline/svntest/actions.py
> (lock_admin_dir): Apply the lock into the sdb, rather than dropping
> a lock
> file.
>
> * subversion/libsvn_wc/wc.h
> (SVN_WC__VERSION): Bump to 14.
> (SVN_WC__PHYSICAL_LOCK_FILE): New.
>
> * subversion/libsvn_wc/lock.c
> (create_lock): Remove.
> (adm_access_alloc): Call the wc_db lock functions, rather than
> dealing
> a physical lock.
> (close_single, svn_wc__adm_write_check): Same.
> (svn_wc_locked): Create a context, and use it to call into wc_db to
> inquire about locked status.
>
> * subversion/libsvn_wc/wc-queries.sql
> (STMT_INSERT_WC_LOCK, STMT_SELECT_WC_LOCK, STMT_DELETE_WC_LOCK): New.
>
> * subversion/libsvn_wc/wc-metadata.sql:
> Introduce new format 14 stuff, and keep the existing format 14
> columns.
>
> * subversion/libsvn_wc/wc_db.c
> (upgrade_sql): Add the format 14 upgrade sql.
> (svn_wc__db_wclock_set, svn_wc__db_wclocked,
> svn_wc__db_wclock_remove): New.
>
> * subversion/libsvn_wc/wc_db.h
> (svn_wc__db_wclock_set, svn_wc__db_wclocked,
> svn_wc__db_wclock_remove): New.
>
> * subversion/libsvn_wc/upgrade.c
> (create_physical_lock): New.
> (upgrade_to_wcng): Instead of using access batons to steal the
> write lock,
> just do it outselves. Also, lay manually insert the wc_lock row
> after
> creating the sdb.
> (migrate_locks): Move existing locks into the wc.db.
> (bump15_baton): Renamed from this...
> (bump14_baton): ...to this.
> (bump_database_to_15): Renamed from this...
> (bump_database_to_14): ...to this.
> (bump_to_15): Renamed from this...
> (bump_to_14): ...to this.
> (svn_wc__upgrade_sdb): Add a section for bumping to the new format
> 14.
>
> Modified:
> trunk/subversion/libsvn_wc/lock.c
> trunk/subversion/libsvn_wc/upgrade.c
> trunk/subversion/libsvn_wc/wc-metadata.sql
> trunk/subversion/libsvn_wc/wc-queries.sql
> trunk/subversion/libsvn_wc/wc.h
> trunk/subversion/libsvn_wc/wc_db.c
> trunk/subversion/libsvn_wc/wc_db.h
> trunk/subversion/tests/cmdline/svntest/actions.py
> trunk/subversion/tests/cmdline/upgrade_tests.py
> trunk/subversion/tests/libsvn_wc/db-test.c
>
> Modified: trunk/subversion/libsvn_wc/lock.c
> URL: http://svn.collab.net/viewvc/svn/trunk/subversion/libsvn_wc/lock.c?pathrev=39740&r1=39739&r2=39740
> =
> =
> =
> =
> =
> =
> =
> =
> ======================================================================
> --- trunk/subversion/libsvn_wc/lock.c Thu Oct 1 07:59:50 2009
> (r39739)
> +++ trunk/subversion/libsvn_wc/lock.c Thu Oct 1 08:17:49 2009
> (r39740)
> @@ -161,34 +161,6 @@ svn_wc_check_wc2(int *wc_format,
> }
>
>
> -/* Create a physical lock file in the admin directory for
> ADM_ACCESS. */
> -static svn_error_t *
> -create_lock(const char *path, apr_pool_t *scratch_pool)
> -{
> - const char *lock_path = svn_wc__adm_child(path, SVN_WC__ADM_LOCK,
> - scratch_pool);
> - svn_error_t *err;
> - apr_file_t *file;
> -
> - err = svn_io_file_open(&file, lock_path,
> - APR_WRITE | APR_CREATE | APR_EXCL,
> - APR_OS_DEFAULT,
> - scratch_pool);
> - if (err == NULL)
> - return svn_io_file_close(file, scratch_pool);
> -
> - if (APR_STATUS_IS_EEXIST(err->apr_err))
> - {
> - svn_error_clear(err);
> - return svn_error_createf(SVN_ERR_WC_LOCKED, NULL,
> - _("Working copy '%s' locked"),
> - svn_dirent_local_style(path,
> scratch_pool));
> - }
> -
> - return err;
> -}
> -
> -
> /* An APR pool cleanup handler. This handles access batons that
> have not
> been closed when their pool gets destroyed. The physical locks
> associated with such batons remain in the working copy if they are
> @@ -259,7 +231,7 @@ adm_access_alloc(svn_wc_adm_access_t **a
>
> if (type == svn_wc__adm_access_write_lock)
> {
> - err = create_lock(path, scratch_pool);
> + err = svn_wc__db_wclock_set(db, lock->abspath, scratch_pool);
>
> if (err)
> {
> @@ -277,8 +249,7 @@ adm_access_alloc(svn_wc_adm_access_t **a
> if (err)
> return svn_error_compose_create(
> err,
> - svn_wc__remove_adm_file(lock->abspath,
> SVN_WC__ADM_LOCK,
> - scratch_pool));
> + svn_wc__db_lock_remove(db, lock->abspath,
> scratch_pool));
>
> /* ### does this utf8 thing really/still apply?? */
> /* It's important that the cleanup handler is registered *after*
> at least
> @@ -481,9 +452,9 @@ close_single(svn_wc_adm_access_t *adm_ac
> from the working copy. It is an error for the lock to
> have disappeared if the administrative area still
> exists. */
>
> - svn_error_t *err = svn_wc__remove_adm_file(adm_access-
> >path,
> -
> SVN_WC__ADM_LOCK,
> - scratch_pool);
> + svn_error_t *err = svn_wc__db_wclock_remove(adm_access->db,
> + adm_access-
> >abspath,
> + scratch_pool);
> if (err)
> {
> if (svn_wc__adm_area_exists(adm_access, scratch_pool))
> @@ -1404,7 +1375,8 @@ svn_wc__adm_write_check(const svn_wc_adm
> check. */
> svn_boolean_t locked;
>
> - SVN_ERR(svn_wc_locked(&locked, adm_access->path,
> scratch_pool));
> + SVN_ERR(svn_wc__db_wclocked(&locked, adm_access->db,
> + adm_access->abspath,
> scratch_pool));
> if (! locked)
> return svn_error_createf(SVN_ERR_WC_NOT_LOCKED, NULL,
> _("Write-lock stolen in '%s'"),
> @@ -1426,20 +1398,14 @@ svn_wc__adm_write_check(const svn_wc_adm
> svn_error_t *
> svn_wc_locked(svn_boolean_t *locked, const char *path, apr_pool_t
> *pool)
> {
> - svn_node_kind_t kind;
> - const char *lockfile = svn_wc__adm_child(path, SVN_WC__ADM_LOCK,
> pool);
> -
> - SVN_ERR(svn_io_check_path(lockfile, &kind, pool));
> - if (kind == svn_node_file)
> - *locked = TRUE;
> - else if (kind == svn_node_none)
> - *locked = FALSE;
> - else
> - return svn_error_createf(SVN_ERR_WC_LOCKED, NULL,
> - _("Lock file '%s' is not a regular
> file"),
> - svn_dirent_local_style(lockfile, pool));
> + const char *local_abspath;
> + svn_wc_context_t *wc_ctx;
>
> - return SVN_NO_ERROR;
> + SVN_ERR(svn_dirent_get_absolute(&local_abspath, path, pool));
> + SVN_ERR(svn_wc_context_create(&wc_ctx, NULL, pool, pool));
> + SVN_ERR(svn_wc__db_wclocked(locked, wc_ctx->db, local_abspath,
> pool));
> +
> + return svn_error_return(svn_wc_context_destroy(wc_ctx));
> }
>
>
>
> Modified: trunk/subversion/libsvn_wc/upgrade.c
> URL: http://svn.collab.net/viewvc/svn/trunk/subversion/libsvn_wc/upgrade.c?pathrev=39740&r1=39739&r2=39740
> =
> =
> =
> =
> =
> =
> =
> =
> ======================================================================
> --- trunk/subversion/libsvn_wc/upgrade.c Thu Oct 1 07:59:50 2009
> (r39739)
> +++ trunk/subversion/libsvn_wc/upgrade.c Thu Oct 1 08:17:49 2009
> (r39740)
> @@ -280,6 +280,31 @@ get_versioned_subdirs(apr_array_header_t
> }
>
>
> +/* Create a physical lock file in the admin directory for ABSPATH.
> */
> +static svn_error_t *
> +create_physical_lock(const char *abspath, apr_pool_t *scratch_pool)
> +{
> + const char *lock_abspath =
> + svn_dirent_join_many(scratch_pool, abspath, ".svn", "lock",
> NULL);
> + svn_error_t *err;
> + apr_file_t *file;
> +
> + err = svn_io_file_open(&file, lock_abspath,
> + APR_WRITE | APR_CREATE | APR_EXCL,
> + APR_OS_DEFAULT,
> + scratch_pool);
> +
> + if (err && APR_STATUS_IS_EEXIST(err->apr_err))
> + {
> + /* Congratulations, we just stole a physical lock from
> somebody */
> + svn_error_clear(err);
> + return SVN_NO_ERROR;
> + }
> +
> + return svn_error_return(err);
> +}
> +
> +
> /* Upgrade the working copy directory represented by DB/DIR_ABSPATH
> from OLD_FORMAT to the wc-ng format (SVN_WC__WC_NG_VERSION)'.
>
> @@ -291,7 +316,6 @@ upgrade_to_wcng(svn_wc__db_t *db,
> apr_pool_t *scratch_pool)
> {
> svn_boolean_t present;
> - svn_wc_adm_access_t *adm_access;
> apr_hash_t *entries;
> const svn_wc_entry_t *this_dir;
> svn_sqlite__db_t *sdb;
> @@ -306,8 +330,7 @@ upgrade_to_wcng(svn_wc__db_t *db,
> /* Lock this working copy directory, or steal an existing lock. Do
> this
> BEFORE we read the entries. We don't want another process to
> modify the
> entries after we've read them into memory. */
> - SVN_ERR(svn_wc__adm_steal_write_lock(&adm_access, db, dir_abspath,
> - scratch_pool, scratch_pool));
> + SVN_ERR(create_physical_lock(dir_abspath, scratch_pool));
>
> /* What's going on here?
> *
> @@ -336,6 +359,18 @@ upgrade_to_wcng(svn_wc__db_t *db,
> SVN_ERR(svn_wc__db_upgrade_begin(&sdb, dir_abspath,
> this_dir->repos, this_dir->uuid,
> scratch_pool, scratch_pool));
> + {
> + /* Unfortunately, we can't call the svn_wc__db_wclock_set() API
> just yet,
> + since the sdb isn't yet the right format. So we've got to
> do the lock
> + insertion manually. */
> + svn_sqlite__stmt_t *stmt;
> +
> + SVN_ERR(svn_sqlite__get_statement(&stmt, sdb,
> STMT_INSERT_WC_LOCK));
> + /* ### These values are magic, and will need to be updated when
> we
> + ### go to a centralized system. */
> + SVN_ERR(svn_sqlite__bindf(stmt, "is", 1, ""));
> + SVN_ERR(svn_sqlite__step_done(stmt));
> + }
>
> /* Migrate the entries over to the new database.
> ### We need to think about atomicity here.
> @@ -413,7 +448,13 @@ upgrade_to_wcng(svn_wc__db_t *db,
> /* All subdir access batons (and locks!) will be closed. Of
> course, they
> should have been closed/unlocked just after their own upgrade
> process
> has run. */
> - SVN_ERR(svn_wc_adm_close2(adm_access, scratch_pool));
> + /* ### well, actually.... we don't recursively delete subdir
> locks here,
> + ### we rely upon their own upgrade processes to do it. */
> + SVN_ERR(svn_wc__db_wclock_remove(db, dir_abspath, scratch_pool));
> + SVN_ERR(svn_io_remove_file2(svn_dirent_join_many(scratch_pool,
> dir_abspath,
> + ".svn", "lock",
> NULL),
> + FALSE,
> + scratch_pool));
>
> /* ### need to (eventually) delete the .svn subdir. */
>
> @@ -660,40 +701,67 @@ migrate_tree_conflicts(svn_sqlite__db_t
> }
>
>
> -struct bump14_baton {
> +static svn_error_t *
> +migrate_locks(const char *wcroot_abspath,
> + svn_sqlite__db_t *sdb,
> + apr_pool_t *scratch_pool)
> +{
> + const char *lockfile_abspath =
> + svn_dirent_join_many(scratch_pool, wcroot_abspath, ".svn",
> "lock",
> + NULL);
> + svn_node_kind_t kind;
> +
> + SVN_ERR(svn_io_check_path(lockfile_abspath, &kind, scratch_pool));
> + if (kind != svn_node_none)
> + {
> + svn_sqlite__stmt_t *stmt;
> + SVN_ERR(svn_sqlite__get_statement(&stmt, sdb,
> STMT_INSERT_WC_LOCK));
> + /* ### These values are magic, and will need to be updated
> when we
> + ### go to a centralized system. */
> + SVN_ERR(svn_sqlite__bindf(stmt, "is", 1, ""));
> + SVN_ERR(svn_sqlite__step_done(stmt));
> +
> + SVN_ERR(svn_io_remove_file2(lockfile_abspath, FALSE,
> scratch_pool));
> + }
> +
> + return SVN_NO_ERROR;
> +}
> +
> +
> +struct bump15_baton {
> apr_pool_t *scratch_pool;
> };
>
>
> /* This implements svn_sqlite__transaction_callback_t */
> static svn_error_t *
> -bump_database_to_14(void *baton,
> +bump_database_to_15(void *baton,
> svn_sqlite__db_t *sdb)
> {
> - struct bump14_baton *bb = baton;
> + struct bump15_baton *bb = baton;
>
> SVN_ERR(migrate_tree_conflicts(sdb, bb->scratch_pool));
>
> /* NOTE: this *is* transactional, so the version will not be bumped
> unless our overall transaction is committed. */
> - SVN_ERR(svn_sqlite__set_schema_version(sdb, 14, bb->scratch_pool));
> + SVN_ERR(svn_sqlite__set_schema_version(sdb, 15, bb->scratch_pool));
>
> return SVN_NO_ERROR;
> }
>
>
> static svn_error_t *
> -bump_to_14(const char *wcroot_abspath,
> +bump_to_15(const char *wcroot_abspath,
> svn_sqlite__db_t *sdb,
> apr_pool_t *scratch_pool)
> {
> - struct bump14_baton bb = { scratch_pool };
> + struct bump15_baton bb = { scratch_pool };
>
> /* ### migrate disk bits here. */
>
> /* Perform the database upgrade. The last thing this does is to bump
> - the recorded version to 14. */
> - SVN_ERR(svn_sqlite__with_transaction(sdb, bump_database_to_14,
> &bb));
> + the recorded version to 15. */
> + SVN_ERR(svn_sqlite__with_transaction(sdb, bump_database_to_15,
> &bb));
>
> return SVN_NO_ERROR;
> }
> @@ -720,10 +788,17 @@ svn_wc__upgrade_sdb(int *result_format,
> ++start_format;
> }
>
> -#if 0
> if (start_format == 13)
> {
> - SVN_ERR(bump_to_14(wcroot_abspath, sdb, scratch_pool));
> + SVN_ERR(migrate_locks(wcroot_abspath, sdb, scratch_pool));
> + SVN_ERR(svn_sqlite__set_schema_version(sdb, 14, scratch_pool));
> + ++start_format;
> + }
> +
> +#if 0
> + if (start_format == 14)
> + {
> + SVN_ERR(bump_to_15(wcroot_abspath, sdb, scratch_pool));
> ++start_format;
> }
> #endif
>
> Modified: trunk/subversion/libsvn_wc/wc-metadata.sql
> URL: http://svn.collab.net/viewvc/svn/trunk/subversion/libsvn_wc/wc-metadata.sql?pathrev=39740&r1=39739&r2=39740
> =
> =
> =
> =
> =
> =
> =
> =
> ======================================================================
> --- trunk/subversion/libsvn_wc/wc-metadata.sql Thu Oct 1 07:59:50
> 2009 (r39739)
> +++ trunk/subversion/libsvn_wc/wc-metadata.sql Thu Oct 1 08:17:49
> 2009 (r39740)
> @@ -397,12 +397,21 @@ CREATE TABLE WORK_QUEUE (
> erase anything there. */
> UPDATE BASE_NODE SET incomplete_children=null, dav_cache=null;
>
> -
> /*
> ------------------------------------------------------------------------- */
>
> -/* Format 14 introduces new handling for conflict information. */
> +/* Format 14 introduces a table for storing wc locks, and
> additional columns
> + for storing conflict data in ACTUAL. */
> -- format: 14
>
> +/* The existence of a row in this table implies a write lock. */
> +CREATE TABLE WC_LOCK (
> + /* specifies the location of this node in the local filesystem */
> + wc_id INTEGER NOT NULL,
> + local_dir_relpath TEXT NOT NULL,
> +
> + PRIMARY KEY (wc_id, local_dir_relpath)
> + );
> +
> /* A skel containing the conflict details. */
> ALTER TABLE ACTUAL_NODE
> ADD COLUMN conflict_data BLOB;
> @@ -418,6 +427,12 @@ ADD COLUMN left_checksum TEXT;
> ALTER TABLE ACTUAL_NODE
> ADD COLUMN right_checksum TEXT;
>
> +/*
> ------------------------------------------------------------------------- */
> +
> +/* Format 15 introduces new handling for conflict information. */
> +-- format: 15
> +
> +
>
> /*
> ------------------------------------------------------------------------- */
>
>
> Modified: trunk/subversion/libsvn_wc/wc-queries.sql
> URL: http://svn.collab.net/viewvc/svn/trunk/subversion/libsvn_wc/wc-queries.sql?pathrev=39740&r1=39739&r2=39740
> =
> =
> =
> =
> =
> =
> =
> =
> ======================================================================
> --- trunk/subversion/libsvn_wc/wc-queries.sql Thu Oct 1 07:59:50
> 2009 (r39739)
> +++ trunk/subversion/libsvn_wc/wc-queries.sql Thu Oct 1 08:17:49
> 2009 (r39740)
> @@ -266,6 +266,18 @@ UPDATE ACTUAL_NODE SET
> prop_reject = null
> WHERE wc_id = ?1 AND local_relpath = ?2;
>
> +-- STMT_INSERT_WC_LOCK
> +INSERT INTO WC_LOCK (wc_id, local_dir_relpath)
> +VALUES (?1, ?2);
> +
> +-- STMT_SELECT_WC_LOCK
> +SELECT local_dir_relpath FROM WC_LOCK
> +WHERE wc_id = ?1 AND local_dir_relpath = ?2;
> +
> +-- STMT_DELETE_WC_LOCK
> +DELETE FROM WC_LOCK
> +WHERE wc_id = ?1 AND local_dir_relpath = ?2;
> +
>
> /*
> ------------------------------------------------------------------------- */
>
>
> Modified: trunk/subversion/libsvn_wc/wc.h
> URL: http://svn.collab.net/viewvc/svn/trunk/subversion/libsvn_wc/wc.h?pathrev=39740&r1=39739&r2=39740
> =
> =
> =
> =
> =
> =
> =
> =
> ======================================================================
> --- trunk/subversion/libsvn_wc/wc.h Thu Oct 1 07:59:50 2009 (r39739)
> +++ trunk/subversion/libsvn_wc/wc.h Thu Oct 1 08:17:49 2009 (r39740)
> @@ -101,12 +101,14 @@ extern "C" {
> * The change from 12 to 13 added the WORK_QUEUE table into 'wc.db',
> and
> * moved the wcprops into the 'dav_cache' column in BASE_NODE.
> *
> + * The change from 13 to 14 added the WCLOCKS table.
> + *
> * == 1.7.x shipped with format ???
> *
> * Please document any further format changes here.
> */
>
> -#define SVN_WC__VERSION 13
> +#define SVN_WC__VERSION 14
>
>
> /* A version <= this doesn't have property caching in the entries
> file. */
>
> Modified: trunk/subversion/libsvn_wc/wc_db.c
> URL: http://svn.collab.net/viewvc/svn/trunk/subversion/libsvn_wc/wc_db.c?pathrev=39740&r1=39739&r2=39740
> =
> =
> =
> =
> =
> =
> =
> =
> ======================================================================
> --- trunk/subversion/libsvn_wc/wc_db.c Thu Oct 1 07:59:50 2009
> (r39739)
> +++ trunk/subversion/libsvn_wc/wc_db.c Thu Oct 1 08:17:49 2009
> (r39740)
> @@ -204,7 +204,8 @@ static const char * const upgrade_sql[]
> NULL, NULL, NULL, NULL, NULL,
> NULL, NULL,
> WC_METADATA_SQL_12,
> - WC_METADATA_SQL_13
> + WC_METADATA_SQL_13,
> + WC_METADATA_SQL_14
> };
>
> WC_QUERIES_SQL_DECLARE_STATEMENTS(statements);
> @@ -5129,3 +5130,59 @@ svn_wc__db_temp_wcroot_tempdir(const cha
> result_pool);
> return SVN_NO_ERROR;
> }
> +
> +
> +svn_error_t *
> +svn_wc__db_wclock_set(svn_wc__db_t *db,
> + const char *local_abspath,
> + apr_pool_t *scratch_pool)
> +{
> + svn_sqlite__stmt_t *stmt;
> + svn_error_t *err;
> +
> + SVN_ERR(get_statement_for_path(&stmt, db, local_abspath,
> + STMT_INSERT_WC_LOCK, scratch_pool));
> + err = svn_sqlite__insert(NULL, stmt);
> + if (err)
> + return svn_error_createf(SVN_ERR_WC_LOCKED, err,
> + _("Working copy '%s' locked"),
> + svn_dirent_local_style(local_abspath,
> + scratch_pool));
> +
> + return SVN_NO_ERROR;
> +}
> +
> +
> +svn_error_t *
> +svn_wc__db_wclocked(svn_boolean_t *locked,
> + svn_wc__db_t *db,
> + const char *local_abspath,
> + apr_pool_t *scratch_pool)
> +{
> + svn_sqlite__stmt_t *stmt;
> + svn_boolean_t have_row;
> +
> + SVN_ERR(get_statement_for_path(&stmt, db, local_abspath,
> + STMT_SELECT_WC_LOCK, scratch_pool));
> + SVN_ERR(svn_sqlite__step(&have_row, stmt));
> + SVN_ERR(svn_sqlite__reset(stmt));
> +
> + *locked = have_row;
> +
> + return SVN_NO_ERROR;
> +}
> +
> +
> +svn_error_t *
> +svn_wc__db_wclock_remove(svn_wc__db_t *db,
> + const char *local_abspath,
> + apr_pool_t *scratch_pool)
> +{
> + svn_sqlite__stmt_t *stmt;
> +
> + SVN_ERR(get_statement_for_path(&stmt, db, local_abspath,
> + STMT_DELETE_WC_LOCK, scratch_pool));
> + SVN_ERR(svn_sqlite__step_done(stmt));
> +
> + return SVN_NO_ERROR;
> +}
>
> Modified: trunk/subversion/libsvn_wc/wc_db.h
> URL: http://svn.collab.net/viewvc/svn/trunk/subversion/libsvn_wc/wc_db.h?pathrev=39740&r1=39739&r2=39740
> =
> =
> =
> =
> =
> =
> =
> =
> ======================================================================
> --- trunk/subversion/libsvn_wc/wc_db.h Thu Oct 1 07:59:50 2009
> (r39739)
> +++ trunk/subversion/libsvn_wc/wc_db.h Thu Oct 1 08:17:49 2009
> (r39740)
> @@ -1715,6 +1715,24 @@ svn_wc__db_wq_completed(svn_wc__db_t *db
>
> /** @} */
>
> +
> +svn_error_t *
> +svn_wc__db_wclock_set(svn_wc__db_t *db,
> + const char *local_abspath,
> + apr_pool_t *scratch_pool);
> +
> +svn_error_t *
> +svn_wc__db_wclocked(svn_boolean_t *locked,
> + svn_wc__db_t *db,
> + const char *local_abspath,
> + apr_pool_t *scratch_pool);
> +
> +svn_error_t *
> +svn_wc__db_wclock_remove(svn_wc__db_t *db,
> + const char *local_abspath,
> + apr_pool_t *scratch_pool);
> +
> +
> /**
> * @defgroup svn_wc__db_temp Various temporary functions during
> transition
> *
>
> Modified: trunk/subversion/tests/cmdline/svntest/actions.py
> URL: http://svn.collab.net/viewvc/svn/trunk/subversion/tests/cmdline/svntest/actions.py?pathrev=39740&r1=39739&r2=39740
> =
> =
> =
> =
> =
> =
> =
> =
> ======================================================================
> --- trunk/subversion/tests/cmdline/svntest/actions.py Thu Oct 1
> 07:59:50 2009 (r39739)
> +++ trunk/subversion/tests/cmdline/svntest/actions.py Thu Oct 1
> 08:17:49 2009 (r39740)
> @@ -1545,8 +1545,12 @@ def remove_admin_tmp_dir(wc_dir):
> def lock_admin_dir(wc_dir):
> "Lock a SVN administrative directory"
>
> - path = os.path.join(wc_dir, main.get_admin_name(), 'lock')
> - main.file_append(path, "stop looking!")
> + db = svntest.sqlite3.connect(os.path.join(wc_dir,
> main.get_admin_name(),
> + 'wc.db'))
> + db.execute('insert into wc_lock (wc_id, local_dir_relpath) values
> (?, ?)',
> + (1, ''))
> + db.commit()
> + db.close()
>
> def get_wc_uuid(wc_dir):
> "Return the UUID of the working copy at WC_DIR."
>
> Modified: trunk/subversion/tests/cmdline/upgrade_tests.py
> URL: http://svn.collab.net/viewvc/svn/trunk/subversion/tests/cmdline/upgrade_tests.py?pathrev=39740&r1=39739&r2=39740
> =
> =
> =
> =
> =
> =
> =
> =
> ======================================================================
> --- trunk/subversion/tests/cmdline/upgrade_tests.py Thu Oct 1
> 07:59:50 2009 (r39739)
> +++ trunk/subversion/tests/cmdline/upgrade_tests.py Thu Oct 1
> 08:17:49 2009 (r39740)
> @@ -43,7 +43,7 @@ wc_is_too_old_regex = (".*Working copy f
>
> def get_current_format():
> ### parse this from libsvn_wc/wc.h
> - return 13
> + return 14
>
>
> def replace_sbox_with_tarfile(sbox, tar_filename):
>
> 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=39740&r1=39739&r2=39740
> =
> =
> =
> =
> =
> =
> =
> =
> ======================================================================
> --- trunk/subversion/tests/libsvn_wc/db-test.c Thu Oct 1 07:59:50
> 2009 (r39739)
> +++ trunk/subversion/tests/libsvn_wc/db-test.c Thu Oct 1 08:17:49
> 2009 (r39740)
> @@ -304,7 +304,8 @@ static const char * const data_loading_s
> "'" I_TC_DATA "');"
> ),
>
> - WC_METADATA_SQL_13
> + WC_METADATA_SQL_13,
> + WC_METADATA_SQL_14
> };
>
>
> @@ -1261,9 +1262,9 @@ test_global_relocate(apr_pool_t *pool)
>
>
> static svn_error_t *
> -test_upgrading_to_f13(apr_pool_t *pool)
> +test_upgrading_to_f14(apr_pool_t *pool)
> {
> - SVN_ERR(create_fake_wc("test_f13_upgrade", 13, pool));
> + SVN_ERR(create_fake_wc("test_f14_upgrade", 14, pool));
>
> return SVN_NO_ERROR;
> }
> @@ -1358,8 +1359,8 @@ struct svn_test_descriptor_t test_funcs[
> "deletion introspection functions"),
> SVN_TEST_PASS2(test_global_relocate,
> "relocating a node"),
> - SVN_TEST_PASS2(test_upgrading_to_f13,
> - "upgrading to format 13"),
> + SVN_TEST_PASS2(test_upgrading_to_f14,
> + "upgrading to format 14"),
> SVN_TEST_PASS2(test_work_queue,
> "work queue processing"),
> SVN_TEST_NULL
>
> ------------------------------------------------------
> http://subversion.tigris.org/ds/viewMessage.do?dsForumId=495&dsMessageId=2402565
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2402660
Received on 2009-10-01 21:35:17 CEST