Greg Stein <gstein@lyra.org> writes:
> On Fri, Mar 29, 2002 at 03:35:07PM -0600, sussman@tigris.org wrote:
> >...
> > Reorganize the way 'svn diff' and 'svn merge' share a common diff
> > editor: instead of a single overloaded callback function to do
> > diff-related things, use a cleaner vtable. This allows us to smoothly
> > deal with directory additions and removals, and with propchanges.
>
> Hunh. Sounds kind of like an editor :-)
Yeah, very similar. I've essentially defined a 'sub-editor' that is
driven by the real editor. The *real* editor is being driven by
delta_dirs(), and is fetching temporary fulltexts when necessary. It
then notifies the 'sub-editor' that things have changed, and where to
find the tempfiles. The sub-editor can then choose to dump diffs to
the screen ('svn diff') or merge changes into working files ('svn
merge'). The single callback wasn't enough though, because we need to
do more than generate textual diffs. 'svn merge' actually needs to
schedule things for addition or deletion, too. Or merge props.
> > svn_error_t *svn_wc_get_diff_editor (svn_stringbuf_t *anchor,
> > svn_stringbuf_t *target,
> > - svn_diff_cmd_t diff_cmd,
> > + svn_diff_callbacks_t *diff_callbacks,
>
> Const-ify!
I'm going to paste a big "CONST" on my forehead. :-)
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Mon Apr 1 19:20:13 2002