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

Re: svn commit: r958698 - in /subversion/trunk/subversion/libsvn_wc: adm_ops.c wc_db.c

From: Greg Stein <gstein_at_gmail.com>
Date: Mon, 28 Jun 2010 16:21:48 -0400

On Mon, Jun 28, 2010 at 16:04, <rhuijben_at_apache.org> wrote:
>...
> +++ subversion/trunk/subversion/libsvn_wc/adm_ops.c Mon Jun 28 20:04:22 2010
>...
> @@ -1332,6 +1338,11 @@ svn_wc_add4(svn_wc_context_t *wc_ctx,
>                                           repos_root_url, repos_root_url,
>                                           repos_uuid, 0,
>                                           depth, scratch_pool));
> +
> +      /* ### The entries based code still needs the incomplete base record,
> +         ### remove it for the direct db code. */
> +      if (!copyfrom_url)
> +        SVN_ERR(svn_wc__db_base_remove(db, local_abspath, scratch_pool));

"direct db" ?? ... did you mean single db?

And I think the comment should explain that area just a bit more: that
we create an administrative area with a single row in BASE_NODE, and
then you wipe out that row, leaving a database with no node
information.

>...
> +++ subversion/trunk/subversion/libsvn_wc/wc_db.c Mon Jun 28 20:04:22 2010
> @@ -3071,12 +3071,20 @@ svn_wc__db_op_add_directory(svn_wc__db_t
>
>       err = navigate_to_parent(&pdh, db, pdh, svn_sqlite__mode_readwrite,
>                                scratch_pool);
> -      if (err)
> +      if (err && err->apr_err == SVN_ERR_WC_NOT_WORKING_COPY)
>         {
> -          /* Prolly fell off the top of the wcroot. Just call it a day.  */
> +          /* Not registered in the parent; register as addition */
>           svn_error_clear(err);
> -          return SVN_NO_ERROR;
> +
> +          SVN_ERR(svn_wc__db_pdh_parse_local_abspath(&pdh, &local_relpath, db,
> +                              svn_dirent_dirname(local_abspath, scratch_pool),
> +                              svn_sqlite__mode_readwrite, scratch_pool,
> +                              scratch_pool));
> +
> +          VERIFY_USABLE_PDH(pdh);
>         }
> +      else
> +        SVN_ERR(err);

I don't understand this part. navigate_to_parent() doesn't look for
the child in the parent, so "not registered in the parent" is an
incorrect statement.

The only real error is that you moved out of the working copy. I think
there is something more subtle going on here, and your comments and
code are not following that. Your explicit call to parse_local_abspath
is relatively bogus: navigate_ot_parent does that internally.

Please re-investigate this change. I don't think it should be necessary at all.

Cheers,
-g
Received on 2010-06-28 22:23:30 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.