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

Re: svn commit: r31196 - trunk/subversion/libsvn_client

From: Daniel Shahaf <d.s_at_daniel.shahaf.co.il>
Date: Thu, 15 May 2008 18:11:47 +0300 (Jerusalem Daylight Time)

kfogel_at_tigris.org wrote on Thu, 15 May 2008 at 07:44 -0700:
> Author: kfogel
> Date: Thu May 15 07:44:15 2008
> New Revision: 31196
>
> Log:
> Fix issue #3198: don't commit an add of a missing item.
>
> * subversion/libsvn_client/commit_util.c
> (harvest_committables): Check for existence before adding.
>
> Modified:
> trunk/subversion/libsvn_client/commit_util.c
>
> Modified: trunk/subversion/libsvn_client/commit_util.c
> URL: http://svn.collab.net/viewvc/svn/trunk/subversion/libsvn_client/commit_util.c?pathrev=31196&r1=31195&r2=31196
> ==============================================================================
> --- trunk/subversion/libsvn_client/commit_util.c Thu May 15 07:31:12 2008 (r31195)
> +++ trunk/subversion/libsvn_client/commit_util.c Thu May 15 07:44:15 2008 (r31196)
> @@ -438,8 +438,20 @@ harvest_committables(apr_hash_t *committ
> information about it. */
> if (state_flags & SVN_CLIENT_COMMIT_ITEM_ADD)
> {
> + svn_node_kind_t working_kind;
> svn_boolean_t eol_prop_changed;
>
> + /* First of all, the working file or directory must exist.
> + See issue #3198. */
> + svn_io_check_path(path, &working_kind, pool);

Need to check the returned error. (I saw this when you posted the patch
to the issue, but assumed you would catch that before commit.)

> + if (working_kind == svn_node_none)
> + {
> + return svn_error_createf
> + (SVN_ERR_WC_PATH_NOT_FOUND, NULL,
> + _("'%s' is scheduled for addition, but is missing"),
> + svn_path_local_style(path, pool));
> + }
> +
> /* See if there are property modifications to send. */
> SVN_ERR(check_prop_mods(&prop_mod, &eol_prop_changed, path,
> adm_access, pool));
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: svn-unsubscribe_at_subversion.tigris.org
> For additional commands, e-mail: svn-help_at_subversion.tigris.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: dev-help_at_subversion.tigris.org
Received on 2008-05-15 17:12:13 CEST

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