Return-Path: X-Original-To: apmail-subversion-commits-archive@minotaur.apache.org Delivered-To: apmail-subversion-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 846C59CAE for ; Thu, 26 Apr 2012 19:53:03 +0000 (UTC) Received: (qmail 39909 invoked by uid 500); 26 Apr 2012 19:53:03 -0000 Delivered-To: apmail-subversion-commits-archive@subversion.apache.org Received: (qmail 39882 invoked by uid 500); 26 Apr 2012 19:53:03 -0000 Mailing-List: contact commits-help@subversion.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@subversion.apache.org Delivered-To: mailing list commits@subversion.apache.org Received: (qmail 39875 invoked by uid 99); 26 Apr 2012 19:53:03 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 26 Apr 2012 19:53:03 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 26 Apr 2012 19:53:00 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id C5A5B2388860; Thu, 26 Apr 2012 19:52:40 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1331050 - in /subversion/trunk/subversion: include/private/ libsvn_fs/ libsvn_fs_base/ libsvn_fs_fs/ libsvn_fs_util/ Date: Thu, 26 Apr 2012 19:52:40 -0000 To: commits@subversion.apache.org From: danielsh@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20120426195240.C5A5B2388860@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: danielsh Date: Thu Apr 26 19:52:39 2012 New Revision: 1331050 URL: http://svn.apache.org/viewvc?rev=1331050&view=rev Log: Store UUID in svn_fs_t rather than in FSAP_DATA. This improves upon the situation created by r1330932. Suggested by: gstein Update libsvn_fs: * subversion/libsvn_fs/fs-loader.h (fs_vtable_t.get_uuid): Remove this member, with comment. (svn_fs_t.uuid): New struct member. * subversion/libsvn_fs/fs-loader.c (svn_fs_get_uuid): Track new location of UUID. Update FSFS for the new location: * subversion/libsvn_fs_fs/fs_fs.h, subversion/libsvn_fs_fs/fs_fs.c: (svn_fs_fs__get_uuid): Delete this function. It is subsumed into svn_fs_fs__open() and svn_fs_fs__create(). * subversion/libsvn_fs_fs/caching.c (svn_fs_fs__initialize_caches, svn_fs_fs__initialize_txn_caches): * subversion/libsvn_fs_fs/fs.c (fs_serialized_init): * subversion/libsvn_fs_fs/fs_fs.c (svn_fs_fs__open, hotcopy_incremental_check_preconditions, hotcopy_incremental_check_preconditions, svn_fs_fs__set_uuid): * subversion/libsvn_fs_fs/tree.c (fs_same_p): Track new location of UUID. * subversion/libsvn_fs_fs/fs.c (fs_vtable): Drop GET_UUID() member. * subversion/libsvn_fs_fs/fs.h (fs_fs_data_t.uuid): Remove this member. Update BDB for the new location: * subversion/libsvn_fs_base/fs.c (populate_opened_fs): New function. (base_create, base_upgrade): Call it to populate svn_fs_t->uuid. * subversion/libsvn_fs_base/uuid.h (svn_fs_base__get_uuid): Rename to.. (svn_fs_base__populate_uuid): .. this, and change signature. * subversion/libsvn_fs_base/uuid.c (svn_fs_base__get_uuid): Rename to.. (svn_fs_base__populate_uuid): .. this, and adapt to the new signature. * subversion/libsvn_fs_base/tree.c (fs_same_p): * subversion/libsvn_fs_base/uuid.c (svn_fs_base__set_uuid): Track new location of UUID. * subversion/libsvn_fs_base/fs.c (fs_vtable): Drop GET_UUID() member. * subversion/libsvn_fs_base/fs.h (base_fs_data_t.uuid): Remove this member. Revert r1330932: * subversion/libsvn_fs/fs-loader.c (cache_uuid): Remove this function. (svn_fs_open, svn_fs_create): Update callers. (svn_fs_open_berkeley, svn_fs_create_berkeley): Update callers. * subversion/libsvn_fs_util/fs-util.c (svn_fs__identifier): Remove. * subversion/include/private/svn_fs_util.h (svn_fs__identifier): Reimplement as a macro. It will be removed in the next revision. Modified: subversion/trunk/subversion/include/private/svn_fs_util.h subversion/trunk/subversion/libsvn_fs/fs-loader.c subversion/trunk/subversion/libsvn_fs/fs-loader.h subversion/trunk/subversion/libsvn_fs_base/fs.c subversion/trunk/subversion/libsvn_fs_base/fs.h subversion/trunk/subversion/libsvn_fs_base/tree.c subversion/trunk/subversion/libsvn_fs_base/uuid.c subversion/trunk/subversion/libsvn_fs_base/uuid.h subversion/trunk/subversion/libsvn_fs_fs/caching.c subversion/trunk/subversion/libsvn_fs_fs/fs.c subversion/trunk/subversion/libsvn_fs_fs/fs.h subversion/trunk/subversion/libsvn_fs_fs/fs_fs.c subversion/trunk/subversion/libsvn_fs_fs/fs_fs.h subversion/trunk/subversion/libsvn_fs_fs/tree.c subversion/trunk/subversion/libsvn_fs_util/fs-util.c Modified: subversion/trunk/subversion/include/private/svn_fs_util.h URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/include/private/svn_fs_util.h?rev=1331050&r1=1331049&r2=1331050&view=diff ============================================================================== --- subversion/trunk/subversion/include/private/svn_fs_util.h (original) +++ subversion/trunk/subversion/include/private/svn_fs_util.h Thu Apr 26 19:52:39 2012 @@ -59,10 +59,8 @@ svn_fs__canonicalize_abspath(const char svn_error_t * svn_fs__check_fs(svn_fs_t *fs, svn_boolean_t expect_open); -/* Like svn_fs_get_uuid(), but in libsvn_fs_util and returns a const char * - (allocated in RESULT_POOL), or NULL in case of errors. */ -const char * -svn_fs__identifier(svn_fs_t *fs, apr_pool_t *result_pool); +/** Temporary, to be removed in the next revision. */ +#define svn_fs__identifier(fs, unused) ((fs)->uuid) /* Constructing nice error messages for roots. */ Modified: subversion/trunk/subversion/libsvn_fs/fs-loader.c URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs/fs-loader.c?rev=1331050&r1=1331049&r2=1331050&view=diff ============================================================================== --- subversion/trunk/subversion/libsvn_fs/fs-loader.c (original) +++ subversion/trunk/subversion/libsvn_fs/fs-loader.c Thu Apr 26 19:52:39 2012 @@ -353,16 +353,6 @@ svn_fs_set_warning_func(svn_fs_t *fs, sv fs->warning_baton = warning_baton; } -/* Read FS's UUID to cause it to be cached. */ -/* ### Implementation detail? Without this, r1330906 reenters trails. */ -static svn_error_t * -cache_uuid(svn_fs_t *fs, apr_pool_t *scratch_pool) -{ - const char *uuid; - SVN_ERR(svn_fs_get_uuid(fs, &uuid, scratch_pool)); - return SVN_NO_ERROR; -} - svn_error_t * svn_fs_create(svn_fs_t **fs_p, const char *path, apr_hash_t *fs_config, apr_pool_t *pool) @@ -383,7 +373,6 @@ svn_fs_create(svn_fs_t **fs_p, const cha SVN_MUTEX__WITH_LOCK(common_pool_lock, vtable->create(*fs_p, path, pool, common_pool)); - SVN_ERR(cache_uuid(*fs_p, pool)); return SVN_NO_ERROR; } @@ -397,7 +386,6 @@ svn_fs_open(svn_fs_t **fs_p, const char *fs_p = fs_new(fs_config, pool); SVN_MUTEX__WITH_LOCK(common_pool_lock, vtable->open_fs(*fs_p, path, pool, common_pool)); - SVN_ERR(cache_uuid(*fs_p, pool)); return SVN_NO_ERROR; } @@ -574,7 +562,6 @@ svn_fs_create_berkeley(svn_fs_t *fs, con /* Perform the actual creation. */ SVN_MUTEX__WITH_LOCK(common_pool_lock, vtable->create(fs, path, fs->pool, common_pool)); - SVN_ERR(cache_uuid(fs, fs->pool)); /* No better pool.. */ return SVN_NO_ERROR; } @@ -586,7 +573,6 @@ svn_fs_open_berkeley(svn_fs_t *fs, const SVN_ERR(fs_library_vtable(&vtable, path, fs->pool)); SVN_MUTEX__WITH_LOCK(common_pool_lock, vtable->open_fs(fs, path, fs->pool, common_pool)); - SVN_ERR(cache_uuid(fs, fs->pool)); /* No better pool.. */ return SVN_NO_ERROR; } @@ -1248,7 +1234,8 @@ svn_error_t * svn_fs_get_uuid(svn_fs_t *fs, const char **uuid, apr_pool_t *pool) { /* If you change this, consider changing svn_fs__identifier(). */ - return svn_error_trace(fs->vtable->get_uuid(fs, uuid, pool)); + *uuid = apr_pstrdup(pool, fs->uuid); + return SVN_NO_ERROR; } svn_error_t * Modified: subversion/trunk/subversion/libsvn_fs/fs-loader.h URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs/fs-loader.h?rev=1331050&r1=1331049&r2=1331050&view=diff ============================================================================== --- subversion/trunk/subversion/libsvn_fs/fs-loader.h (original) +++ subversion/trunk/subversion/libsvn_fs/fs-loader.h Thu Apr 26 19:52:39 2012 @@ -172,7 +172,7 @@ typedef struct fs_vtable_t const svn_string_t *const *old_value_p, const svn_string_t *value, apr_pool_t *pool); - svn_error_t *(*get_uuid)(svn_fs_t *fs, const char **uuid, apr_pool_t *pool); + /* There is no get_uuid(); see svn_fs_t.uuid docstring. */ svn_error_t *(*set_uuid)(svn_fs_t *fs, const char *uuid, apr_pool_t *pool); svn_error_t *(*revision_root)(svn_fs_root_t **root_p, svn_fs_t *fs, svn_revnum_t rev, apr_pool_t *pool); @@ -391,6 +391,9 @@ struct svn_fs_t /* FSAP-specific vtable and private data */ fs_vtable_t *vtable; void *fsap_data; + + /* UUID, stored by open(), create(), and set_uuid(). */ + const char *uuid; }; Modified: subversion/trunk/subversion/libsvn_fs_base/fs.c URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs_base/fs.c?rev=1331050&r1=1331049&r2=1331050&view=diff ============================================================================== --- subversion/trunk/subversion/libsvn_fs_base/fs.c (original) +++ subversion/trunk/subversion/libsvn_fs_base/fs.c Thu Apr 26 19:52:39 2012 @@ -480,7 +480,6 @@ static fs_vtable_t fs_vtable = { svn_fs_base__revision_prop, svn_fs_base__revision_proplist, svn_fs_base__change_rev_prop, - svn_fs_base__get_uuid, svn_fs_base__set_uuid, svn_fs_base__revision_root, svn_fs_base__begin_txn, @@ -647,6 +646,15 @@ open_databases(svn_fs_t *fs, } +/* Called by functions that initialize an svn_fs_t struct, after that + initialization is done, to populate svn_fs_t->uuid. */ +static svn_error_t * +populate_opened_fs(svn_fs_t *fs, apr_pool_t *scratch_pool) +{ + SVN_ERR(svn_fs_base__populate_uuid(fs, scratch_pool)); + return SVN_NO_ERROR; +} + static svn_error_t * base_create(svn_fs_t *fs, const char *path, apr_pool_t *pool, apr_pool_t *common_pool) @@ -682,6 +690,8 @@ base_create(svn_fs_t *fs, const char *pa if (svn_err) goto error; ((base_fs_data_t *) fs->fsap_data)->format = format; + + SVN_ERR(populate_opened_fs(fs, pool)); return SVN_NO_ERROR;; error: @@ -766,6 +776,7 @@ base_open(svn_fs_t *fs, const char *path if (svn_err) goto error; } + SVN_ERR(populate_opened_fs(fs, pool)); return SVN_NO_ERROR; error: Modified: subversion/trunk/subversion/libsvn_fs_base/fs.h URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs_base/fs.h?rev=1331050&r1=1331049&r2=1331050&view=diff ============================================================================== --- subversion/trunk/subversion/libsvn_fs_base/fs.h (original) +++ subversion/trunk/subversion/libsvn_fs_base/fs.h Thu Apr 26 19:52:39 2012 @@ -108,9 +108,6 @@ typedef struct base_fs_data_t transaction trail alive. */ svn_boolean_t in_txn_trail; - /* The filesystem UUID (or NULL if not-yet-known; see svn_fs_get_uuid). */ - const char *uuid; - /* The format number of this FS. */ int format; Modified: subversion/trunk/subversion/libsvn_fs_base/tree.c URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs_base/tree.c?rev=1331050&r1=1331049&r2=1331050&view=diff ============================================================================== --- subversion/trunk/subversion/libsvn_fs_base/tree.c (original) +++ subversion/trunk/subversion/libsvn_fs_base/tree.c Thu Apr 26 19:52:39 2012 @@ -3192,17 +3192,7 @@ fs_same_p(svn_boolean_t *same_p, svn_fs_t *fs2, apr_pool_t *pool) { - const char *uuid1; - const char *uuid2; - - /* Random thought: if fetching UUIDs to compare filesystems is too - expensive, one solution would be to cache the UUID in each fs - object (copying the UUID into fs->pool, of course). */ - - SVN_ERR(fs1->vtable->get_uuid(fs1, &uuid1, pool)); - SVN_ERR(fs2->vtable->get_uuid(fs2, &uuid2, pool)); - - *same_p = ! strcmp(uuid1, uuid2); + *same_p = ! strcmp(fs1->uuid, fs2->uuid); return SVN_NO_ERROR; } Modified: subversion/trunk/subversion/libsvn_fs_base/uuid.c URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs_base/uuid.c?rev=1331050&r1=1331049&r2=1331050&view=diff ============================================================================== --- subversion/trunk/subversion/libsvn_fs_base/uuid.c (original) +++ subversion/trunk/subversion/libsvn_fs_base/uuid.c Thu Apr 26 19:52:39 2012 @@ -48,39 +48,27 @@ txn_body_get_uuid(void *baton, trail_t * svn_error_t * -svn_fs_base__get_uuid(svn_fs_t *fs, - const char **uuid, - apr_pool_t *pool) +svn_fs_base__populate_uuid(svn_fs_t *fs, + apr_pool_t *scratch_pool) { - base_fs_data_t *bfd = fs->fsap_data; SVN_ERR(svn_fs__check_fs(fs, TRUE)); - /* Check for a cached UUID first. Failing that, we hit the - database. */ - if (bfd->uuid) - { - *uuid = apr_pstrdup(pool, bfd->uuid); - } - else + /* We hit the database. */ { + const char *uuid; struct get_uuid_args args; - apr_pool_t *scratch_pool = svn_pool_create(pool); args.idx = 1; - args.uuid = uuid; + args.uuid = &uuid; SVN_ERR(svn_fs_base__retry_txn(fs, txn_body_get_uuid, &args, FALSE, scratch_pool)); - if (*uuid) + if (uuid) { - *uuid = apr_pstrdup(pool, *uuid); - /* Toss what we find into the cache. */ - bfd->uuid = apr_pstrdup(fs->pool, *uuid); + fs->uuid = apr_pstrdup(fs->pool, uuid); } - - svn_pool_destroy(scratch_pool); } return SVN_NO_ERROR; @@ -109,7 +97,6 @@ svn_fs_base__set_uuid(svn_fs_t *fs, apr_pool_t *pool) { struct set_uuid_args args; - base_fs_data_t *bfd = fs->fsap_data; SVN_ERR(svn_fs__check_fs(fs, TRUE)); @@ -122,7 +109,7 @@ svn_fs_base__set_uuid(svn_fs_t *fs, /* Toss our value into the cache. */ if (uuid) - bfd->uuid = apr_pstrdup(fs->pool, uuid); + fs->uuid = apr_pstrdup(fs->pool, uuid); return SVN_NO_ERROR; } Modified: subversion/trunk/subversion/libsvn_fs_base/uuid.h URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs_base/uuid.h?rev=1331050&r1=1331049&r2=1331050&view=diff ============================================================================== --- subversion/trunk/subversion/libsvn_fs_base/uuid.h (original) +++ subversion/trunk/subversion/libsvn_fs_base/uuid.h Thu Apr 26 19:52:39 2012 @@ -29,12 +29,15 @@ extern "C" { +/* Set FS->UUID to the the value read from the database, allocated + in FS->POOL. Use SCRATCH_POOL for temporary allocations. */ +svn_error_t *svn_fs_base__populate_uuid(svn_fs_t *fs, + apr_pool_t *scratch_pool); + + /* These functions implement some of the calls in the FS loader library's fs vtable. */ -svn_error_t *svn_fs_base__get_uuid(svn_fs_t *fs, const char **uuid, - apr_pool_t *pool); - svn_error_t *svn_fs_base__set_uuid(svn_fs_t *fs, const char *uuid, apr_pool_t *pool); Modified: subversion/trunk/subversion/libsvn_fs_fs/caching.c URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs_fs/caching.c?rev=1331050&r1=1331049&r2=1331050&view=diff ============================================================================== --- subversion/trunk/subversion/libsvn_fs_fs/caching.c (original) +++ subversion/trunk/subversion/libsvn_fs_fs/caching.c Thu Apr 26 19:52:39 2012 @@ -252,7 +252,7 @@ svn_fs_fs__initialize_caches(svn_fs_t *f { fs_fs_data_t *ffd = fs->fsap_data; const char *prefix = apr_pstrcat(pool, - "fsfs:", ffd->uuid, + "fsfs:", fs->uuid, "/", fs->path, ":", (char *)NULL); svn_memcache_t *memcache; @@ -495,7 +495,7 @@ svn_fs_fs__initialize_txn_caches(svn_fs_ to start a new transaction later that receives the same id. Therefore, throw in a uuid as well - just to be sure. */ const char *prefix = apr_pstrcat(pool, - "fsfs:", ffd->uuid, + "fsfs:", fs->uuid, "/", fs->path, ":", txn_id, ":", svn_uuid_generate(pool), ":", Modified: subversion/trunk/subversion/libsvn_fs_fs/fs.c URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs_fs/fs.c?rev=1331050&r1=1331049&r2=1331050&view=diff ============================================================================== --- subversion/trunk/subversion/libsvn_fs_fs/fs.c (original) +++ subversion/trunk/subversion/libsvn_fs_fs/fs.c Thu Apr 26 19:52:39 2012 @@ -73,7 +73,7 @@ fs_serialized_init(svn_fs_t *fs, apr_poo know of a better way of associating such data with the repository. */ - key = apr_pstrcat(pool, SVN_FSFS_SHARED_USERDATA_PREFIX, ffd->uuid, + key = apr_pstrcat(pool, SVN_FSFS_SHARED_USERDATA_PREFIX, fs->uuid, (char *) NULL); status = apr_pool_userdata_get(&val, key, common_pool); if (status) @@ -130,7 +130,6 @@ static fs_vtable_t fs_vtable = { svn_fs_fs__revision_prop, svn_fs_fs__revision_proplist, svn_fs_fs__change_rev_prop, - svn_fs_fs__get_uuid, svn_fs_fs__set_uuid, svn_fs_fs__revision_root, svn_fs_fs__begin_txn, Modified: subversion/trunk/subversion/libsvn_fs_fs/fs.h URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs_fs/fs.h?rev=1331050&r1=1331049&r2=1331050&view=diff ============================================================================== --- subversion/trunk/subversion/libsvn_fs_fs/fs.h (original) +++ subversion/trunk/subversion/libsvn_fs_fs/fs.h Thu Apr 26 19:52:39 2012 @@ -218,9 +218,6 @@ typedef struct fs_fs_data_t layouts) or zero (for linear layouts). */ int max_files_per_dir; - /* The uuid of this FS. */ - const char *uuid; - /* The revision that was youngest, last time we checked. */ svn_revnum_t youngest_rev_cache; 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=1331050&r1=1331049&r2=1331050&view=diff ============================================================================== --- subversion/trunk/subversion/libsvn_fs_fs/fs_fs.c (original) +++ subversion/trunk/subversion/libsvn_fs_fs/fs_fs.c Thu Apr 26 19:52:39 2012 @@ -1307,7 +1307,7 @@ svn_fs_fs__open(svn_fs_t *fs, const char limit = sizeof(buf); SVN_ERR(svn_io_read_length_line(uuid_file, buf, &limit, pool)); - ffd->uuid = apr_pstrdup(fs->pool, buf); + fs->uuid = apr_pstrdup(fs->pool, buf); SVN_ERR(svn_io_file_close(uuid_file, pool)); @@ -7500,17 +7500,6 @@ svn_fs_fs__recover(svn_fs_t *fs, } svn_error_t * -svn_fs_fs__get_uuid(svn_fs_t *fs, - const char **uuid_p, - apr_pool_t *pool) -{ - fs_fs_data_t *ffd = fs->fsap_data; - - *uuid_p = apr_pstrdup(pool, ffd->uuid); - return SVN_NO_ERROR; -} - -svn_error_t * svn_fs_fs__set_uuid(svn_fs_t *fs, const char *uuid, apr_pool_t *pool) @@ -7519,7 +7508,6 @@ svn_fs_fs__set_uuid(svn_fs_t *fs, apr_size_t my_uuid_len; const char *tmp_path; const char *uuid_path = path_uuid(fs, pool); - fs_fs_data_t *ffd = fs->fsap_data; if (! uuid) uuid = svn_uuid_generate(pool); @@ -7540,7 +7528,7 @@ svn_fs_fs__set_uuid(svn_fs_t *fs, /* Remove the newline we added, and stash the UUID. */ my_uuid[my_uuid_len - 1] = '\0'; - ffd->uuid = my_uuid; + fs->uuid = my_uuid; return SVN_NO_ERROR; } @@ -8709,7 +8697,7 @@ hotcopy_incremental_check_preconditions( /* Make sure the UUID of source and destination match up. * We don't want to copy over a different repository. */ - if (strcmp(src_ffd->uuid, dst_ffd->uuid) != 0) + if (strcmp(src_fs->uuid, dst_fs->uuid) != 0) return svn_error_create(SVN_ERR_RA_UUID_MISMATCH, NULL, _("The UUID of the hotcopy source does " "not match the UUID of the hotcopy " @@ -9155,7 +9143,7 @@ hotcopy_create_empty_dest(svn_fs_t *src_ /* Create lock file and UUID. */ SVN_ERR(svn_io_file_create(path_lock(dst_fs, pool), "", pool)); - SVN_ERR(svn_fs_fs__set_uuid(dst_fs, src_ffd->uuid, pool)); + SVN_ERR(svn_fs_fs__set_uuid(dst_fs, dst_fs->uuid, pool)); /* Create the min unpacked rev file. */ if (dst_ffd->format >= SVN_FS_FS__MIN_PACKED_FORMAT) Modified: subversion/trunk/subversion/libsvn_fs_fs/fs_fs.h URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs_fs/fs_fs.h?rev=1331050&r1=1331049&r2=1331050&view=diff ============================================================================== --- subversion/trunk/subversion/libsvn_fs_fs/fs_fs.h (original) +++ subversion/trunk/subversion/libsvn_fs_fs/fs_fs.h Thu Apr 26 19:52:39 2012 @@ -355,12 +355,6 @@ svn_error_t *svn_fs_fs__create(svn_fs_t const char *path, apr_pool_t *pool); -/* Store the uuid of the repository FS in *UUID. Allocate space in - POOL. */ -svn_error_t *svn_fs_fs__get_uuid(svn_fs_t *fs, - const char **uuid, - apr_pool_t *pool); - /* Set the uuid of repository FS to UUID, if UUID is not NULL; otherwise, set the uuid of FS to a newly generated UUID. Perform temporary allocations in POOL. */ Modified: subversion/trunk/subversion/libsvn_fs_fs/tree.c URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs_fs/tree.c?rev=1331050&r1=1331049&r2=1331050&view=diff ============================================================================== --- subversion/trunk/subversion/libsvn_fs_fs/tree.c (original) +++ subversion/trunk/subversion/libsvn_fs_fs/tree.c Thu Apr 26 19:52:39 2012 @@ -1925,17 +1925,7 @@ fs_same_p(svn_boolean_t *same_p, svn_fs_t *fs2, apr_pool_t *pool) { - const char *uuid1; - const char *uuid2; - - /* Random thought: if fetching UUIDs to compare filesystems is too - expensive, one solution would be to cache the UUID in each fs - object (copying the UUID into fs->pool, of course). */ - - SVN_ERR(fs1->vtable->get_uuid(fs1, &uuid1, pool)); - SVN_ERR(fs2->vtable->get_uuid(fs2, &uuid2, pool)); - - *same_p = ! strcmp(uuid1, uuid2); + *same_p = ! strcmp(fs1->uuid, fs2->uuid); return SVN_NO_ERROR; } Modified: subversion/trunk/subversion/libsvn_fs_util/fs-util.c URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs_util/fs-util.c?rev=1331050&r1=1331049&r2=1331050&view=diff ============================================================================== --- subversion/trunk/subversion/libsvn_fs_util/fs-util.c (original) +++ subversion/trunk/subversion/libsvn_fs_util/fs-util.c Thu Apr 26 19:52:39 2012 @@ -171,22 +171,3 @@ svn_fs__append_to_merged_froms(svn_merge return SVN_NO_ERROR; } - -const char * -svn_fs__identifier(svn_fs_t *fs, apr_pool_t *result_pool) -{ - const char *uuid; - svn_error_t *err; - - err = fs->vtable->get_uuid(fs, &uuid, result_pool); - if (err) - { - /* Log the error and discard it. */ - fs->warning(fs->warning_baton, err); - svn_error_clear(err); - return NULL; - } - - return uuid; -} -