From dev-return-2530-daniel=haxx.se@subversion.apache.org Thu Mar 11 03:05:30 2010 Return-Path: Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by giant.haxx.se (8.14.3/8.14.3/Debian-9) with SMTP id o2B25TBa021070 for ; Thu, 11 Mar 2010 03:05:29 +0100 Received: (qmail 9330 invoked by uid 500); 11 Mar 2010 02:05:24 -0000 Mailing-List: contact dev-help@subversion.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list dev@subversion.apache.org Received: (qmail 9322 invoked by uid 99); 11 Mar 2010 02:05:24 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 11 Mar 2010 02:05:24 +0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of gstein@gmail.com designates 74.125.92.150 as permitted sender) Received: from [74.125.92.150] (HELO qw-out-1920.google.com) (74.125.92.150) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 11 Mar 2010 02:05:23 +0000 Received: by qw-out-1920.google.com with SMTP id 5so629599qwf.22 for ; Wed, 10 Mar 2010 18:05:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=69wT7GPaf55Zm6EVCB+OyXmhzrbeoCpncHc/bVoJwvA=; b=OeegyCAEQMZRP0qXxFx/0INBAh1fk2/dttvaAmmSpvBgMR7600lqR8eGdR3S6KBOki M/jqpZbxFfUc/VfV6Q+1Hrp/iVkHTxm0lhxLHn1sW71cWKctx7QO9nwol2raSgvLs41m iv4Lve91xj0a8U/cy7JB7V+apkbj9g/HO9f2E= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=MIKIt7PtbeEJrSHXx2/dGgGCBxxBk3cu9nMR1UN4YrK9brBg09JT0X4u4fKX6J6dxu FRG18Dh0G2lTSZwgSQ/0/X8Vb5EGsYH6THpz/D6MnNY9o5+LpFraK9BYai3hbq7KvawA iijvAdYiI90Ts83e35WkeIjcvF/grmJWB+ev4= MIME-Version: 1.0 Received: by 10.229.11.220 with SMTP id u28mr1525834qcu.64.1268273102024; Wed, 10 Mar 2010 18:05:02 -0800 (PST) In-Reply-To: <20100309223706.CACAB23889E7@eris.apache.org> References: <20100309223706.CACAB23889E7@eris.apache.org> Date: Wed, 10 Mar 2010 21:05:01 -0500 Message-ID: <6cca3db31003101805ia599028h8927e0e1cb832319@mail.gmail.com> Subject: Re: svn commit: r921179 - /subversion/trunk/subversion/libsvn_wc/adm_ops.c From: Greg Stein To: dev@subversion.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On Tue, Mar 9, 2010 at 17:37, wrote: >... > +++ subversion/trunk/subversion/libsvn_wc/adm_ops.c Tue Mar =A09 22:37:06= 2010 > @@ -1268,22 +1268,49 @@ svn_wc_get_ancestry2(const char **url, > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 resul= t_pool, scratch_pool)); > =A0} > > -/* Recursively mark a tree DIR_ABSPATH with a COPIED flag, skip items > - =A0 scheduled for deletion. */ > +/* Helper for mark_tree_copied(), handling the property juggling and > + =A0 state changes for a single item LOCAL_ABSPATH (of kind LOCAL_KIND).= */ > +static svn_error_t * > +mark_item_copied(svn_wc__db_t *db, > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 const char *local_abspath, > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 svn_wc__db_kind_t local_kind, > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 apr_pool_t *pool) This new function/param should be named scratch_pool. All new funcs in libsvn_wc should use the result_pool and scratch_pool naming/paradigm. Pushing that out to other libraries is also a Good Thing, but definitely for wc. > +{ > + =A0apr_hash_t *props; > + =A0svn_wc_entry_t tmp_entry; > + =A0svn_node_kind_t kind =3D > + =A0 =A0local_kind =3D=3D svn_wc__db_kind_dir ? svn_node_dir : svn_node_= unknown; > + > + =A0/* Squirrel away the pristine properties to install them on > + =A0 =A0 working, because we might delete the base table */ > + =A0SVN_ERR(svn_wc__db_read_pristine_props(&props, db, local_abspath, > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0= =A0 =A0 pool, pool)); > + =A0tmp_entry.copied =3D TRUE; > + =A0SVN_ERR(svn_wc__entry_modify2(db, local_abspath, kind, FALSE, &tmp_e= ntry, > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0SVN_WC__= ENTRY_MODIFY_COPIED, pool)); The old code also did this for parent_stub=3DTRUE. You've now lost that... >... > @@ -1307,64 +1335,38 @@ mark_tree_copied(svn_wc__db_t *db, > =A0 =A0 =A0 if (hidden) > =A0 =A0 =A0 =A0 continue; > > - =A0 =A0 =A0SVN_ERR(svn_wc__get_entry(&entry, db, child_abspath, FALSE, > - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0svn_node= _unknown, FALSE, iterpool, iterpool)); > + =A0 =A0 =A0SVN_ERR(svn_wc__db_read_info(&child_status, &child_kind, NUL= L, NULL, > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 NUL= L, NULL, NULL, NULL, NULL, NULL, NULL, > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 NUL= L, NULL, NULL, NULL, NULL, NULL, NULL, > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 NUL= L, NULL, NULL, NULL, NULL, NULL, > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 db,= child_abspath, iterpool, iterpool)); > > =A0 =A0 =A0 /* Skip deleted items. */ > - =A0 =A0 =A0if (entry->schedule =3D=3D svn_wc_schedule_delete) > + =A0 =A0 =A0if ((child_status =3D=3D svn_wc__db_status_deleted) || > + =A0 =A0 =A0 =A0 =A0(child_status =3D=3D svn_wc__db_status_obstructed_de= lete)) > =A0 =A0 =A0 =A0 continue; > > - =A0 =A0 =A0/* If this is a directory, recurse. */ > - =A0 =A0 =A0if (entry->kind =3D=3D svn_node_dir) > + =A0 =A0 =A0/* If this is a directory, recurse; otherwise, do real work.= */ > + =A0 =A0 =A0if (child_kind =3D=3D svn_wc__db_kind_dir) > =A0 =A0 =A0 =A0 { > - =A0 =A0 =A0 =A0 =A0SVN_ERR(mark_tree_copied(db, child_abspath, > - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0cancel_func, can= cel_baton, > - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0iterpool)); > + =A0 =A0 =A0 =A0 =A0SVN_ERR(mark_tree_copied(db, child_abspath, child_st= atus, > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 can= cel_func, cancel_baton, iterpool)); > + =A0 =A0 =A0 =A0} > + =A0 =A0 =A0else > + =A0 =A0 =A0 =A0{ > + =A0 =A0 =A0 =A0 =A0SVN_ERR(mark_item_copied(db, child_abspath, child_ki= nd, iterpool)); > =A0 =A0 =A0 =A0 } > - > - =A0 =A0 =A0/* Store the pristine properties to install them on working,= because > - =A0 =A0 =A0 =A0 we might delete the base table */ > - =A0 =A0 =A0if (entry->kind !=3D svn_node_dir) > - =A0 =A0 =A0 =A0SVN_ERR(svn_wc__db_read_pristine_props(&props, db, child= _abspath, > - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0= =A0 =A0 =A0 =A0 =A0 iterpool, iterpool)); > - =A0 =A0 =A0tmp_entry.copied =3D TRUE; > - =A0 =A0 =A0SVN_ERR(svn_wc__entry_modify2(db, child_abspath, svn_node_un= known, > - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0TRUE, &tmp_entry= , > - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0SVN_WC__ENTRY_MO= DIFY_COPIED, > - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0iterpool)); This is the part which got lost. >... I'm assuming you got no test errors, so I'm wondering what is going on. It is really hard to trace the ->copied flag thru the entries writing code. Cheers, -g