[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

RE: svn commit: r933938 - in /subversion/trunk: build.conf subversion/include/private/svn_sqlite.h subversion/libsvn_fs_fs/fs_fs.c subversion/libsvn_subr/sqlite.c subversion/libsvn_subr/sqlite.sql

From: Bert Huijben <bert_at_qqmail.nl>
Date: Wed, 14 Apr 2010 15:59:50 +0200

> -----Original Message-----
> From: philip_at_apache.org [mailto:philip_at_apache.org]
> Sent: woensdag 14 april 2010 15:06
> To: commits_at_subversion.apache.org
> Subject: svn commit: r933938 - in /subversion/trunk: build.conf
> subversion/include/private/svn_sqlite.h subversion/libsvn_fs_fs/fs_fs.c
> subversion/libsvn_subr/sqlite.c subversion/libsvn_subr/sqlite.sql
>
> Author: philip
> Date: Wed Apr 14 13:05:56 2010
> New Revision: 933938
>
> URL: http://svn.apache.org/viewvc?rev=933938&view=rev
> Log:
> Partial fix for issue 3596 (hotcopy and SQLite databases).
>
> * subversion/include/private/svn_sqlite.c (svn_sqlite__hotcopy): New.
>
> * subversion/libsvn_subr/sqlite.c (svn_sqlite__hotcopy): New.
>
> * subversion/libsvn_subr/sqlite.sql: New file.
>
> * build.conf (subr_sqlite): New.
>
> * subversion/libsvn_fs_fs/fs_fs.c
> (svn_fs_fs__hotcopy): Hotcopy rep cache, do it before the rev files.
>
> Added:
> subversion/trunk/subversion/libsvn_subr/sqlite.sql
> Modified:
> subversion/trunk/build.conf
> subversion/trunk/subversion/include/private/svn_sqlite.h
> subversion/trunk/subversion/libsvn_fs_fs/fs_fs.c
> subversion/trunk/subversion/libsvn_subr/sqlite.c
>
> Modified: subversion/trunk/build.conf
> URL:
> http://svn.apache.org/viewvc/subversion/trunk/build.conf?rev=933938&r1=
> 933937&r2=933938&view=diff
> ==========================================================
> ====================
> --- subversion/trunk/build.conf (original)
> +++ subversion/trunk/build.conf Wed Apr 14 13:05:56 2010
> @@ -380,6 +380,12 @@ type = sql-header
> path = subversion/libsvn_wc
> sources = wc-checks.sql
>
> +[subr_sqlite]
> +description = Subversion SQLite interface
> +type = sql-header
> +path = subversion/libsvn_subr
> +sources = sqlite.sql
> +
>
> # ----------------------------------------------------------------------------
> #
>
> Modified: subversion/trunk/subversion/include/private/svn_sqlite.h
> URL:
> http://svn.apache.org/viewvc/subversion/trunk/subversion/include/private
> /svn_sqlite.h?rev=933938&r1=933937&r2=933938&view=diff
> ==========================================================
> ====================
> --- subversion/trunk/subversion/include/private/svn_sqlite.h (original)
> +++ subversion/trunk/subversion/include/private/svn_sqlite.h Wed Apr 14
> 13:05:56 2010
> @@ -310,6 +310,12 @@ svn_sqlite__with_transaction(svn_sqlite_
> void *cb_baton, apr_pool_t *scratch_pool);
>
>
> +/* Hotcopy an SQLite database from SRC_PATH to DST_PATH. */
> +svn_error_t *
> +svn_sqlite__hotcopy(const char *src_path,
> + const char *dst_path,
> + apr_pool_t *scratch_pool);
> +
> #ifdef __cplusplus
> }
> #endif /* __cplusplus */
>
> Modified: subversion/trunk/subversion/libsvn_fs_fs/fs_fs.c
> URL:
> http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs_fs/fs
> _fs.c?rev=933938&r1=933937&r2=933938&view=diff
> ==========================================================
> ====================
> --- subversion/trunk/subversion/libsvn_fs_fs/fs_fs.c (original)
> +++ subversion/trunk/subversion/libsvn_fs_fs/fs_fs.c Wed Apr 14 13:05:56
> 2010
> @@ -1498,6 +1498,14 @@ svn_fs_fs__hotcopy(const char *src_path,
> /* Copy the config. */
> SVN_ERR(svn_io_dir_file_copy(src_path, dst_path, PATH_CONFIG, pool));
>
> + /* Copy the rep cache before copying the rev files to make sure all
> + cached references will be present in the copy. */
> + src_subdir = svn_dirent_join(src_path, REP_CACHE_DB_NAME, pool);
> + dst_subdir = svn_dirent_join(dst_path, REP_CACHE_DB_NAME, pool);
> + SVN_ERR(svn_io_check_path(src_subdir, &kind, pool));
> + if (kind == svn_node_file)
> + SVN_ERR(svn_sqlite__hotcopy(src_subdir, dst_subdir, pool));
> +
> /* Copy the min unpacked rev, and read its value. */
> if (format >= SVN_FS_FS__MIN_PACKED_FORMAT)
> {
> @@ -1658,12 +1666,6 @@ svn_fs_fs__hotcopy(const char *src_path,
> PATH_NODE_ORIGINS_DIR, TRUE, NULL,
> NULL, pool));
>
> - /* Now copy the rep cache. */
> - src_subdir = svn_dirent_join(src_path, REP_CACHE_DB_NAME, pool);
> - SVN_ERR(svn_io_check_path(src_subdir, &kind, pool));
> - if (kind == svn_node_file)
> - SVN_ERR(svn_io_dir_file_copy(src_path, dst_path,
> REP_CACHE_DB_NAME, pool));
> -
> /* Copy the txn-current file. */
> if (format >= SVN_FS_FS__MIN_TXN_CURRENT_FORMAT)
> SVN_ERR(svn_io_dir_file_copy(src_path, dst_path, PATH_TXN_CURRENT,
> pool));
>
> Modified: subversion/trunk/subversion/libsvn_subr/sqlite.c
> URL:
> http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_subr/sqli
> te.c?rev=933938&r1=933937&r2=933938&view=diff
> ==========================================================
> ====================
> --- subversion/trunk/subversion/libsvn_subr/sqlite.c (original)
> +++ subversion/trunk/subversion/libsvn_subr/sqlite.c Wed Apr 14 13:05:56
> 2010
> @@ -28,6 +28,7 @@
> #include "svn_io.h"
> #include "svn_dirent_uri.h"
> #include "svn_checksum.h"
> +#include "sqlite.h"

Why did you add this include?

A normal sqlite amalgamation has only sqlite3.c, sqlite3.h and sqlite3ext.h. This adds a dependency to another sqlite distribution format.

        Bert
Received on 2010-04-14 16:01:09 CEST

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.