> -----Original Message-----
> From: Stefan Sperling [mailto:stsp_at_elego.de]
> Sent: woensdag 25 augustus 2010 14:52
> To: Philip Martin
> Cc: dev_at_subversion.apache.org
> Subject: Re: svn commit: r988956 -
> /subversion/trunk/subversion/libsvn_wc/update_editor.c
>
> On Wed, Aug 25, 2010 at 11:00:10AM +0100, Philip Martin wrote:
> > philip_at_apache.org writes:
> >
> > > Author: philip
> > > Date: Wed Aug 25 09:55:35 2010
> > > New Revision: 988956
> > >
> > > URL: http://svn.apache.org/viewvc?rev=988956&view=rev
> > > Log:
> > > Fix some uses of unitialised variables identified by valgrind.
> > >
> > > * subversion/libsvn_wc/update_editor.c
> > > (add_directory, add_file): Set conflicted if svn_wc__db_read_info
fails.
> > >
> > > Modified:
> > > subversion/trunk/subversion/libsvn_wc/update_editor.c
> > >
> > > Modified: subversion/trunk/subversion/libsvn_wc/update_editor.c
> > > URL:
> http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/upd
> ate_editor.c?rev=988956&r1=988955&r2=988956&view=diff
> > >
> ==========================================================
> ====================
> > > --- subversion/trunk/subversion/libsvn_wc/update_editor.c (original)
> > > +++ subversion/trunk/subversion/libsvn_wc/update_editor.c Wed Aug
> 25 09:55:35 2010
> > > @@ -2357,6 +2357,7 @@ add_directory(const char *path,
> > > svn_error_clear(err);
> > > wc_kind = svn_wc__db_kind_unknown;
> > > status = svn_wc__db_status_normal;
> > > + conflicted = FALSE;
> > >
> > > versioned_locally_and_present = FALSE;
> > > }
> > > @@ -3808,6 +3809,7 @@ add_file(const char *path,
> > > svn_error_clear(err);
> > > wc_kind = svn_wc__db_kind_unknown;
> > > status = svn_wc__db_status_normal;
> > > + conflicted = FALSE;
> > >
> > > versioned_locally_and_present = FALSE;
> > > }
> >
> > Could someone confirm that FALSE is correct here?
>
> Looks fine to me.
Answered on IRC: No, this is not the correct value.
A node can still be in conflict while _db_read_info() returns path not
found. Currently delete-delete tree conflicts can be the exception.
So in this case it's safer to set the conflicted variable to TRUE and
thereby perform the more expensive checks, to verify if the node is really
in conflict.
Bert
Received on 2010-08-25 15:25:06 CEST