You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by "C. Michael Pilato" <cm...@collab.net> on 2005/09/14 19:33:59 UTC
Re: svn commit: r16128 - trunk/subversion/libsvn_fs_base
cmpilato@tigris.org writes:
> Author: cmpilato
> Date: Wed Sep 14 14:25:30 2005
> New Revision: 16128
>
> Modified:
> trunk/subversion/libsvn_fs_base/tree.c
>
> Log:
> Fix an auto-merge regression (though one probably never seen in
> production) I inadvertantly introduced in r15569.
>
> * subversion/libsvn_fs_base/tree.c
> (merge): Since svn_fs_base__dag_dir_entries() doesn't actually
> populate the 'kind' field of the svn_fs_dirent_t object it
> returns, revert to using svn_fs_base__dag_node_kind() to check
> path kinds.
[...]
> /* If any of the three entries is of type file, flag a conflict. */
> - if (s_entry->kind == svn_node_file
> - || t_entry->kind == svn_node_file
> - || a_entry->kind == svn_node_file)
> + if ((svn_fs_base__dag_node_kind (s_ent_node) == svn_node_file)
> + || (svn_fs_base__dag_node_kind (t_ent_node) == svn_node_file)
> + || (svn_fs_base__dag_node_kind (a_ent_node) == svn_node_file))
> return conflict_err (conflict_p,
> svn_path_join (target_path,
> a_entry->name,
In case anyone was wondering, I verified this problem by adding the
following just above the block I changed in the commit:
if (s_entry->kind != svn_node_unknown
|| t_entry->kind != svn_node_unknown
|| a_entry->kind != svn_node_unknown)
return svn_error_create (SVN_ERR_FS_CORRUPT, NULL,
"Got something other than unknowns");
I ran the test suite, and I never saw that error fire, so I knew that
the 'kind' fields were always svn_node_unknown (and therefore checking
them against svn_node_file would not be entirely useful).
--
C. Michael Pilato <cm...@collab.net>
CollabNet <> www.collab.net <> Distributed Development On Demand
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: svn commit: r16128 - trunk/subversion/libsvn_fs_base
Posted by "C. Michael Pilato" <cm...@collab.net>.
"C. Michael Pilato" <cm...@collab.net> writes:
> > Eeek! Yes, that looks like a serious bug. The calls to
> > svn_fs_base__dag_node_kind have to happen after the calls to
> > svn_fs_base__dag_get_node, so one or the other must be moved.
>
> Yeesh. My bad; will fix.
Please see (and review!) r16183.
--
C. Michael Pilato <cm...@collab.net>
CollabNet <> www.collab.net <> Distributed Development On Demand
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: svn commit: r16128 - trunk/subversion/libsvn_fs_base
Posted by "C. Michael Pilato" <cm...@collab.net>.
Philip Martin <ph...@codematters.co.uk> writes:
> "D.J. Heap" <dj...@gmail.com> writes:
>
> > "C. Michael Pilato" <cmpilato@collab.net > writes:
> > > > /* If any of the three entries is of type file, flag a conflict. */
> > > > - if (s_entry->kind == svn_node_file
> > > > - || t_entry->kind == svn_node_file
> > > > - || a_entry->kind == svn_node_file)
> > > > + if ((svn_fs_base__dag_node_kind (s_ent_node) == svn_node_file)
> > > > + || (svn_fs_base__dag_node_kind (t_ent_node) == svn_node_file)
> > > > + || (svn_fs_base__dag_node_kind (a_ent_node) == svn_node_file))
> > > > return conflict_err (conflict_p,
> > > > svn_path_join (target_path,
> > > > a_entry->name,
> > >
>
> > I'm getting compiler warnings here (that look accurate to me) indicating
> > that s_ent_node, t_ent_node, and a_ent_node are being used without being
> > initialized?
>
> Eeek! Yes, that looks like a serious bug. The calls to
> svn_fs_base__dag_node_kind have to happen after the calls to
> svn_fs_base__dag_get_node, so one or the other must be moved.
Yeesh. My bad; will fix.
--
C. Michael Pilato <cm...@collab.net>
CollabNet <> www.collab.net <> Distributed Development On Demand
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: svn commit: r16128 - trunk/subversion/libsvn_fs_base
Posted by Philip Martin <ph...@codematters.co.uk>.
"D.J. Heap" <dj...@gmail.com> writes:
> "C. Michael Pilato" <cmpilato@collab.net > writes:
> > > /* If any of the three entries is of type file, flag a conflict. */
> > > - if (s_entry->kind == svn_node_file
> > > - || t_entry->kind == svn_node_file
> > > - || a_entry->kind == svn_node_file)
> > > + if ((svn_fs_base__dag_node_kind (s_ent_node) == svn_node_file)
> > > + || (svn_fs_base__dag_node_kind (t_ent_node) == svn_node_file)
> > > + || (svn_fs_base__dag_node_kind (a_ent_node) == svn_node_file))
> > > return conflict_err (conflict_p,
> > > svn_path_join (target_path,
> > > a_entry->name,
> >
> I'm getting compiler warnings here (that look accurate to me) indicating
> that s_ent_node, t_ent_node, and a_ent_node are being used without being
> initialized?
Eeek! Yes, that looks like a serious bug. The calls to
svn_fs_base__dag_node_kind have to happen after the calls to
svn_fs_base__dag_get_node, so one or the other must be moved.
--
Philip Martin
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: svn commit: r16128 - trunk/subversion/libsvn_fs_base
Posted by "D.J. Heap" <dj...@gmail.com>.
On 19 Sep 2005 21:03:09 -0500, kfogel@collab.net <kf...@collab.net> wrote:
>
> "C. Michael Pilato" <cm...@collab.net> writes:
> > > /* If any of the three entries is of type file, flag a conflict. */
> > > - if (s_entry->kind == svn_node_file
> > > - || t_entry->kind == svn_node_file
> > > - || a_entry->kind == svn_node_file)
> > > + if ((svn_fs_base__dag_node_kind (s_ent_node) == svn_node_file)
> > > + || (svn_fs_base__dag_node_kind (t_ent_node) == svn_node_file)
> > > + || (svn_fs_base__dag_node_kind (a_ent_node) == svn_node_file))
> > > return conflict_err (conflict_p,
> > > svn_path_join (target_path,
> > > a_entry->name,
> >
> > In case anyone was wondering, I verified this problem by adding the
> > following just above the block I changed in the commit:
> >
> > if (s_entry->kind != svn_node_unknown
> > || t_entry->kind != svn_node_unknown
> > || a_entry->kind != svn_node_unknown)
> > return svn_error_create (SVN_ERR_FS_CORRUPT, NULL,
> > "Got something other than unknowns");
> >
> > I ran the test suite, and I never saw that error fire, so I knew that
> > the 'kind' fields were always svn_node_unknown (and therefore checking
> > them against svn_node_file would not be entirely useful).
>
> Nice! I *was* actually wondering, and that's a great way to test it.
> (For extra credit, put the tmp change back and try stress.pl :-) ).
>
I'm getting compiler warnings here (that look accurate to me) indicating
that s_ent_node, t_ent_node, and a_ent_node are being used without being
initialized?
DJ
Re: svn commit: r16128 - trunk/subversion/libsvn_fs_base
Posted by kf...@collab.net.
"C. Michael Pilato" <cm...@collab.net> writes:
> > /* If any of the three entries is of type file, flag a conflict. */
> > - if (s_entry->kind == svn_node_file
> > - || t_entry->kind == svn_node_file
> > - || a_entry->kind == svn_node_file)
> > + if ((svn_fs_base__dag_node_kind (s_ent_node) == svn_node_file)
> > + || (svn_fs_base__dag_node_kind (t_ent_node) == svn_node_file)
> > + || (svn_fs_base__dag_node_kind (a_ent_node) == svn_node_file))
> > return conflict_err (conflict_p,
> > svn_path_join (target_path,
> > a_entry->name,
>
> In case anyone was wondering, I verified this problem by adding the
> following just above the block I changed in the commit:
>
> if (s_entry->kind != svn_node_unknown
> || t_entry->kind != svn_node_unknown
> || a_entry->kind != svn_node_unknown)
> return svn_error_create (SVN_ERR_FS_CORRUPT, NULL,
> "Got something other than unknowns");
>
> I ran the test suite, and I never saw that error fire, so I knew that
> the 'kind' fields were always svn_node_unknown (and therefore checking
> them against svn_node_file would not be entirely useful).
Nice! I *was* actually wondering, and that's a great way to test it.
(For extra credit, put the tmp change back and try stress.pl :-) ).
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org