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

RE: svn commit: r39337 - trunk/subversion/libsvn_client

From: Bert Huijben <rhuijben_at_sharpsvn.net>
Date: Tue, 15 Sep 2009 19:24:15 +0200

> -----Original Message-----
> From: Hyrum K. Wright [mailto:hyrum_at_hyrumwright.org]
> Sent: dinsdag 15 september 2009 17:54
> To: svn_at_subversion.tigris.org
> Subject: svn commit: r39337 - trunk/subversion/libsvn_client
>
> Author: hwright
> Date: Tue Sep 15 08:54:13 2009
> New Revision: 39337
>
> Log:
> Update calls to the deprecated svn_path_is_child() to the appropriate
> dirent
> and uri counterparts in libsvn_client.
>
> * subversion/libsvn_client/util.c,
> subversion/libsvn_client/info.c,
> subversion/libsvn_client/ra.c,
> subversion/libsvn_client/diff.c,
> subversion/libsvn_client/copy.c,
> subversion/libsvn_client/mergeinfo.c:
> As above.
>
> Modified:
> trunk/subversion/libsvn_client/copy.c
> trunk/subversion/libsvn_client/diff.c
> trunk/subversion/libsvn_client/info.c
> trunk/subversion/libsvn_client/mergeinfo.c
> trunk/subversion/libsvn_client/ra.c
> trunk/subversion/libsvn_client/util.c
>
> Modified: trunk/subversion/libsvn_client/copy.c
> URL:
> http://svn.collab.net/viewvc/svn/trunk/subversion/libsvn_client/copy.c?
> pathrev=39337&r1=39336&r2=39337
> =======================================================================
> =======
> --- trunk/subversion/libsvn_client/copy.c Tue Sep 15 08:32:56 2009
> (r39336)
> +++ trunk/subversion/libsvn_client/copy.c Tue Sep 15 08:54:13 2009
> (r39337)
> @@ -344,8 +344,8 @@ do_wc_to_wc_moves(const apr_array_header
> iterpool));
>
> if ((pair->src_kind == svn_node_dir)
> - && (svn_path_is_child(src_parent_abs, dst_parent_abs,
> - iterpool)))
> + && (svn_dirent_is_child(src_parent_abs, dst_parent_abs,
> + iterpool)))
> {
> SVN_ERR(svn_wc_adm_retrieve(&dst_access, src_access,
> pair->dst_parent,
> iterpool));
> @@ -772,8 +772,8 @@ repos_to_repos_copy(svn_commit_info_t **
> const char *dir;
>
> new_dirs = apr_array_make(pool, 0, sizeof(const char *));
> - dir = svn_path_is_child(top_url, svn_uri_dirname(pair->dst,
> pool),
> - pool);
> + dir = svn_uri_is_child(top_url, svn_uri_dirname(pair->dst,
> pool),
> + pool);
>
> /* Imagine a situation where the user tries to copy an existing
> source
> directory to nonexistent directory with --parents options
> specified:
> @@ -782,7 +782,7 @@ repos_to_repos_copy(svn_commit_info_t **
>
> where src exists and dst does not. The svn_uri_dirname()
> call above
> will produce a string equivalent to top_url, which means
> - svn_path_is_child() will return NULL. In this case, do not
> try to add
> + svn_uri_is_child() will return NULL. In this case, do not
> try to add
> dst to the new_dirs list since it will be added to the commit
> items
> array later in this function. */
>
> @@ -807,7 +807,7 @@ repos_to_repos_copy(svn_commit_info_t **
> path_driver_info_t *);
>
> if (strcmp(pair->dst, repos_root) != 0
> - && svn_path_is_child(pair->dst, pair->src, pool) != NULL)
> + && svn_uri_is_child(pair->dst, pair->src, pool) != NULL)

This strcmp() check is built in svn_uri_is_child, so this check can be
removed. (You need is_ancestor() if you want TRUE for the uri itself).

Note that pool is optional for svn_(uri/dirent)_is_child.. You get a pointer
to the rest of path2 if you don't pass a pool.

        Bert

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2395172
Received on 2009-09-15 19:24:36 CEST

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