On Wed, Aug 11, 2010 at 3:15 AM, Julian Foad <julian.foad_at_wandisco.com> wrote:
> On Tue, 2010-08-10, hwright_at_apache.org wrote:
>> Author: hwright
>> Date: Tue Aug 10 20:59:29 2010
>> New Revision: 984208
>> URL: http://svn.apache.org/viewvc?rev=984208&view=rev
>> On the ignore-mergeinfo branch:
>> Fix a cast which was causing a segfault in stat test 32 as a result of the
>> merge in r984206.
>> Modified: subversion/branches/ignore-mergeinfo/subversion/libsvn_client/status.c
>> URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/libsvn_client/status.c?rev=984208&r1=984207&r2=984208&view=diff
>> --- subversion/branches/ignore-mergeinfo/subversion/libsvn_client/status.c (original)
>> +++ subversion/branches/ignore-mergeinfo/subversion/libsvn_client/status.c Tue Aug 10 20:59:29 2010
>> @@ -127,7 +127,7 @@ tweak_status(void *baton,
>> if (ignore)
>> - ((svn_wc_status2_t *) status)->prop_status = svn_wc_status_normal;
>> + ((svn_wc_status3_t *) status)->prop_status = svn_wc_status_normal;
>> if (!svn_wc__is_sendable_status(status, sb->no_ignore, sb->get_all))
>> return SVN_NO_ERROR;
> I haven't looked fully, but is a cast really necessary?
> svn_wc__is_sendable_status() takes a (svn_wc_status3_t *) as its first
> param, so isn't 'status' already the right type?
This is casting away const, so we can do the manipulation to "fool"
svn_wc__is_senable_status() into thinking the props weren't modified.
That being said, the current state of the branch (merged up to
r960000) is such that svn_wc__is_sendable_status() no longer looks at
prop_status, instead just looking at the node_status. End result:
this line will go away, replaced with something which digs a bit
deeper to determine what the appropriate node_status should be. I'll
also probably end up doing a shallow copy of the status struct (if
needed) to avoid modifying a const.
Thanks for the review.
Received on 2010-08-11 15:21:51 CEST