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

Re: svn commit: r928299 - /subversion/trunk/subversion/libsvn_wc/update_editor.c

From: Hyrum K. Wright <hyrum_wright_at_mail.utexas.edu>
Date: Sat, 27 Mar 2010 20:46:48 -0500

On Mar 27, 2010, at 6:04 PM, gstein_at_apache.org wrote:

> Author: gstein
> Date: Sat Mar 27 23:04:28 2010
> New Revision: 928299
>
> URL: http://svn.apache.org/viewvc?rev=928299&view=rev
> Log:
> Simplify the multitude of notification calls.
>
> * subversion/libsvn_wc/update_editor.c:
> (do_notification): new helper function to do a notification call
> (complete_directory, open_root, do_entry_deletion, add_directory,
> open_directory, add_file, open_file): use new helper
>
> Modified:
> subversion/trunk/subversion/libsvn_wc/update_editor.c
>
> Modified: subversion/trunk/subversion/libsvn_wc/update_editor.c
> URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/update_editor.c?rev=928299&r1=928298&r2=928299&view=diff
> ==============================================================================
> --- subversion/trunk/subversion/libsvn_wc/update_editor.c (original)
> +++ subversion/trunk/subversion/libsvn_wc/update_editor.c Sat Mar 27 23:04:28 2010
> @@ -694,6 +694,25 @@ already_in_a_tree_conflict(svn_boolean_t
> apr_pool_t *scratch_pool);
>
>
> +static void
> +do_notification(const struct edit_baton *eb,

Why pass the entire edit baton here? You're only using the notify_func and notify_baton.

> + const char *local_abspath,
> + svn_node_kind_t kind,
> + svn_wc_notify_action_t action,
> + apr_pool_t *scratch_pool)
> +{
> + svn_wc_notify_t *notify;
> +
> + if (eb->notify_func == NULL)
> + return;
> +
> + notify = svn_wc_create_notify(local_abspath, action, scratch_pool);
> + notify->kind = kind;
> +
> + (*eb->notify_func)(eb->notify_baton, notify, scratch_pool);
> +}
> +
> +
> /* Helper for maybe_bump_dir_info():
>
> In a single atomic action, (1) remove any 'deleted' entries from a
...

-Hyrum
Received on 2010-03-28 03:47:15 CEST

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