Checkout
Daniel Shahaf
committed
on 26 Apr 12
Store UUID in svn_fs_t rather than in FSAP_DATA. This is a cleaner
implementation of what r1330932 implements in a less robust manner.

Sug… Show more
Store UUID in svn_fs_t rather than in FSAP_DATA.  This is a cleaner

implementation of what r1330932 implements in a less robust manner.

Suggested by: gstein

(the particular 'cleaner implementation')

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.

Show less