Revert to the original behavior that locking an unversioned directory is an error. The current behavior of just ignoring this, moves the real problem to other locations.
* subversion/libsvn_wc/lock.c (acquire_locks_recurively): New function, handling the recursive locking behavior for non-single db with knowledge about whether we are locking the root or a subdir. Return an error when locking the lock root fails. (svn_wc__acquire_write_lock): Move the recursive locking behavior to acquire_locks_recurively.
* subversion/libsvn_wc/wc_db.c (wclock_obtain_cb): When using single-db verify that the path to lock exists.