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

Re: svn commit: r1188357 - /subversion/trunk/subversion/libsvn_delta/compat.c

From: C. Michael Pilato <cmpilato_at_collab.net>
Date: Mon, 24 Oct 2011 16:28:14 -0400

On 10/24/2011 04:24 PM, hwright_at_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 <cmpilato_at_collab.net>
CollabNet   <>   www.collab.net   <>   Distributed Development On Demand

Received on 2011-10-24 22:28:47 CEST

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.