Greg Stein wrote:
> Haven't looked in detail, but will this still work when kind ==
> svn_nod_none ? (i.e. missing)
You're missing the larger context of the loop:
while (kind == svn_node_none)
{
APR_ARRAY_PUSH(new_dirs, const char *) = root_url;
svn_path_split(root_url, &root_url, NULL, pool);
SVN_ERR(svn_ra_reparent(ra_session, root_url, pool));
SVN_ERR(svn_ra_check_path(ra_session, "", SVN_INVALID_REVNUM, &kind,
pool));
}
if (kind != svn_node_dir)
return svn_error_createf(SVN_ERR_FS_ALREADY_EXISTS, NULL,
_("Path '%s' already exists, but is not a directory"),
root_url);
Execution won't even get to the conditional if kind == svn_node_none. (Unless
there is something else that /I'm/ missing.)
> On Wed, Dec 17, 2008 at 15:21, Hyrum K. Wright <hyrum_at_hyrumwright.org> wrote:
>> Author: hwright
>> Date: Wed Dec 17 15:21:18 2008
>> New Revision: 34803
>>
>> Log:
>> Return a better error message when a target of 'cp --parents' exists, but is
>> a file.
>>
>> * subversion/libsvn_client/copy.c
>> (repos_to_repos_copy, wc_to_repos_copy): Toss an error if we reach and
>> existent "to-be-created" parent directory, but isn't not a directory.
>>
>> Modified:
>> trunk/subversion/libsvn_client/copy.c
>>
>> Modified: trunk/subversion/libsvn_client/copy.c
>> URL: http://svn.collab.net/viewvc/svn/trunk/subversion/libsvn_client/copy.c?pathrev=34803&r1=34802&r2=34803
>> ==============================================================================
>> --- trunk/subversion/libsvn_client/copy.c Wed Dec 17 13:51:07 2008 (r34802)
>> +++ trunk/subversion/libsvn_client/copy.c Wed Dec 17 15:21:18 2008 (r34803)
>> @@ -705,6 +705,11 @@ repos_to_repos_copy(svn_commit_info_t **
>> SVN_ERR(svn_ra_check_path(ra_session, dir, SVN_INVALID_REVNUM,
>> &kind, iterpool));
>> }
>> +
>> + if (kind != svn_node_dir)
>> + return svn_error_createf(SVN_ERR_FS_ALREADY_EXISTS, NULL,
>> + _("Path '%s' already exists, but is not a directory"),
>> + dir);
>> }
>> }
>>
>> @@ -1013,6 +1018,11 @@ wc_to_repos_copy(svn_commit_info_t **com
>> pool));
>> }
>>
>> + if (kind != svn_node_dir)
>> + return svn_error_createf(SVN_ERR_FS_ALREADY_EXISTS, NULL,
>> + _("Path '%s' already exists, but is not a directory"),
>> + root_url);
>> +
>> top_dst_url = root_url;
>> }
>>
>> ------------------------------------------------------
>> http://subversion.tigris.org/ds/viewMessage.do?dsForumId=495&dsMessageId=986135
>>
>
> ------------------------------------------------------
> http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=986163
>
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=986291
Received on 2008-12-18 05:23:00 CET