[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

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

From: Hyrum K Wright <hyrum.wright_at_wandisco.com>
Date: Fri, 21 Oct 2011 09:56:10 -0500

On Fri, Oct 21, 2011 at 1:29 AM, Daniel Shahaf <d.s_at_daniel.shahaf.name> wrote:
> hwright_at_apache.org wrote on Fri, Oct 21, 2011 at 01:40:04 -0000:
>> Author: hwright
>> Date: Fri Oct 21 01:40:03 2011
>> New Revision: 1187160
>>
>> URL: http://svn.apache.org/viewvc?rev=1187160&view=rev
>> Log:
>> Ev2 shims: Allow callers to pass the kind of a node when building a delta
>> editor tree.  Most times, this information will be available for free.
>>
>> * subversion/libsvn_delta/compat.c
>>   (build): Add a kind argument, and use it.
>>   (add_directoy_cb, add_file_cb, set_props_cb, set_text_cb): Update callers.
>>
>> 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=1187160&r1=1187159&r2=1187160&view=diff
>> ==============================================================================
>> --- subversion/trunk/subversion/libsvn_delta/compat.c (original)
>> +++ subversion/trunk/subversion/libsvn_delta/compat.c Fri Oct 21 01:40:03 2011
>> @@ -627,6 +627,7 @@ static svn_error_t *
>>  build(struct editor_baton *eb,
>>        action_code_t action,
>>        const char *relpath,
>> +      svn_kind_t kind,
>>        const char *url,
>>        svn_revnum_t rev,
>>        apr_hash_t *props,
>> @@ -683,8 +684,11 @@ build(struct editor_baton *eb,
>>        operation->operation =
>>          operation->operation == OP_DELETE ? OP_REPLACE : OP_ADD;
>>
>> -      SVN_ERR(eb->fetch_kind_func(&operation->kind, eb->fetch_kind_baton,
>> -                                  relpath, scratch_pool));
>> +      if (kind == svn_kind_none)
>> +        SVN_ERR(eb->fetch_kind_func(&operation->kind, eb->fetch_kind_baton,
>> +                                    relpath, scratch_pool));
>> +      else
>> +        operation->kind = kind;
>
> s/svn_kind_none/svn_kind_unknown/ ?

That's probably appropriate here.

Most of the build/drive code was lifted from svnmucc, but as I spend
more time around it, I'm getting a better feel for the information the
shims have that svnmucc doesn't, and how the paradigm needs to change
for the shim use case. This code will probably evolve quite a bit
still, and I'll keep this change in mind as it does.

-Hyrum

>>        operation->copyfrom_url = url;
>>        operation->copyfrom_revision = rev;
>>      }
>> @@ -704,8 +708,7 @@ build(struct editor_baton *eb,
>>          }
>>        else
>>          {
>> -          SVN_ERR(eb->fetch_kind_func(&operation->kind, eb->fetch_kind_baton,
>> -                                      relpath, scratch_pool));
>> +          operation->kind = kind;
>>            if (operation->kind == svn_kind_file)
>>              operation->operation = OP_OPEN;
>>            else if (operation->kind == svn_kind_none)
>

-- 
uberSVN: Apache Subversion Made Easy
http://www.uberSVN.com/
Received on 2011-10-21 16:56:44 CEST

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.