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

RE: Improving the 'diff callbacks'

From: Julian Foad <julian.foad_at_wandisco.com>
Date: Tue, 02 Aug 2011 16:17:28 +0100

Bert Huijben wrote:
> > -----Original Message-----
> > From: Julian Foad [mailto:julian.foad_at_wandisco.com]
> > On Tue, 2011-08-02 at 16:23 +0200, Bert Huijben wrote:
> > > > -----Original Message-----
> > > > From: Julian Foad [mailto:julian.foad_at_wandisco.com]
> > > > First I wondered why the delta_editor_t isn't a suitable interface for
> > > > diffs, and why the WC defines its own 'callback' type for this. One
> > > > reason is because we want a symmetric diff, one that provides the full
> > > > content of both what's added and what's deleted. Although the
> > > > summarizing diff doesn't need to know about file content or property
> > > > deletions, it does want to know about file and directory deletions, so
> > > > that would seem to be a good thing. So why aren't we using the
> > > > diff_callbacks_t here?
> > >
> > > Maybe because the diff callbacks transfer the full texts of both
> > > before and after a change to provide them to the callback?
> >
> > It appears that the diff_callbacks_t can already avoid that: the
> > 'file_opened' callback says:
> >
> > /* This function is called before @a file_changed to allow callbacks to
> > * skip the most expensive processing of retrieving the file data. */
>
> If you do that (returning skip status) you don't get the information
> on text and property changes.
>
> How would you generate the summary without those callbacks being
> invoked?

I guess you can't. So you're right, this is one reason why we're not
using the current set of diff callbacks.

- Julian
Received on 2011-08-02 17:18:03 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.