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

Re: svn commit: r1185886 - in /subversion/trunk/subversion: libsvn_wc/entries.c tests/cmdline/upgrade_tests.py

From: Greg Stein <gstein_at_gmail.com>
Date: Wed, 19 Oct 2011 18:07:45 -0400

On Tue, Oct 18, 2011 at 17:45, <rhuijben_at_apache.org> wrote:
>...
> +++ subversion/trunk/subversion/libsvn_wc/entries.c Tue Oct 18 21:45:09 2011
>...
> -  if (entry->absent)
> +  else if (entry->absent)
>     {
> -      SVN_ERR_ASSERT(base_node && !working_node);
> +      SVN_ERR_ASSERT(base_node && !working_node && !below_working_node);

We should also assert for parent_node here (needed below). An absent
node always needs a parent, so the assertion should be fine.

>...
> @@ -1873,9 +1875,22 @@ write_entry(struct write_baton **entry_n
>
>       if (entry->deleted)
>         {
> -          base_node->presence = svn_wc__db_status_not_present;
> +          SVN_ERR_ASSERT(base_node->presence == svn_wc__db_status_not_present);

Yup.

> +          /* ### should be svn_node_unknown, but let's store what we have. */
> +          base_node->kind = entry->kind;
> +        }
> +      else if (entry->absent)
> +        {
> +          SVN_ERR_ASSERT(base_node->presence
> +                                == svn_wc__db_status_server_excluded);
>           /* ### should be svn_node_unknown, but let's store what we have. */
>           base_node->kind = entry->kind;
> +
> +          /* Store the most likely revision in the node to avoid
> +             base nodes without a valid revision. Of course
> +             we remember that the data is still incomplete. */
> +          if (!SVN_IS_VALID_REVNUM(base_node->revision) && parent_node->base)
> +            base_node->revision = parent_node->base->revision;

Here: parent_node is dereferenced. As I said, it should be non-NULL
anyways, but for clarity we can assert that.

>...

There are some later changes from Philip which may cause a problem.
I'll note that separately.

This change looks right. Thanks!

Cheers,
-g
Received on 2011-10-20 00:08:18 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.