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

RE: svn commit: r1569697 - create a diff processor in one place...

From: Bert Huijben <bert_at_qqmail.nl>
Date: Wed, 19 Feb 2014 17:52:37 +0100

> -----Original Message-----
> From: Julian Foad [mailto:julianfoad_at_btopenworld.com]
> Sent: woensdag 19 februari 2014 13:58
> To: Bert Huijben
> Cc: dev_at_subversion.apache.org
> Subject: Re: svn commit: r1569697 - create a diff processor in one
place...
>
> Hi Bert. I like what you're doing here. Here's a quick review.
>
> > URL: http://svn.apache.org/r1569697
> > Log:
> > Following up on r1569551, update the libsvn_client 'svn diff' code to
> > create adiff processor in one place and directly pass that to all the
> > different diff implementations.
> >
> > Move handling of all arguments that are only used for tree
transformations
> > to libsvn_client (and the deprecated apis).
> >
> > * subversion/include/private/svn_client_private.h
> >   (includes): Add private/svn_diff_tree.h.
> >
> > * subversion/include/private/svn_wc_private.h
> >   (svn_wc__get_diff_editor): Update argument type.
> >
> > * subversion/libsvn_client/diff.c
> >   (diff_wc_wc): Update caller. Use anchor output argument.
> >   (diff_repos_repos): Update argument type. Switch argument order.
> >   (diff_repos_wc): Update caller.
> >   (do_diff): Create diff processor. Update caller.
> >
> >   (diff_summarize_repos_wc,
> >    diff_summarize_wc_wc,
> >    do_diff_summarize): Update caller.
> >
> > * subversion/libsvn_client/diff_local.c
> >   (svn_client__arbitrary_nodes_diff): Use diff processor argument. Pass
> anchor
> >     to interested callers.
> >
> > * subversion/libsvn_wc/deprecated.c
> >   (svn_wc_get_diff_editor6): Update caller.
> >
> > * subversion/libsvn_wc/diff_editor.c
> >   (make_edit_baton,
> >    svn_wc__get_diff_editor): Update argument type. Remove now unused
> arguments.
> >
> > * subversion/libsvn_wc/diff_local.c
> >   (diff_baton): Remove unused variable.
> >   (svn_wc_diff6): Rename to...
> >   (svn_wc__diff7): ... this. Update argument type. Remove now unused
> arguments.
> >     Allow providing anchor as output argument.
> >   (svn_wc_diff6): Reimplement as new function wrapping svn_wc__diff7.
>
> > Modified:
> subversion/trunk/subversion/include/private/svn_client_private.h
> >
> ==========================================================
> ====================
> > /* Produce a diff with depth DEPTH between two files or two directories
at
> > - * LOCAL_ABSPATH1 and LOCAL_ABSPATH2, using the provided diff
> callbacks to
> > + * LEFT_ABSPATH1 and RIGHT_ABSPATH, using the provided diff callbacks
> to
>
> s/LEFT_ABSPATH1/LEFT_ABSPATH/
>
> >   * show changes in files. The files and directories involved may be
part of
> >   * a working copy or they may be unversioned. For versioned files, show
> > - * property changes, too. */
> > + * property changes, too.
> > + *
> > + * If ANCHOR_ABSPATH is not null, set it to the anchor of the diff
before
> > + * the first processor call. (The anchor is LEFT_ABSPATH or an ancestor
of
> it)
>
> What is the meaning or purpose of this "anchor" path?

No time for a full reply, but this is necessary for proper calculation of
the full path in diffs.

Currently (at 1.8) we duplicate anchor calculations in many places... See
followup patches which use this to remove duplicated code.

        Bert
Received on 2014-02-19 17:53:18 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.