Checkout
C. Michael Pilato
committed
on 24 Mar 05
Merge the functionalities of svn_fs_attach_lock() and svn_fs_lock()
into a single function (svn_fs_lock).

* subversion/include/svn_fs.h
(… Show more
Merge the functionalities of svn_fs_attach_lock() and svn_fs_lock()

into a single function (svn_fs_lock).

* subversion/include/svn_fs.h

 (svn_fs_lock): Add (optional) 'token' parameter, and move the

   'force' parameter closer to the end.

 (svn_fs_attach_lock): Remove.

* subversion/libsvn_fs/fs-loader.h

 (fs_vtable_t): Lose 'attach_lock'.  Tweak 'lock' param list to match

   svn_fs_lock().

* subversion/libsvn_fs/fs-loader.c

 (svn_fs_lock): Add 'token' parameter, and move the 'force' parameter

   closer to the end.  Update call to vtable functions.

 (svn_fs_attach_lock): Remove.

* subversion/libsvn_fs_fs/fs.c

 (fs_vtable): Lose reference to svn_fs_fs__attach_lock().

* subversion/libsvn_fs_fs/lock.h

 (svn_fs_fs__lock): Add 'token' parameter, and move the 'force'

   parameter closer to the end.

 (svn_fs_fs__attach_lock): Remove.

* subversion/libsvn_fs_fs/lock.c

 (generate_new_lock): Remove.

 (svn_fs_fs__lock): Add 'token' parameter, and move the 'force'

   parameter closer to the end.  Eat up generate_new_lock's

   functionality.  Also, leave a big TODO here for verifying the

   legitimacy of a non-NULL input token.

 (svn_fs_fs__attach_lock): Remove.

* subversion/libsvn_fs_base/fs.c

 (fs_vtable): Lose reference to svn_fs_base__attach_lock().

* subversion/libsvn_fs_base/lock.h

 (svn_fs_base__lock): Add 'token' parameter, and move the 'force'

   parameter closer to the end.

 (svn_fs_base__attach_lock): Remove.

* subversion/libsvn_fs_base/lock.c

 (generate_new_lock): Remove.

 (struct lock_args): Add 'token' member.

 (txn_body_lock): If present, use baton's token as the lock token.

 (svn_fs_base__lock): Add 'token' parameter, and move the 'force'

   parameter closer to the end.  Populate new 'token' baton member.

 (struct attach_lock_args, txn_body_attach_lock,

   svn_fs_base__attach_lock): Remove.

* subversion/include/svn_repos.h

 (svn_repos_fs_attach_lock): Remove.

 (svn_repos_fs_lock): Add 'token' parameter, and move the 'force'

   parameter closer to the end.

* subversion/libsvn_repos/fs-wrap.c

 (svn_repos_fs_lock): Add 'token' parameter, and move the 'force'

   parameter closer to the end.

 (svn_repos_fs_attach_lock): Remove.

* subversion/libsvn_ra_local/ra_plugin.c

 (svn_ra_local__lock): Update call to svn_repos_fs_lock().

* subversion/svnserve/serve.c

 (lock): Update call to svn_repos_fs_lock().

* subversion/mod_dav_svn/lock.c

 (dav_svn_append_locks, dav_svn_refresh_locks): Use

   svn_repos_fs_lock() instead of svn_repos_fs_attach_lock().  Also,

   fix a bug where a lock timeout was being used as an expiration date.

* subversion/tests/libsvn_fs/locks-test.c

 (lock_only, lookup_lock_by_path, get_locks, basic_lock,

  lock_credentials, final_lock_check, lock_dir_propchange,

  lock_name_reservation, directory_locks_kinda, lock_expiration,

  lock_break_steal_refresh, lock_out_of_date): Update calls to

  svn_fs_lock(), and use it instead of svn_fs_attach_lock().  Also,

   use TRUE/FALSE instead of 1/0 for the boolean 'force' flag.

 (attach_lock): Use svn_fs_lock() instead of svn_fs_attach_lock().

* subversion/tests/libsvn_repos/repos-test.c

 (rmlocks): Update calls to svn_fs_lock().

Show less