On 10/24/2011 04:24 PM, hwri...@apache.org wrote:
> Author: hwright
> Date: Mon Oct 24 20:24:32 2011
> New Revision: 1188357

[...]

> Modified: subversion/trunk/subversion/libsvn_delta/compat.c
> URL: 
> http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_delta/compat.c?rev=1188357&r1=1188356&r2=1188357&view=diff
> ==============================================================================
> --- subversion/trunk/subversion/libsvn_delta/compat.c (original)
> +++ subversion/trunk/subversion/libsvn_delta/compat.c Mon Oct 24 20:24:32 2011

[...]

> @@ -753,6 +754,13 @@ add_directory_cb(void *baton,
>  {
>    struct editor_baton *eb = baton;
>  
> +  if (!eb->root_opened)
> +    {
> +      SVN_ERR(eb->deditor->open_root(eb->dedit_baton, SVN_INVALID_REVNUM,
> +                                     eb->edit_pool, &eb->root.baton));
> +      eb->root_opened = TRUE;
> +    }
> +

The sheer amount of repeated blocks of code in this commit pains me.  How
about an ensure_opened_root() helper that does this work?

-- 
C. Michael Pilato <cmpil...@collab.net>
CollabNet   <>   www.collab.net   <>   Distributed Development On Demand

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to