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

Re: svn commit: rev 1610 - trunk/subversion/include trunk/subversion/libsvn_wc trunk/subversion/libsvn_client

From: Greg Stein <gstein_at_lyra.org>
Date: 2002-03-30 01:33:24 CET

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 :-)

>...
> * svn_types.h
>
> (svn_diff_action_t, svn_diff_cmd_t): remove these prototypes...

Woo! I never did like that stuff in there...

>...
> +++ trunk/subversion/include/svn_wc.h Fri Mar 29 15:35:01 2002
>...
> @@ -911,7 +911,7 @@
> */
> 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!

>...
> @@ -931,7 +931,7 @@
> */
> svn_error_t *svn_wc_diff (svn_stringbuf_t *anchor,
> svn_stringbuf_t *target,
> - svn_diff_cmd_t diff_cmd,
> + svn_diff_callbacks_t *diff_callbacks,

Ditto.

>...
> +++ trunk/subversion/libsvn_wc/diff.c Fri Mar 29 15:35:02 2002
> @@ -56,9 +56,9 @@
> svn_stringbuf_t *anchor;
> svn_stringbuf_t *target;
>
> - /* The callback and callback argument that implement the file comparison
> - function */
> - svn_diff_cmd_t diff_cmd;
> + /* The callbacks and callback argument that implement the file comparison
> + functions */
> + svn_diff_callbacks_t *diff_callbacks;

And again...

>...
> static struct edit_baton *
> make_editor_baton (svn_stringbuf_t *anchor,
> svn_stringbuf_t *target,
> - svn_diff_cmd_t diff_cmd,
> + svn_diff_callbacks_t *diff_callbacks,

One more...

>...
> +/* The main callback table for 'svn diff'. */
> +static svn_diff_callbacks_t
> +diff_callbacks =
> + {

This can be const, once the above functions are const-ified.

>...
> +/* The main callback table for 'svn merge'. */
> +static svn_diff_callbacks_t
> +merge_callbacks =
> + {

Ditto.

>...
> +++ trunk/subversion/libsvn_client/repos_diff.c Fri Mar 29 15:35:02 2002
> @@ -43,7 +43,7 @@
>
> /* The callback and calback argument that implement the file comparison
> function */
> - svn_diff_cmd_t diff_cmd;
> + svn_diff_callbacks_t *diff_callbacks;

And again :-)

Cheers,
-g

-- 
Greg Stein, http://www.lyra.org/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Mar 30 01:29:47 2002

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