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

Re: svn_wc_get_change_walker()

From: Greg Stein <gstein_at_lyra.org>
Date: 2000-09-02 10:24:43 CEST

On Fri, Sep 01, 2000 at 09:53:29PM -0500, Karl Fogel wrote:
> I wrote:
> > Greg, we should talk sometime about svn_wc_get_change_walker() and how
> > it relates to svn_wc_apply_delta(). Just to sync up, I mean -- I see
> > the rationale for the new function and all that, just want to make
> > sure we don't end up duplicating code.
> >
> > In the meantime, I won't touch it, will just work on
> > svn_wc_apply_delta().
>
> Actually, now that I think about it more, I don't see why we'd have
> both functions:
>
> - The only known purpose of svn_wc_apply_delta() is to effect
> updates/checkouts from some source (most likely the RA layer).

apply_delta calls the XML parser to generate events against the walker
structure. The input comes from read_fn/delta_src.

IOW, it is specific to the XML walker-event producer.

> - The only known purpose of svn_wc_get_change_walker() is to effect
> updates/checkouts from some source (most likely the RA layer).

Nope. It returns a walker that *any* change-producer can use.

The theory is that the client library calls get_change_walker and passes
that to the RA layer when a checkout/update is being performed.

> Therefore, my first instinct is that we don't both of these. :-)

Yup. apply_delta should go away. Producers will call into a walker
structure.

> What is it that get_change_walker() gets us that apply_delta()
> doesn't, or vice versa? Let's see if we can't merge these...

apply_delta is an XML-based "pull" model for generating changes. It pulls
XML content from the read_fn.

get_change_walker is for anybody that needs to "push" changes into a walker.

IMO, apply_delta goes and some other part of the library does something like
this:

    svn_wc_get_change_walker(...)
    svn_xml_parse(...)

That code will occur whereever you happen to get the XML from.

At a minimum, keep apply_delta, but call it something like
apply_xml_delta().

Cheers,
-g

-- 
Greg Stein, http://www.lyra.org/
Received on Sat Oct 21 14:36:07 2006

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.