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

Re: [PATCH 05/13] Drive the debug editor

From: Ramkumar Ramachandra <artagnon_at_gmail.com>
Date: Thu, 8 Jul 2010 08:04:53 +0200

Jonathan Nieder writes:
> Ramkumar Ramachandra wrote:
> > Jonathan Nieder writes:
> >> Ramkumar Ramachandra wrote:
>
> >>> - de->apply_textdelta = apply_textdelta;
> >>> + /* de->apply_textdelta = apply_textdelta; */
> [...]
> > Without this, the program segfaults because the necessary setup for
> > applying a text delta hasn't been set up. Perhaps I should explain
> > this in my commit message?
>
> Is the default apply_textdelta not a no-op? What work does it have to
> do, and can the skeleton editor be convinced to do the same in patch 4?

The default editor does this:
  *handler = svn_delta_noop_window_handler;
  *handler_baton = NULL;
  return SVN_NO_ERROR;

Fixed.

> >>> +{
> >>> + /* Extract editor and editor_baton from the replay_baton and
> >>> + set them so that the editor callbacks can use them */
> >>
> >> This comment just paraphrases the code. What in particular requires
> >> explanation here?
> >
> > This concept took me some time to wrap my head around: I had to stuff
> > the replay_baton with the editor/ editor_baton so that I could set
> > them for use in the callback functions.
>
> Ah, okay. Then I suppose it belongs in the commit message.
>
> Alternatively: why does the tree editor have to persist between calls
> replaying the various revisions? That information could help the
> reader understand what is going on.

Right. The editor_baton is the key item that's guaranteed to be passed
around. Fixed.

-- Ram
Received on 2010-07-08 08:03:55 CEST

This is an archived mail posted to the Subversion Dev mailing list.