Index: subversion/tests/clients/cmdline/copy_tests.py =================================================================== --- subversion/tests/clients/cmdline/copy_tests.py (revision 13426) +++ subversion/tests/clients/cmdline/copy_tests.py (working copy) @@ -1475,6 +1475,28 @@ None, None, None, None, None, wc_dir) +#---------------------------------------------------------------------- +# Test for copy into a non-existent url path +def url_2_non_existent_url_path(sbox): + "svn cp src-URL non-existent-URL-path" + + sbox.build() + wc_dir = sbox.wc_dir + + dirURL1 = svntest.main.current_repo_url + "/A/B/E" + dirURL2 = svntest.main.current_repo_url + "/G/C/E/I" + errstr = [ "svn: Path 'G' not present\n" ] + + # Expect failure on 'svn cp SRC DST' + # where one or more ancestor directories of + # DST do not exist + svntest.actions.run_and_verify_svn(None, None, errstr, + 'cp', dirURL1, dirURL2, + '--username', svntest.main.wc_author, + '--password', svntest.main.wc_passwd, + '-m', 'fooogle') + + ######################################################################## # Run the tests @@ -1505,6 +1527,7 @@ repos_to_wc_1634, double_uri_escaping_1814, wc_to_wc_copy_deleted, + url_2_non_existent_url_path, ] if __name__ == '__main__': Index: subversion/libsvn_repos/commit.c =================================================================== --- subversion/libsvn_repos/commit.c (revision 13426) +++ subversion/libsvn_repos/commit.c (working copy) @@ -296,11 +296,13 @@ svn_node_kind_t kind; const char *full_path = svn_path_join (eb->base_path, path, pool); - /* Check PATH in our transaction. Make sure it does not exist, - else return an out-of-dateness error. */ + /* Check PATH in our transaction. If it does not exist, + return a 'Path not present' error. */ SVN_ERR (svn_fs_check_path (&kind, eb->txn_root, full_path, pool)); if (kind == svn_node_none) - return out_of_date (full_path, eb->txn_name); + return svn_error_createf (SVN_ERR_FS_NOT_DIRECTORY, NULL, + _("Path '%s' not present"), + path); /* Build a new dir baton for this directory */ new_dirb = apr_pcalloc (pool, sizeof (*new_dirb));