Fix issue #2353, commit switched error "missing or not locked".

* subversion/libsvn_client/commit.c
  (svn_client_commit3): since svn_wc_get_actual_target doesn't do the
   right thing in all cases, lets stop using it.  instead, just check
   to see if the target path is a directory, and if it is, add it to
   the correct array of dirs to lock.  then, split off the parent dir
   so we can chop it up and lock its components.

* subversion/tests/clients/cmdline/switch_tests.py
  (test_list): remove XFail from commit_mods_below_switch.

Index: subversion/libsvn_client/commit.c
===================================================================
--- subversion/libsvn_client/commit.c	(revision 16853)
+++ subversion/libsvn_client/commit.c	(working copy)
@@ -1279,36 +1279,31 @@
       for (i = 0; i < rel_targets->nelts; i++)
         {
           const char *parent_dir, *name;
+          svn_node_kind_t kind;
 
           svn_pool_clear (subpool);
+
           target = svn_path_join (base_dir,
                                   APR_ARRAY_IDX (rel_targets, i, const char *),
                                   subpool);
-          SVN_ERR (svn_wc_get_actual_target (target, &parent_dir, 
-                                             &name, subpool));
 
-          if (*name)
-            {
-              svn_node_kind_t kind;
+          SVN_ERR (svn_io_check_path (target, &kind, subpool));
 
-              target = svn_path_join (parent_dir, name, subpool);
-          
-              SVN_ERR (svn_io_check_path (target, &kind, subpool));
-
-              /* If the final target is a dir, we want to recursively
-                 lock it */
-              if (kind == svn_node_dir)
-                {
-                  if (recurse)
-                    APR_ARRAY_PUSH (dirs_to_lock_recursive, 
-                                    const char *) = apr_pstrdup (pool, target);
-                  else
-                    APR_ARRAY_PUSH (dirs_to_lock, 
-                                    const char *) = apr_pstrdup (pool, target);
-                }
+          /* If the final target is a dir, we want to recursively lock it */
+          if (kind == svn_node_dir)
+            {
+              if (recurse)
+                APR_ARRAY_PUSH (dirs_to_lock_recursive, 
+                                const char *) = apr_pstrdup (pool, target);
+              else
+                APR_ARRAY_PUSH (dirs_to_lock, 
+                                const char *) = apr_pstrdup (pool, target);
             }
 
+          svn_path_split (target, &parent_dir, &name, subpool);
+
           target = parent_dir;
+
           while (strcmp (target, base_dir))
             {
               if (target[0] == '/' && target[1] == '\0')
Index: subversion/tests/clients/cmdline/switch_tests.py
===================================================================
--- subversion/tests/clients/cmdline/switch_tests.py	(revision 16853)
+++ subversion/tests/clients/cmdline/switch_tests.py	(working copy)
@@ -991,7 +991,7 @@
               failed_anchor_is_target,
               bad_intermediate_urls,
               obstructed_switch,
-              XFail(commit_mods_below_switch),
+              commit_mods_below_switch,
               relocate_beyond_repos_root,
              ]
 


