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

Bert Huijben <[email protected]>
Newsgroups gmane.comp.version-control.subversion.rapidsvn.devel,gmane.comp.version-control.subversion.svn
Message-ID <008901ca3629$596ff930$0c4feb90$__37348.9035679542$1253035508$gmane$org@nl>
> -----Original Message-----
> From: Hyrum K. Wright [mailto:[email protected]]
> Sent: dinsdag 15 september 2009 17:54
> To: svn-lmwclWVctOZK/[email protected]
> 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=495&dsMessageId=2395173
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.