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

Re: svn commit: r39916 - trunk/subversion/libsvn_wc

From: Greg Stein <gstein_at_gmail.com>
Date: Fri, 9 Oct 2009 22:05:34 -0400

This fixes all but one of translation tests (#1), which is due to a
timing issue of when the magic translation properties are modified.
Some more complicated rejiggering is needed to fix that. Might take up
to a day.

Cheers,
-g

On Fri, Oct 9, 2009 at 21:48, Greg Stein <gstein_at_gmail.com> wrote:
> Author: gstein
> Date: Fri Oct  9 18:48:07 2009
> New Revision: 39916
>
> Log:
> Introduce an internal version of node_get_url() so that we can (properly)
> fetch a node's URL or it's implied post-commit URL.
>
> * subversion/libsvn_wc/wc.h:
>  (svn_wc__internal_node_get_url): new declaration
>
> * subversion/libsvn_wc/node.c:
>  (svn_wc__node_get_url): renamed into ...
>  (svn_wc__internal_node_get_url): ... this. some arg lists were reflowed
>    to follow typical pairing precedents. a couple indentation fixes
>  (svn_wc__node_get_url): reintroduced as a wrapper for above.
>
> * subversion/libsvn_wc/translate.c:
>  (svn_wc__get_keywords): remove the incorrect use of scan_addition() and
>    the incorrect join of repos_relpath (it needs to be quoted). replace
>    all this with a call to svn_wc__internal_node_get_url() which uses the
>    correct process to find and join the information.
>
> Modified:
>   trunk/subversion/libsvn_wc/node.c
>   trunk/subversion/libsvn_wc/translate.c
>   trunk/subversion/libsvn_wc/wc.h
>
> Modified: trunk/subversion/libsvn_wc/node.c
> URL: http://svn.collab.net/viewvc/svn/trunk/subversion/libsvn_wc/node.c?pathrev=39916&r1=39915&r2=39916
> ==============================================================================
> --- trunk/subversion/libsvn_wc/node.c   Fri Oct  9 17:33:03 2009        (r39915)
> +++ trunk/subversion/libsvn_wc/node.c   Fri Oct  9 18:48:07 2009        (r39916)
> @@ -239,11 +239,11 @@ svn_wc__node_get_changelist(const char *
>  }
>
>  svn_error_t *
> -svn_wc__node_get_url(const char **url,
> -                     svn_wc_context_t *wc_ctx,
> -                     const char *local_abspath,
> -                     apr_pool_t *result_pool,
> -                     apr_pool_t *scratch_pool)
> +svn_wc__internal_node_get_url(const char **url,
> +                              svn_wc__db_t *db,
> +                              const char *local_abspath,
> +                              apr_pool_t *result_pool,
> +                              apr_pool_t *scratch_pool)
>  {
>   svn_wc__db_status_t status;
>   const char *repos_relpath;
> @@ -254,26 +254,26 @@ svn_wc__node_get_url(const char **url,
>                                NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
>                                NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
>                                NULL, NULL, NULL,
> -                               wc_ctx->db, local_abspath, scratch_pool,
> -                               scratch_pool));
> -
> +                               db, local_abspath,
> +                               scratch_pool, scratch_pool));
>   if (repos_relpath == NULL)
>     {
>       if (status == svn_wc__db_status_normal
> -            || status == svn_wc__db_status_incomplete)
> +          || status == svn_wc__db_status_incomplete)
>         {
>           SVN_ERR(svn_wc__db_scan_base_repos(&repos_relpath, &repos_root_url,
> -                                             NULL, wc_ctx->db, local_abspath,
> +                                             NULL,
> +                                             db, local_abspath,
>                                              scratch_pool, scratch_pool));
>         }
>       else if (status == svn_wc__db_status_added
> -                || status == svn_wc__db_status_obstructed_add)
> +               || status == svn_wc__db_status_obstructed_add)
>         {
>           SVN_ERR(svn_wc__db_scan_addition(NULL, NULL, &repos_relpath,
>                                            &repos_root_url, NULL, NULL, NULL,
> -                                           NULL, NULL, wc_ctx->db,
> -                                           local_abspath, scratch_pool,
> -                                           scratch_pool));
> +                                           NULL, NULL,
> +                                           db, local_abspath,
> +                                           scratch_pool, scratch_pool));
>         }
>       else
>         {
> @@ -289,6 +289,20 @@ svn_wc__node_get_url(const char **url,
>   return SVN_NO_ERROR;
>  }
>
> +
> +svn_error_t *
> +svn_wc__node_get_url(const char **url,
> +                     svn_wc_context_t *wc_ctx,
> +                     const char *local_abspath,
> +                     apr_pool_t *result_pool,
> +                     apr_pool_t *scratch_pool)
> +{
> +  return svn_error_return(svn_wc__internal_node_get_url(
> +                            url, wc_ctx->db, local_abspath,
> +                            result_pool, scratch_pool));
> +}
> +
> +
>  /* A recursive node-walker, helper for svn_wc__node_walk_children(). */
>  static svn_error_t *
>  walker_helper(svn_wc__db_t *db,
>
> Modified: trunk/subversion/libsvn_wc/translate.c
> URL: http://svn.collab.net/viewvc/svn/trunk/subversion/libsvn_wc/translate.c?pathrev=39916&r1=39915&r2=39916
> ==============================================================================
> --- trunk/subversion/libsvn_wc/translate.c      Fri Oct  9 17:33:03 2009        (r39915)
> +++ trunk/subversion/libsvn_wc/translate.c      Fri Oct  9 18:48:07 2009        (r39916)
> @@ -318,8 +318,6 @@ svn_wc__get_keywords(apr_hash_t **keywor
>                      apr_pool_t *scratch_pool)
>  {
>   const char *list;
> -  const char *repos_relpath;
> -  const char *repos_root_url;
>   svn_revnum_t changed_rev;
>   apr_time_t changed_date;
>   const char *changed_author;
> @@ -349,22 +347,14 @@ svn_wc__get_keywords(apr_hash_t **keywor
>   else
>     list = force_list;
>
> -  SVN_ERR(svn_wc__db_read_info(NULL, NULL, NULL, &repos_relpath,
> -                               &repos_root_url, NULL, &changed_rev,
> +  SVN_ERR(svn_wc__db_read_info(NULL, NULL, NULL, NULL,
> +                               NULL, NULL, &changed_rev,
>                                &changed_date, &changed_author, NULL, NULL,
>                                NULL, NULL, NULL, NULL, NULL, NULL,
>                                NULL, NULL, NULL, NULL, NULL, NULL, NULL,
>                                db, local_abspath, scratch_pool, scratch_pool));
> -
> -  if (repos_root_url == NULL)
> -    {
> -      SVN_ERR(svn_wc__db_scan_addition(NULL, NULL, &repos_relpath,
> -                                       &repos_root_url,
> -                                       NULL, NULL, NULL, NULL, NULL,
> -                                       db, local_abspath, scratch_pool,
> -                                       scratch_pool));
> -    }
> -  url = svn_uri_join(repos_root_url, repos_relpath, scratch_pool);
> +  SVN_ERR(svn_wc__internal_node_get_url(&url, db, local_abspath,
> +                                        scratch_pool, scratch_pool));
>
>   SVN_ERR(svn_subst_build_keywords2(keywords,
>                                     list,
>
> Modified: trunk/subversion/libsvn_wc/wc.h
> URL: http://svn.collab.net/viewvc/svn/trunk/subversion/libsvn_wc/wc.h?pathrev=39916&r1=39915&r2=39916
> ==============================================================================
> --- trunk/subversion/libsvn_wc/wc.h     Fri Oct  9 17:33:03 2009        (r39915)
> +++ trunk/subversion/libsvn_wc/wc.h     Fri Oct  9 18:48:07 2009        (r39916)
> @@ -523,6 +523,14 @@ svn_wc__internal_is_replaced(svn_boolean
>                              apr_pool_t *scratch_pool);
>
>
> +svn_error_t *
> +svn_wc__internal_node_get_url(const char **url,
> +                              svn_wc__db_t *db,
> +                              const char *local_abspath,
> +                              apr_pool_t *result_pool,
> +                              apr_pool_t *scratch_pool);
> +
> +
>  /* Upgrade the wc sqlite database given in SDB for the wc located at
>    WCROOT_ABSPATH. It's current/starting format is given by START_FORMAT.
>    After the upgrade is complete (to as far as the automatic upgrade will
>
> ------------------------------------------------------
> http://subversion.tigris.org/ds/viewMessage.do?dsForumId=495&dsMessageId=2405750
>

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2405753
Received on 2009-10-10 04:06:08 CEST

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.