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

RE: svn commit: r906016 - /subversion/trunk/subversion/libsvn_client/patch.c

From: Bert Huijben <bert_at_qqmail.nl>
Date: Wed, 3 Feb 2010 13:27:31 +0100

> -----Original Message-----
> From: stsp_at_apache.org [mailto:stsp_at_apache.org]
> Sent: woensdag 3 februari 2010 12:54
> To: commits_at_subversion.apache.org
> Subject: svn commit: r906016 -
> /subversion/trunk/subversion/libsvn_client/patch.c
>
> Author: stsp
> Date: Wed Feb 3 11:53:32 2010
> New Revision: 906016
>
> URL: http://svn.apache.org/viewvc?rev=906016&view=rev
> Log:
> * subversion/libsvn_client/patch.c
> (apply_one_patch): Check for existing unversioned, ignored, or obstructed
> directories when creating missing parent directories for a target,
> and skip the target if its parent directory cannot be created.
>
> Modified:
> subversion/trunk/subversion/libsvn_client/patch.c
>
> Modified: subversion/trunk/subversion/libsvn_client/patch.c
> URL:
> http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/p
> atch.c?rev=906016&r1=906015&r2=906016&view=diff
> ==========================================================
> ====================
> --- subversion/trunk/subversion/libsvn_client/patch.c (original)
> +++ subversion/trunk/subversion/libsvn_client/patch.c Wed Feb 3 11:53:32
> 2010
> @@ -1229,6 +1229,7 @@
> for (i = 0; i < missing_components; i++)
> {
> const char *component;
> + svn_wc_status2_t *status;
>
> svn_pool_clear(iterpool);
>
> @@ -1236,6 +1237,18 @@
> const char *);
> abs_path = svn_dirent_join(abs_path, component,
> pool);
> +
> + /* Skip things we should not be messing with. */
> + SVN_ERR(svn_wc_status3(&status, ctx->wc_ctx, abs_path,
> + iterpool, iterpool));
> + if (status->text_status == svn_wc_status_unversioned ||
> + status->text_status == svn_wc_status_ignored ||
> + status->text_status == svn_wc_status_obstructed)
> + {
> + target->skipped = TRUE;
> + break;
> + }

I thinks something like svn_wc__node_get_kind() would be enough here. svn_wc_status() does a status scan (Compare against pristine) which you don't need here.

I'm not sure what a proper way of handling obstructed (file<->dir misplacement) is after that change, but I doubt if it is relevant if you try other operations that assume a specific kind later on.

        Bert
Received on 2010-02-03 13:28:05 CET

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.