- changed 15 files
Make the lock release code a bit less smart on finding which target a callermight want to unlock to avoid having to ignore errors on releasing locks onjust deleted directories, or on the wrong target if it just turned from a fileinto a directory, etc. etc.The lock acquire code can now (optionally) always return the path it triedto acquire a lock on and the unlock code must now alway pass a valid lockedtarget. (Except for a few specific cases for handling multi-db as single-db)* subversion/libsvn_wc/wc_db.c (svn_wc__db_wclock_release): Just allow releasing locks on 'hidden' directories, in multi db mode. Return an error if neither the node itself exist, nor its parent.* subversion/libsvn_wc/update_editor.c (prep_directory): Update caller.* subversion/libsvn_wc/lock.c (svn_wc__acquire_write_lock): Split lock_abspath retrieval from anchor calculation, to allow callers always access to the lock_root_abspath. (svn_wc__release_write_lock): If the node is not locked, just unlock it in wc_db, to allow ignoring errors on not-wcroot directories. Ignore not-locked on subdirs, but not on the root of the operation. (svn_wc__call_with_write_lock): Allow locking an anchor of a node. Obtain the lock_root_abspath and release the lock on this node.* subversion/libsvn_client/update.c (update_internal): Don't release locks not obtained here! (svn_client__update_internal): Store the lock-path and release the lock on that.* subversion/libsvn_client/switch.c (svn_client__switch_internal): Update caller.* subversion/libsvn_client/revert.c (svn_client_revert2): Update caller. Lock the anchor of the operation.* subversion/libsvn_client/prop_commands.c (svn_client_propset3): Update caller.* subversion/libsvn_client/patch.c (svn_client_patch): Update caller.* subversion/libsvn_client/merge.c (svn_client_merge3, svn_client_merge_reintegrate, svn_client_merge_peg3): Update callers.* subversion/libsvn_client/externals.c (switch_dir_external): On relegating only obtain a lock and don't release it. (switch_file_external): Update caller. (handle_external_item_change): Update caller.* subversion/libsvn_client/delete.c (svn_client_delete4): Update caller.* subversion/libsvn_client/copy.c (do_wc_to_wc_copies): Update caller.* subversion/libsvn_client/commit.c (svn_client_commit5): Update caller.* subversion/libsvn_client/add.c (add_parent_dirs): Update caller.* subversion/include/private/svn_wc_private.h (svn_wc__acquire_write_lock): Update arguments and documentation. (svn_wc__release_write_lock): Add new requirements to documentation. (svn_wc__call_with_write_lock): Add lock_anchor argument.