You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Julian Foad <ju...@wandisco.com> on 2009/10/01 13:40:39 UTC

Re: svn commit: r39733 - in trunk/subversion: include/private libsvn_client libsvn_wc tests/cmdline

On Thu, 2009-10-01 at 05:44 -0700, Bert Huijben wrote:
> Author: rhuijben
> Date: Thu Oct  1 05:44:40 2009
> New Revision: 39733
> 
> Log:
> Following up on r39729, fix the 'tree conflicts: tree missing, leaf del'
> test by adding a temporary api for checking on working copy obstructions.
> 
> Note that this class of obstructions will be gone once we move to a
> central db.

Why/how won't it be possible for a node to be obstructed?

> Modified: trunk/subversion/libsvn_client/merge.c
>  
> +  /* svn_wc__maybe_get_entry ignores node kind errors, so check if we
> +     didn't get the parent stub */
> +  if (entry && entry->kind == svn_node_dir && *entry->name != '\0')
> +    return svn_wc_notify_state_missing; /* Only found parent entry */
> +
> +  err = svn_wc__temp_node_obstructed(&obstructed, merge_b->ctx->wc_ctx,
> +                                     local_abspath, pool);
> +
> +  if (err)
> +    svn_error_clear(err);

Why is it OK to ignore an error?

> +  else if (obstructed)
> +    return svn_wc_notify_state_obstructed;
> +
>    kind_expected = node_kind_working(path, merge_b, entry);
>    kind_on_disk = node_kind_on_disk(path, merge_b, pool);
>  

- Julian

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2402520

Re: svn commit: r39733 - in trunk/subversion: include/private libsvn_client libsvn_wc tests/cmdline

Posted by Greg Stein <gs...@gmail.com>.
On Thu, Oct 1, 2009 at 09:47, Julian Foad <ju...@btopenworld.com> wrote:
> On Thu, 2009-10-01 at 14:40 +0100, Julian Foad wrote:
>> On Thu, 2009-10-01 at 05:44 -0700, Bert Huijben wrote:
>> > Author: rhuijben
>> > Date: Thu Oct  1 05:44:40 2009
>> > New Revision: 39733
>> >
>> > Log:
>> > Following up on r39729, fix the 'tree conflicts: tree missing, leaf del'
>> > test by adding a temporary api for checking on working copy obstructions.
>> >
>> > Note that this class of obstructions will be gone once we move to a
>> > central db.
>>
>> Why/how won't it be possible for a node to be obstructed?
>
> I see you replaced this change with something different in r39737, but
> the new version says in obstructed_or_missing(),
>
> +  /* ### This check (and most of this function)
> +         can be removed after we move to one DB */
>
> Can you help me understand why?

In wc-1, a versioned subdirectory can become "obstructed" by rm'ing
the directory and/or dropping a file in its place. The parent
directory has a record of the versioned-subdir, but we (no longer)
have access to its metadata.

In wc-ng, all the metadata is recorded "at the top", so we'll always
have all the metadata for the subdir. In fact, if it is missing, we
can completely restore the entire missing subtree from our central
store of pristines(!).

Now, it is true that we can still have file-vs-dir obstructions in the
working copy that are unrecorded ("what? I see a subdir, but that's
supposed to be a file").

>...

Cheers,
-g

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2409481

Re: svn commit: r39733 - in trunk/subversion: include/private libsvn_client libsvn_wc tests/cmdline

Posted by Julian Foad <ju...@btopenworld.com>.
On Thu, 2009-10-01 at 14:40 +0100, Julian Foad wrote:
> On Thu, 2009-10-01 at 05:44 -0700, Bert Huijben wrote:
> > Author: rhuijben
> > Date: Thu Oct  1 05:44:40 2009
> > New Revision: 39733
> > 
> > Log:
> > Following up on r39729, fix the 'tree conflicts: tree missing, leaf del'
> > test by adding a temporary api for checking on working copy obstructions.
> > 
> > Note that this class of obstructions will be gone once we move to a
> > central db.
> 
> Why/how won't it be possible for a node to be obstructed?

I see you replaced this change with something different in r39737, but
the new version says in obstructed_or_missing(),

+  /* ### This check (and most of this function)
+         can be removed after we move to one DB */

Can you help me understand why?


> > Modified: trunk/subversion/libsvn_client/merge.c
> >  
> > +  /* svn_wc__maybe_get_entry ignores node kind errors, so check if we
> > +     didn't get the parent stub */
> > +  if (entry && entry->kind == svn_node_dir && *entry->name != '\0')
> > +    return svn_wc_notify_state_missing; /* Only found parent entry */
> > +
> > +  err = svn_wc__temp_node_obstructed(&obstructed, merge_b->ctx->wc_ctx,
> > +                                     local_abspath, pool);
> > +
> > +  if (err)
> > +    svn_error_clear(err);
> 
> Why is it OK to ignore an error?

And that code has gone away now.

- Julian

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2402528