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

Re: svn commit: r1341715 - in /subversion/trunk/subversion: libsvn_wc/wc-queries.sql libsvn_wc/wc_db.c tests/libsvn_wc/wc-queries-test.c

From: Greg Stein <gstein_at_gmail.com>
Date: Tue, 22 May 2012 22:53:53 -0400

On Tue, May 22, 2012 at 9:31 PM, <rhuijben_at_apache.org> wrote:
>...
> +++ subversion/trunk/subversion/libsvn_wc/wc_db.c Wed May 23 01:31:09 2012
> @@ -4947,17 +4947,29 @@ populate_targets_tree(svn_wc__db_wcroot_
>           const char *changelist = APR_ARRAY_IDX(changelist_filter, i,
>                                                  const char *);
>
> -          SVN_ERR(svn_sqlite__get_statement(&stmt, wcroot->sdb, stmt_idx));
> +          SVN_ERR(svn_sqlite__get_statement(&stmt, wcroot->sdb,
> +                                        STMT_INSERT_TARGET_WITH_CHANGELIST));
>           SVN_ERR(svn_sqlite__bindf(stmt, "iss", wcroot->wc_id,
>                                     local_relpath, changelist));
>           SVN_ERR(svn_sqlite__update(&sub_affected, stmt));
>
> +          /* If the root is matched by the changelist, we don't have to match
> +             the children. As that tells us the root is a file */
> +          if (!sub_affected && depth > svn_depth_empty)
> +            {
> +              SVN_ERR(svn_sqlite__get_statement(&stmt, wcroot->sdb, stmt_idx));
> +              SVN_ERR(svn_sqlite__bindf(stmt, "iss", wcroot->wc_id,
> +                                        local_relpath, changelist));
> +              SVN_ERR(svn_sqlite__update(&sub_affected, stmt));
> +            }
> +
>           affected_rows += sub_affected;
>         }
>     }
>   else /* No changelist filtering */
>     {
>       int stmt_idx;
> +      int sub_affected;
>
>       switch (depth)
>         {
> @@ -4983,9 +4995,19 @@ populate_targets_tree(svn_wc__db_wcroot_
>             break;
>         }
>
> -      SVN_ERR(svn_sqlite__get_statement(&stmt, wcroot->sdb, stmt_idx));
> +      SVN_ERR(svn_sqlite__get_statement(&stmt, wcroot->sdb,
> +                                        STMT_INSERT_TARGET));
>       SVN_ERR(svn_sqlite__bindf(stmt, "is", wcroot->wc_id, local_relpath));
> -      SVN_ERR(svn_sqlite__update(&affected_rows, stmt));
> +      SVN_ERR(svn_sqlite__update(&sub_affected, stmt));
> +      affected_rows += sub_affected;
> +
> +      if (depth > svn_depth_empty)
> +        {

Why is sub_affected not used here? (like above) ... should a comment
be added to explain?

>...

Cheers,
-g
Received on 2012-05-23 04:54:31 CEST

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