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

Re: Q: editor callback order?

From: Julian Foad <julianfoad_at_btopenworld.com>
Date: Fri, 07 Nov 2008 09:55:21 +0000

Neels J. Hofmeyr wrote:
> Sigh. It's firmly wedged this way. I don't like it, because it means the
> diff_callbacks3 behaviour stays as complex as it is. But there's nothing I
> can do about it. How depressing, I "wasted" a lot of time on this. :P
>
> Comments welcome.

I know how you feel. But I'm not sure the complexity of the
diff_callbacks3 behaviour is very much greater than the minimum it needs
to be.

> And I need to ensure that dir_opened, dir_added and dir_closed callbacks are
> actually *called* everywhere, which they aren't in libsvn_client/diff.c.

Agreed.

> > store this data in the single diff_callbacks baton; the callbacks don't
> > need to support per-directory or per-file batons to do this.
>
> Like, store stuff in a hash or something? To me it seems far simpler to
> provide a *dir_baton for the directory diff_callbacks3, in terms of code
> complexity and execution time.

Code complexity: using per-dir and per-file batons is a step up in
implementation overhead in all the callbacks. And it makes them very
much closer to the svn_delta_editor_t callbacks. I guess it has a
theoretical elegance to it.

Execution time: No, no, no. Zero. Storing and retrieving data in a hash
table will not noticeably affect execution time. Contacting the
repository to read the base text of a file rather than reading it from
the '.svn' admin directory is an example of something that would affect
execution time. Get the big picture! :-)

> >> BTW, the callbacks already rely on a node deletion to come in before a node
> >> addition in order to detect a replace. (If it's related at all.)
> >
> > That is related in the sense that it's a case where we had to decide to
> > impose an ordering where initially we hadn't imposed it. We could
> > probably do the same, if we have to, in other respects: we could say
> > that from v1.6 onwards the order of calls is restricted to XYZ. But then
> > we'd need to consider what would happen when a new client connects to an
> > old server.
>
> Right. Blimey.
> Do you think we need the diff callbacks simplified that badly? Probably not.

No, I think we need them scrapped and to use the delta editor instead.

- Julian

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: dev-help_at_subversion.tigris.org
Received on 2008-11-07 10:55:42 CET

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.