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

RE: svn commit: r1188774 - /subversion/trunk/subversion/libsvn_client/externals.c

From: Bert Huijben <bert_at_qqmail.nl>
Date: Wed, 26 Oct 2011 17:17:36 +0200

> -----Original Message-----
> From: stsp_at_apache.org [mailto:stsp_at_apache.org]
> Sent: dinsdag 25 oktober 2011 18:40
> To: commits_at_subversion.apache.org
> Subject: svn commit: r1188774 -
> /subversion/trunk/subversion/libsvn_client/externals.c
>
> Author: stsp
> Date: Tue Oct 25 16:39:37 2011
> New Revision: 1188774
>
> URL: http://svn.apache.org/viewvc?rev=1188774&view=rev
> Log:
> Fix issue #4044, "empty parents of externals not removed along with
> externals
> on update".
>
> * subversion/libsvn_client/externals.c
> (svn_client__handle_externals): When removing externals, remove the
> defining directory if it ends up being unversioned and empty.
> This is a workaround for our inability to remove the defining
> dir when delete_entry() in the update editor is called for it.
> At that point, external children have not been removed yet, so
> the update editor leaves the directory behind on disk, unversioned,
> because it isn't empty.
>
> Modified:
> subversion/trunk/subversion/libsvn_client/externals.c
>
> Modified: subversion/trunk/subversion/libsvn_client/externals.c
> URL:
> http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/e
> xternals.c?rev=1188774&r1=1188773&r2=1188774&view=diff
> ==========================================================
> ====================
> --- subversion/trunk/subversion/libsvn_client/externals.c (original)
> +++ subversion/trunk/subversion/libsvn_client/externals.c Tue Oct 25
> 16:39:37 2011
> @@ -943,6 +943,7 @@ svn_client__handle_externals(apr_hash_t
> {
> const char *item_abspath = svn__apr_hash_index_key(hi);
> const char *defining_abspath = svn__apr_hash_index_val(hi);
> + svn_wc_status3_t *defining_status;
>
> svn_pool_clear(iterpool);
>
> @@ -951,6 +952,20 @@ svn_client__handle_externals(apr_hash_t
> handle_external_item_removal(&eb, defining_abspath,
> item_abspath, iterpool),
> iterpool));
> +
> + /* Is DEFINING_ABSPATH now an unversioned directory we can
> remove? */
> + SVN_ERR(svn_wc_status3(&defining_status, ctx->wc_ctx,
> defining_abspath,
> + iterpool, iterpool));

Defining abspath is the directory that contain(s/ed) the svn:externals property, not the parent of the externals directory. There may be several levels inbetween as you can define externals on any subdirectory level.

The check should be on the parent of the external and probably recurse upwards.

For the backport: I'm not sure if this is really a problem that we must fix. The same behavior applies to any unversioned directory.

        Bert
Received on 2011-10-26 17:18:14 CEST

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