You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Greg Stein <gs...@gmail.com> on 2009/10/13 16:48:07 UTC

Re: svn commit: r39964 - trunk/subversion/libsvn_wc

On Mon, Oct 12, 2009 at 15:56, Bert Huijben <rh...@sharpsvn.net> wrote:
>...
> +++ trunk/subversion/libsvn_wc/update_editor.c  Mon Oct 12 12:56:27 2009        (r39964)
>...
> +      if (kind == svn_wc__db_kind_unknown)
> +        break;
>
> -      ancestor_abspath = APR_ARRAY_IDX(ancestors, i, const char *);
> +      SVN_ERR(svn_wc__db_node_hidden(&hidden, db, ancestor_abspath, iterpool));
> +
> +      if (hidden)
> +        break;

An ancestor better not be missing or hidden. These checks are better
as an assertion.

Cheers,
-g

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

RE: svn commit: r39964 - trunk/subversion/libsvn_wc

Posted by Bert Huijben <rh...@sharpsvn.net>.
> -----Original Message-----
> From: Bert Huijben [mailto:bert@qqmail.nl]
> Sent: woensdag 14 oktober 2009 10:27
> To: 'Greg Stein'; 'dev@subversion.tigris.org'
> Subject: RE: svn commit: r39964 - trunk/subversion/libsvn_wc
> 
> 
> 
> > -----Original Message-----
> > From: Greg Stein [mailto:gstein@gmail.com]
> > Sent: dinsdag 13 oktober 2009 18:48
> > To: dev@subversion.tigris.org
> > Subject: Re: svn commit: r39964 - trunk/subversion/libsvn_wc
> >
> > On Mon, Oct 12, 2009 at 15:56, Bert Huijben <rh...@sharpsvn.net>
> > wrote:
> > >...
> > > +++ trunk/subversion/libsvn_wc/update_editor.c  Mon Oct 12 12:56:27
> > 2009        (r39964)
> > >...
> > > +      if (kind == svn_wc__db_kind_unknown)
> > > +        break;
> > >
> > > -      ancestor_abspath = APR_ARRAY_IDX(ancestors, i, const char
> *);
> > > +      SVN_ERR(svn_wc__db_node_hidden(&hidden, db,
> ancestor_abspath,
> > iterpool));
> > > +
> > > +      if (hidden)
> > > +        break;
> >
> > An ancestor better not be missing or hidden. These checks are better
> > as an assertion.
> 
> That would raise an assertion if somebody added a new external
> (/separate working copy) in place of a base not_present, excluded or
> absent node. (The checkout phase would reach this part of the code)
> 
> I don't think we want to raise exceptions on this kind of (user?)
> errors. A normal error could be valid, but this code path used to work
> in this case. (Because the entry api would just return NULL for hidden
> nodes)

Note that this is mostly temporary code until svn_wc__check_wc_root () returns some saner answers on unversioned nodes. (Its public wrappers document an error on not versioned nodes, but the code just returns false since the move to WC-NG).

I'm working on a patch that fixes this function in a fully WC-NG way, but it currently breaks the merge code.

	Bert

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

RE: svn commit: r39964 - trunk/subversion/libsvn_wc

Posted by Bert Huijben <rh...@sharpsvn.net>.
> -----Original Message-----
> From: Greg Stein [mailto:gstein@gmail.com]
> Sent: dinsdag 13 oktober 2009 18:48
> To: dev@subversion.tigris.org
> Subject: Re: svn commit: r39964 - trunk/subversion/libsvn_wc
> 
> On Mon, Oct 12, 2009 at 15:56, Bert Huijben <rh...@sharpsvn.net>
> wrote:
> >...
> > +++ trunk/subversion/libsvn_wc/update_editor.c  Mon Oct 12 12:56:27
> 2009        (r39964)
> >...
> > +      if (kind == svn_wc__db_kind_unknown)
> > +        break;
> >
> > -      ancestor_abspath = APR_ARRAY_IDX(ancestors, i, const char *);
> > +      SVN_ERR(svn_wc__db_node_hidden(&hidden, db, ancestor_abspath,
> iterpool));
> > +
> > +      if (hidden)
> > +        break;
> 
> An ancestor better not be missing or hidden. These checks are better
> as an assertion.

That would raise an assertion if somebody added a new external (/separate working copy) in place of a base not_present, excluded or absent node. (The checkout phase would reach this part of the code)

I don't think we want to raise exceptions on this kind of (user?) errors. A normal error could be valid, but this code path used to work in this case. (Because the entry api would just return NULL for hidden nodes)

	Bert

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