Checkout
Julian Foad
committed
on 30 Jan
Teach the WC editor to acquire and release a WC write lock.

* subversion/include/private/svn_client_private.h
(svn_client__wc_editor): Do… Show more
Teach the WC editor to acquire and release a WC write lock.

* subversion/include/private/svn_client_private.h

 (svn_client__wc_editor): Document that it manages the write lock.

 (svn_client__wc_editor_internal): Add an option flag to manage the write lock.

* subversion/libsvn_client/copy.c

 (copy_foreign_dir,

  svn_client__repos_to_wc_copy_by_editor): Ask the WC editor not to manage

   the write lock for us here, as the caller does it.

* subversion/libsvn_client/shelf.c

 (svn_client__shelf_apply): Don't aquire and release the write lock here:

   let the WC editor do it.

* subversion/libsvn_client/wc_editor.c

 (edit_baton_t): Add fields to manage the write lock.

 (release_write_lock,

  pool_cleanup_handler): New.

 (edit_open): If requested, acquire the write lock and arrange for it to be

   released on pool clean-up.

 (edit_close): If acquired, release the write lock.

 (svn_client__wc_editor_internal): Add the option flag to manage the write

   lock. Initialize the 'abort_edit' method so that it will release the

   write lock, the same as 'close_edit'.

 (svn_client__wc_editor): Ask for the write lock to be managed.

Show less