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

Re: svn commit: r922176 - in /subversion/trunk/subversion: include/svn_wc.h libsvn_wc/revision_status.c svnversion/main.c

From: Greg Stein <gstein_at_gmail.com>
Date: Fri, 12 Mar 2010 05:43:18 -0500

On Fri, Mar 12, 2010 at 03:21, <dannas_at_apache.org> wrote:
>...
> +++ subversion/trunk/subversion/libsvn_wc/revision_status.c Fri Mar 12 08:21:45 2010
>...
>  {
> -  struct status_baton *sb = baton;
> +  struct walk_baton *wb = baton;
> +  svn_revnum_t changed_rev;
> +  svn_revnum_t revision;
> +  svn_depth_t depth;
> +  svn_wc__db_status_t status;
> +  svn_boolean_t wc_root;
> +  svn_boolean_t switched;

wc_root and switched can be moved into a tighter scope.

>...
> -  if (status->entry->depth != svn_depth_exclude)
> +  /* Added files have a revision of no interest */
> +  if (revision != SVN_INVALID_REVNUM)
>     {
> -      sb->result->switched |= status->switched;
> -      sb->result->modified |= (status->text_status != svn_wc_status_normal);
> -      sb->result->modified |= (status->prop_status != svn_wc_status_normal
> -                               && status->prop_status != svn_wc_status_none);
> +      svn_revnum_t item_rev = (wb->committed
> +                               ? changed_rev
> +                               : revision);

I think this may introduce a bug. Depending on wb->committed, we look
at different revision values. And it may be that REVISION is valid,
but CHANGED_REV is not. I would suggest moving the assignment of
ITEM_REV one block out, and using that in the primary if() test.

>...
> +  wb->result->sparse_checkout |= ((depth != svn_depth_infinity
> +                                  && depth != svn_depth_unknown));

No need for *double* parentheses here :-P

>...

Cheers,
-g
Received on 2010-03-12 11:43:53 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.