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

Re: svn commit: r1073870 - /subversion/trunk/subversion/libsvn_wc/wc_db_pdh.c

From: Greg Stein <gstein_at_gmail.com>
Date: Wed, 23 Feb 2011 15:06:00 -0500

This log message doesn't match.

On Wed, Feb 23, 2011 at 13:24, <hwright_at_apache.org> wrote:
> Author: hwright
> Date: Wed Feb 23 18:24:53 2011
> New Revision: 1073870
>
> URL: http://svn.apache.org/viewvc?rev=1073870&view=rev
> Log:
> Reduce the scope of a helper function.
>
> * subversion/libsvn_wc/wc_db_pdh.c
>  (svn_wc__db_pdh_compute_relpath): Rename from this...
>  (compute_relpath): ...to this.
>  (svn_wc__db_pdh_parse_local_abspath): Update caller.
>
> * subversion/libsvn_wc/wc_db_private.h
>  (svn_wc__db_pdh_compute_relpath): Remove.
>
> Modified:
>    subversion/trunk/subversion/libsvn_wc/wc_db_pdh.c
>
> Modified: subversion/trunk/subversion/libsvn_wc/wc_db_pdh.c
> URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/wc_db_pdh.c?rev=1073870&r1=1073869&r2=1073870&view=diff
> ==============================================================================
> --- subversion/trunk/subversion/libsvn_wc/wc_db_pdh.c (original)
> +++ subversion/trunk/subversion/libsvn_wc/wc_db_pdh.c Wed Feb 23 18:24:53 2011
> @@ -318,11 +318,11 @@ svn_wc__db_close_many_wcroots(apr_hash_t
>
>  /* POOL may be NULL if the lifetime of LOCAL_ABSPATH is sufficient.  */
>  static const char *
> -compute_relpath(const svn_wc__db_pdh_t *pdh,
> +compute_relpath(const svn_wc__db_wcroot_t *wcroot,
> +                const char *local_abspath,
>                 apr_pool_t *result_pool)
>  {
> -  const char *relpath = svn_dirent_is_child(pdh->wcroot->abspath,
> -                                            pdh->local_abspath,
> +  const char *relpath = svn_dirent_is_child(wcroot->abspath, local_abspath,
>                                             result_pool);
>   if (relpath == NULL)
>     return "";
> @@ -371,7 +371,8 @@ svn_wc__db_pdh_parse_local_abspath(svn_w
>          ### DB->mode? (will we record per-dir mode?)  */
>
>       /* ### for most callers, we could pass NULL for result_pool.  */
> -      *local_relpath = compute_relpath(*pdh, result_pool);
> +      *local_relpath = compute_relpath((*pdh)->wcroot, (*pdh)->local_abspath,
> +                                       result_pool);
>
>       return SVN_NO_ERROR;
>     }
> @@ -406,7 +407,8 @@ svn_wc__db_pdh_parse_local_abspath(svn_w
>           const char *dir_relpath;
>
>           /* Stashed directory's local_relpath + basename. */
> -          dir_relpath = compute_relpath(*pdh, NULL);
> +          dir_relpath = compute_relpath((*pdh)->wcroot, (*pdh)->local_abspath,
> +                                        NULL);
>           *local_relpath = svn_relpath_join(dir_relpath,
>                                             build_relpath,
>                                             result_pool);
> @@ -555,7 +557,7 @@ svn_wc__db_pdh_parse_local_abspath(svn_w
>
>     /* The subdirectory's relpath is easily computed relative to the
>        wcroot that we just found.  */
> -    dir_relpath = compute_relpath(*pdh, NULL);
> +    dir_relpath = compute_relpath((*pdh)->wcroot, (*pdh)->local_abspath, NULL);
>
>     /* And the result local_relpath may include a filename.  */
>     *local_relpath = svn_relpath_join(dir_relpath, build_relpath, result_pool);
>
>
>
Received on 2011-02-23 21:06:31 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.