[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: Bert Huijben <bert_at_qqmail.nl>
Date: Wed, 23 May 2012 09:58:56 +0200

> -----Original Message-----
> From: Greg Stein [mailto:gstein_at_gmail.com]
> Sent: woensdag 23 mei 2012 4:54
> To: dev_at_subversion.apache.org
> Subject: 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
>
> 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?

This just inserts the directory itself. The previous statement (which has a
comment) will only insert a node when it is not a directory. Directories
still can't be part of a changelist.

I just used the result 'did we insert a file' as a quick win to avoid
looking for changelists on children of files.

        Bert
>
> >...
>
> Cheers,
> -g
Received on 2012-05-23 09:59:40 CEST

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