[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: svn commit: r34803 - trunk/subversion/libsvn_client

From: Julian Foad <julianfoad_at_btopenworld.com>
Date: Thu, 18 Dec 2008 14:44:16 +0000

Hyrum K. Wright wrote:
> 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);

This whole loop, except for the "reparent" line, is repeated in both
places where you added the nice error message. I'll just note that
there's an opportunity for factoring out that chunk of code into a new
function, if anyone fancies it.

- Julian

> >> 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=462&dsMessageId=986695
Received on 2008-12-18 15:39:39 CET

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.