Fix locking bug that occurred when locking a switched file. The failing test was committed in r14774 but is now passing (with minor changes). * subversion/libsvn_client/locking_commands.c (struct lock_baton): New member, urls_to_paths. (organize_lock_targets): Rework function to operate on the URLs for each entry instead of slamming the onto relative path onto parent directory and assuming that that will work. (store_locks_callback): Rename arg PATHS to REL_URL since that's what it is now. Grab the actual relative path from lb->urls_to_paths. (svn_client_lock, svn_client_unlock): Accomodate changes to organize_lock_targets and set the urls_to_paths member of the lock_baton. * subversion/tests/clients/cmdline/lock_tests.py (lock_switched_files): Tweak status to expect "Out of working copy" locks on the files that were actually locked. (test_list): Remove XFail from lock_switched_files.