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

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

From: Greg Stein <gstein_at_gmail.com>
Date: Sat, 31 Oct 2009 06:56:26 -0400

On Fri, Oct 30, 2009 at 15:13, Paul T. Burba <pburba_at_collab.net> wrote:
>...
> +++ trunk/subversion/libsvn_client/commit_util.c        Fri Oct 30 12:13:01 2009        (r40317)
> @@ -1021,18 +1021,18 @@ svn_client__harvest_committables(apr_has
>         {
>           const char *parent_abspath = svn_dirent_dirname(target_abspath,
>                                                           subpool);
> -          const svn_wc_entry_t *p_entry;
> +          svn_boolean_t is_added;
>
> -          SVN_ERR(svn_wc__maybe_get_entry(&p_entry, ctx->wc_ctx,
> -                                          parent_abspath, svn_node_dir,
> -                                          FALSE, FALSE, subpool, subpool));
> -          if (! p_entry)
> +          err = svn_wc__node_is_status_added(&is_added, ctx->wc_ctx,
> +                                             parent_abspath, subpool);
> +          if (err && err->apr_err == SVN_ERR_WC_PATH_NOT_FOUND)
>             return svn_error_createf
>               (SVN_ERR_WC_CORRUPT, NULL,
> -               _("'%s' is scheduled for addition within unversioned parent"),
> -               svn_dirent_local_style(target, pool));
> -          if ((p_entry->schedule == svn_wc_schedule_add)
> -              || (p_entry->schedule == svn_wc_schedule_replace))
> +              _("'%s' is scheduled for addition within unversioned parent"),
> +              svn_dirent_local_style(target, pool));
> +          SVN_ERR(err);

err is leaked in the PATH_NOT_FOUND case.

Cheers,
-g

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2413207
Received on 2009-10-31 11:56:39 CET

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