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

Re: svn commit: r34502 - in trunk: . subversion/include subversion/libsvn_fs subversion/libsvn_fs_base subversion/libsvn_fs_fs subversion/libsvn_repos subversion/svnadmin subversion/tests/libsvn_fs_fs

From: Paul Burba <ptburba_at_gmail.com>
Date: Mon, 1 Dec 2008 14:18:40 -0500

On Mon, Dec 1, 2008 at 11:59 AM, <hwright_at_tigris.org> wrote:
> Author: hwright
> Date: Mon Dec 1 08:59:39 2008
> New Revision: 34502
>
> Log:
> Merge the fsfs-pack branch to trunk.
>
> For a complete log, please see log messages on the branch.
>
> Added:
> trunk/subversion/tests/libsvn_fs_fs/ (props changed)
> - copied from r34501, branches/fsfs-pack/subversion/tests/libsvn_fs_fs/
> Replaced:
> trunk/subversion/tests/libsvn_fs_fs/fs-pack-test.c
> - copied unchanged from r34501, branches/fsfs-pack/subversion/tests/libsvn_fs_fs/fs-pack-test.c
> Modified:
> trunk/ (props changed)
> trunk/build.conf
> trunk/subversion/include/svn_fs.h
> trunk/subversion/include/svn_repos.h
> trunk/subversion/libsvn_fs/fs-loader.c
> trunk/subversion/libsvn_fs/fs-loader.h
> trunk/subversion/libsvn_fs_base/fs.c
> trunk/subversion/libsvn_fs_fs/caching.c
> trunk/subversion/libsvn_fs_fs/fs.c
> trunk/subversion/libsvn_fs_fs/fs.h
> trunk/subversion/libsvn_fs_fs/fs_fs.c
> trunk/subversion/libsvn_fs_fs/fs_fs.h
> trunk/subversion/libsvn_fs_fs/structure
> trunk/subversion/libsvn_repos/fs-wrap.c
> trunk/subversion/svnadmin/main.c
>
> Merged:
> /branches/fsfs-pack:r33643-34501
>
> Modified: trunk/build.conf
> URL: http://svn.collab.net/viewvc/svn/trunk/build.conf?pathrev=34502&r1=34501&r2=34502
> ==============================================================================
> --- trunk/build.conf Mon Dec 1 08:31:28 2008 (r34501)
> +++ trunk/build.conf Mon Dec 1 08:59:39 2008 (r34502)
> @@ -3,7 +3,7 @@
> #
> ######################################################################
> #
> -# Copyright (c) 2000-2006 CollabNet. All rights reserved.
> +# Copyright (c) 2000-2008 CollabNet. All rights reserved.
> #
> # This software is licensed as described in the file COPYING, which
> # you should have received as part of this distribution. The terms
> @@ -611,6 +611,17 @@ libs = libsvn_test libsvn_fs libsvn_fs_b
> libsvn_subr apriconv apr
>
> # ----------------------------------------------------------------------------
> +# Tests for libsvn_fs_fs
> +[fs-pack-test]
> +description = Test fsfs packing in libsvn_fs_fs
> +type = exe
> +path = subversion/tests/libsvn_fs_fs
> +sources = fs-pack-test.c
> +install = test
> +libs = libsvn_test libsvn_fs libsvn_fs_fs libsvn_delta
> + libsvn_subr apriconv apr
> +
> +# ----------------------------------------------------------------------------
> # Tests for libsvn_fs
>
> [locks-test]
> @@ -963,7 +974,7 @@ libs = svn svnserve svnadmin svnlook svn
> type = project
> path = build/win32
> libs = __ALL__
> - fs-test fs-base-test skel-test key-test strings-reps-test changes-test locks-test
> + fs-test fs-base-test fs-fsfs-test skel-test key-test strings-reps-test changes-test locks-test
> repos-test
> checksum-test compat-test config-test hashdump-test mergeinfo-test opt-test path-test stream-test
> string-test time-test utf-test target-test error-test cache-test
>
> Modified: trunk/subversion/include/svn_fs.h
> URL: http://svn.collab.net/viewvc/svn/trunk/subversion/include/svn_fs.h?pathrev=34502&r1=34501&r2=34502
> ==============================================================================
> --- trunk/subversion/include/svn_fs.h Mon Dec 1 08:31:28 2008 (r34501)
> +++ trunk/subversion/include/svn_fs.h Mon Dec 1 08:59:39 2008 (r34502)
> @@ -2024,6 +2024,20 @@ svn_error_t *
> svn_fs_print_modules(svn_stringbuf_t *output,
> apr_pool_t *pool);
>
> +
> +/**
> + * Possibly update the filesystem located in the directory @a path
> + * to use disk space more efficiently.
> + *
> + * @since New in 1.6.
> + */
> +svn_error_t *
> +svn_fs_pack(const char *db_path,
> + svn_cancel_func_t cancel_func,
> + void *cancel_baton,
> + apr_pool_t *pool);
> +
> +
> /** @} */
>
> #ifdef __cplusplus
>
> Modified: trunk/subversion/include/svn_repos.h
> URL: http://svn.collab.net/viewvc/svn/trunk/subversion/include/svn_repos.h?pathrev=34502&r1=34501&r2=34502
> ==============================================================================
> --- trunk/subversion/include/svn_repos.h Mon Dec 1 08:31:28 2008 (r34501)
> +++ trunk/subversion/include/svn_repos.h Mon Dec 1 08:59:39 2008 (r34502)
> @@ -306,6 +306,20 @@ svn_repos_hotcopy(const char *src_path,
> svn_boolean_t clean_logs,
> apr_pool_t *pool);
>
> +
> +/**
> + * Possibly update the repository, @a repos, to use a more efficient
> + * filesystem representation. Use @a pool for allocations.
> + *
> + * @since New in 1.6.
> + */
> +svn_error_t *
> +svn_repos_fs_pack(svn_repos_t *repos,
> + svn_cancel_func_t cancel_func,
> + void *cancel_baton,
> + apr_pool_t *pool);
> +
> +
> /**
> * Run database recovery procedures on the repository at @a path,
> * returning the database to a consistent state. Use @a pool for all
>
> Modified: trunk/subversion/libsvn_fs/fs-loader.c
> URL: http://svn.collab.net/viewvc/svn/trunk/subversion/libsvn_fs/fs-loader.c?pathrev=34502&r1=34501&r2=34502
> ==============================================================================
> --- trunk/subversion/libsvn_fs/fs-loader.c Mon Dec 1 08:31:28 2008 (r34501)
> +++ trunk/subversion/libsvn_fs/fs-loader.c Mon Dec 1 08:59:39 2008 (r34502)
> @@ -488,6 +488,18 @@ svn_fs_hotcopy(const char *src_path, con
> }
>
> svn_error_t *
> +svn_fs_pack(const char *path,
> + svn_cancel_func_t cancel_func,
> + void *cancel_baton,
> + apr_pool_t *pool)
> +{
> + fs_library_vtable_t *vtable;
> +
> + SVN_ERR(fs_library_vtable(&vtable, path, pool));
> + return vtable->pack(path, cancel_func, cancel_baton, pool);
> +}
> +
> +svn_error_t *
> svn_fs_recover(const char *path,
> svn_cancel_func_t cancel_func, void *cancel_baton,
> apr_pool_t *pool)
>
> Modified: trunk/subversion/libsvn_fs/fs-loader.h
> URL: http://svn.collab.net/viewvc/svn/trunk/subversion/libsvn_fs/fs-loader.h?pathrev=34502&r1=34501&r2=34502
> ==============================================================================
> --- trunk/subversion/libsvn_fs/fs-loader.h Mon Dec 1 08:31:28 2008 (r34501)
> +++ trunk/subversion/libsvn_fs/fs-loader.h Mon Dec 1 08:59:39 2008 (r34502)
> @@ -88,6 +88,8 @@ typedef struct fs_library_vtable_t
> svn_error_t *(*recover)(svn_fs_t *fs,
> svn_cancel_func_t cancel_func, void *cancel_baton,
> apr_pool_t *pool);
> + svn_error_t *(*pack)(const char *path, svn_cancel_func_t cancel_func,
> + void *cancel_baton, apr_pool_t *pool);
>
> /* Provider-specific functions should go here, even if they could go
> in an object vtable, so that they are all kept together. */
>
> Modified: trunk/subversion/libsvn_fs_base/fs.c
> URL: http://svn.collab.net/viewvc/svn/trunk/subversion/libsvn_fs_base/fs.c?pathrev=34502&r1=34501&r2=34502
> ==============================================================================
> --- trunk/subversion/libsvn_fs_base/fs.c Mon Dec 1 08:31:28 2008 (r34501)
> +++ trunk/subversion/libsvn_fs_base/fs.c Mon Dec 1 08:59:39 2008 (r34502)
> @@ -877,6 +877,16 @@ base_bdb_recover(svn_fs_t *fs,
> return bdb_recover(fs->path, FALSE, pool);
> }
>
> +static svn_error_t *
> +base_bdb_pack(const char *path,
> + svn_cancel_func_t cancel,
> + void *cancel_baton,
> + apr_pool_t *pool)
> +{
> + /* Packing is currently a no op for BDB. */
> + return SVN_NO_ERROR;
> +}
> +
>
>
> /* Running the 'archive' command on a Berkeley DB-based filesystem. */
> @@ -1327,6 +1337,7 @@ static fs_library_vtable_t library_vtabl
> base_hotcopy,
> base_get_description,
> base_bdb_recover,
> + base_bdb_pack,
> base_bdb_logfiles,
> svn_fs_base__id_parse
> };
>
> Modified: trunk/subversion/libsvn_fs_fs/caching.c
> URL: http://svn.collab.net/viewvc/svn/trunk/subversion/libsvn_fs_fs/caching.c?pathrev=34502&r1=34501&r2=34502
> ==============================================================================
> --- trunk/subversion/libsvn_fs_fs/caching.c Mon Dec 1 08:31:28 2008 (r34501)
> +++ trunk/subversion/libsvn_fs_fs/caching.c Mon Dec 1 08:59:39 2008 (r34502)
> @@ -104,6 +104,48 @@ dup_dir_listing(void **out,
> return SVN_NO_ERROR;
> }
>
> +
> +/** Caching packed rev offsets. **/
> +/* Implements svn_cache__serialize_func_t */
> +static svn_error_t *
> +offset_serialize(char **data,
> + apr_size_t *data_len,
> + void *in,
> + apr_pool_t *pool)
> +{
> + *data = apr_off_t_toa(pool, *((apr_off_t *) in));
> + *data_len = strlen(*data);
> + return SVN_NO_ERROR;
> +}
> +
> +/* Implements svn_cache__deserialize_func_t */
> +static svn_error_t *
> +offset_deserialize(void **out,
> + const char *data,
> + apr_size_t data_len,
> + apr_pool_t *pool)
> +{
> + *out = apr_palloc(pool, sizeof (apr_off_t));
> + apr_strtoff((apr_off_t *)*out, data, NULL, 0);

Hyrum,

Per INSTALL we still support APR 0.9.7, but apr_strtoff isn't
available in APR 0.9.x. So it seems something needs to change.

Paul

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: dev-help_at_subversion.tigris.org
Received on 2008-12-01 20:18:52 CET

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