You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by br...@apache.org on 2013/07/02 13:37:54 UTC

svn commit: r1498885 - /subversion/trunk/subversion/libsvn_delta/compat.c

Author: brane
Date: Tue Jul  2 11:37:54 2013
New Revision: 1498885

URL: http://svn.apache.org/r1498885
Log:
Fix change initialization in the Ev2 compatibility shims.
The shims expect an uninitialized change record's kind to be svn_node_unknown,
but it was initialized to zero, which is svn_node_none.

* subversion/libsvn_delta/compat.c (locate_change):
   Init change->kind explicitly to svn_node_unknown.

Modified:
    subversion/trunk/subversion/libsvn_delta/compat.c

Modified: subversion/trunk/subversion/libsvn_delta/compat.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_delta/compat.c?rev=1498885&r1=1498884&r2=1498885&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_delta/compat.c (original)
+++ subversion/trunk/subversion/libsvn_delta/compat.c Tue Jul  2 11:37:54 2013
@@ -218,6 +218,7 @@ locate_change(struct ev2_edit_baton *eb,
   change = apr_pcalloc(eb->edit_pool, sizeof(*change));
   change->changing = SVN_INVALID_REVNUM;
   change->deleting = SVN_INVALID_REVNUM;
+  change->kind = svn_node_unknown;
 
   svn_hash_sets(eb->changes, relpath, change);
 



Re: svn commit: r1498885 - /subversion/trunk/subversion/libsvn_delta/compat.c

Posted by Branko Čibej <br...@wandisco.com>.
On 02.07.2013 19:59, Greg Stein wrote:
> On Tue, Jul 2, 2013 at 7:37 AM,  <br...@apache.org> wrote:
>> Author: brane
>> Date: Tue Jul  2 11:37:54 2013
>> New Revision: 1498885
>>
>> URL: http://svn.apache.org/r1498885
>> Log:
>> Fix change initialization in the Ev2 compatibility shims.
>> The shims expect an uninitialized change record's kind to be svn_node_unknown,
>> but it was initialized to zero, which is svn_node_none.
> It used to be svn_kind_unknown. In the move to remove svn_kind_t, the
> zero value changed to svn_node_none.
>
> (I'm still not sure that adding a new value to svn_node_kind_t was a
> correct move; applications may freak out when they see a value they
> don't know)

This is from versioning.html, note "enumerated constants":

    Minor releases can introduce new functions, new symbolic and
    enumerated constants, and deprecate existing functions.

I was very careful to check that before introducing the the new
enumeration. It's not as if this is a new rule. (And yes ... I did weigh
the pros and cons of doing that. The cons included a choice between
revving half of our APIs, or keeping two distinct enumerations.)

-- Brane


-- 
Branko Čibej | Director of Subversion
WANdisco // Non-Stop Data
e. brane@wandisco.com

Re: svn commit: r1498885 - /subversion/trunk/subversion/libsvn_delta/compat.c

Posted by Greg Stein <gs...@gmail.com>.
On Tue, Jul 2, 2013 at 7:37 AM,  <br...@apache.org> wrote:
> Author: brane
> Date: Tue Jul  2 11:37:54 2013
> New Revision: 1498885
>
> URL: http://svn.apache.org/r1498885
> Log:
> Fix change initialization in the Ev2 compatibility shims.
> The shims expect an uninitialized change record's kind to be svn_node_unknown,
> but it was initialized to zero, which is svn_node_none.

It used to be svn_kind_unknown. In the move to remove svn_kind_t, the
zero value changed to svn_node_none.

(I'm still not sure that adding a new value to svn_node_kind_t was a
correct move; applications may freak out when they see a value they
don't know)

Cheers,
-g