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.
Make the editor path driver callback a little easier to use.
Add 'editor' and 'edit_baton' parameters to the path driver callback. All but trivial callback implementations need these, and they otherwise had to be passed through the callback baton, which was straightforward but more trouble than it need be.
* subversion/libsvn_delta/path_driver.c (svn_delta_path_driver3): Rename from 'svn_delta_path_driver2'. (svn_delta_path_driver_state_t, svn_delta_path_driver_start): Change the callback function type. (svn_delta_path_driver_step): Pass the extra parameters.
* subversion/libsvn_client/shelf.c (path_driver_cb_func): Take 'editor' and 'edit_baton' as direct parameters. (path_driver_cb_baton_t, svn_client__shelf_replay): Remove them from the path driver baton.