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

diff_summarize: item batons vs. item cache

From: Neels J Hofmeyr <neels_at_elego.de>
Date: Fri, 10 Oct 2008 04:58:18 +0200

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

Received on 2008-10-10 04:59:00 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.