You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Neels J Hofmeyr <ne...@elego.de> on 2008/10/10 02:58:18 UTC
diff_summarize: item batons vs. item cache
Hi,
As Julian suggested:
Julian Foad wrote:
> However, it would make much more sense if it is possible to write a set
> of summarizing diff-callbacks that could be passed to any of the three
> existing (normal-diff) code paths:
>
> (repos <> repos):
> editor = svn_client__get_diff_editor(SUMMARIZE_CALLBACKS);
> ...
>
> (repos <> wc):
> editor = svn_wc_get_diff_editor5(SUMMARIZE_CALLBACKS);
> ...
>
> (wc <> wc):
> svn_wc_diff5(SUMMARIZE_CALLBACKS);
>
, I'm trying to make SUMMARIZE_CALLBACKS based on the present diff callbacks
svn_wc_diff_callbacks3_t. But there's this problem:
Let's take a property change as example. Normal diff receives a property
change and prints that to screen. However, diff_summarize needs to save the
property change in a cache, later on record some file content changes as
well, and send out a complete summary on file_close. But
svn_wc_diff_callbacks3_t does not provide file|dir opened|closed callbacks
and does not create distinct item batons.
So I guess we do need the current design and have separate functions
svn_client__get_diff_summarize_editor(SUMMARIZE_CALLBACKS);
svn_wc_get_diff_summarize_editor(SUMMARIZE_CALLBACKS);
svn_wc_diff_summarize(SUMMARIZE_CALLBACKS);
instead of reusing the existing diff editors and callback structure.
Unless we create some sort of item cache in the diff_summarize baton, as in
an apr_hash_t where node caches are added when prop changes are encountered
and deleted when content changes have come through.
Nah.
Pity, though.
~Neels
P.S.: This patch turns out to be quite educational. :)
--
Neels Hofmeyr -- elego Software Solutions GmbH
Gustav-Meyer-Allee 25 / Gebäude 12, 13355 Berlin, Germany
phone: +49 30 23458696 mobile: +49 177 2345869 fax: +49 30 23458695
http://www.elegosoft.com | Geschäftsführer: Olaf Wagner | Sitz: Berlin
Handelsreg: Amtsgericht Charlottenburg HRB 77719 | USt-IdNr: DE163214194
Re: diff_summarize: item batons vs. item cache
Posted by Neels J Hofmeyr <ne...@elego.de>.
Sorry, my previous post was too quick.
Comment inline.
Neels J Hofmeyr wrote:
> Hi,
>
> As Julian suggested:
>
> Julian Foad wrote:
>> However, it would make much more sense if it is possible to write a set
>> of summarizing diff-callbacks that could be passed to any of the three
>> existing (normal-diff) code paths:
>>
>> (repos <> repos):
>> editor = svn_client__get_diff_editor(SUMMARIZE_CALLBACKS);
>> ...
>>
>> (repos <> wc):
>> editor = svn_wc_get_diff_editor5(SUMMARIZE_CALLBACKS);
>> ...
>>
>> (wc <> wc):
>> svn_wc_diff5(SUMMARIZE_CALLBACKS);
>>
>
> , I'm trying to make SUMMARIZE_CALLBACKS based on the present diff callbacks
> svn_wc_diff_callbacks3_t. But there's this problem:
[...]
> Let's take a property change as example. Normal diff receives a property
[...]
> svn_wc_diff_callbacks3_t does not provide file|dir opened|closed callbacks
> and does not create distinct item batons.
Which is not a problem at all. I didn't see that there is actually just one
file_changed() callback which provides all the changes at once. I was
mislead by the existence of a separate sub-function to deal with props.
[...]
> Pity, though.
No, after all, it's still on :)
Thanks for bearing with my being a complete noob; sorry for the noise.
~Neels
--
Neels Hofmeyr -- elego Software Solutions GmbH
Gustav-Meyer-Allee 25 / Gebäude 12, 13355 Berlin, Germany
phone: +49 30 23458696 mobile: +49 177 2345869 fax: +49 30 23458695
http://www.elegosoft.com | Geschäftsführer: Olaf Wagner | Sitz: Berlin
Handelsreg: Amtsgericht Charlottenburg HRB 77719 | USt-IdNr: DE163214194