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

Re: svn commit: r39178 - trunk/subversion/libsvn_wc

From: Greg Stein <gstein_at_gmail.com>
Date: Tue, 8 Sep 2009 05:55:20 -0400

On Mon, Sep 7, 2009 at 22:10, Hyrum K. Wright<hyrum_at_hyrumwright.org> wrote:
>...
> +++ trunk/subversion/libsvn_wc/copy.c   Mon Sep  7 19:10:38 2009        (r39178)
>...
> @@ -830,31 +827,33 @@ copy_dir_administratively(const char *sr
>     if (src_entry->copied)
>       {
>         const svn_wc_entry_t *dst_entry;
> -        SVN_ERR(svn_wc_entry(&dst_entry, dst_path, dst_parent, FALSE, pool));
> +        SVN_ERR(svn_wc_entry(&dst_entry, dst_path, dst_parent, FALSE,
> +                             scratch_pool));
>         SVN_ERR(determine_copyfrom_info(&copyfrom_url, &copyfrom_rev, db,
>                                         src_abspath, src_entry, dst_entry,
> -                                        pool, pool));
> +                                        scratch_pool, scratch_pool));
>
>         /* The URL for a copied dir won't exist in the repository, which
>            will cause  svn_wc_add2() below to fail.  Set the URL to the
>            URL of the first copy for now to prevent this. */
> -        tmp_entry.url = apr_pstrdup(pool, copyfrom_url);
> +        tmp_entry.url = apr_pstrdup(scratch_pool, copyfrom_url);
>         SVN_ERR(svn_wc__entry_modify(adm_access, NULL, /* This Dir */
>                                      &tmp_entry,
> -                                     SVN_WC__ENTRY_MODIFY_URL, pool));
> +                                     SVN_WC__ENTRY_MODIFY_URL, scratch_pool));

why dup the URL? The function which assigned it put it into the
scratch_pool (seeing the 'result_pool' arg for
determine_copyfrom_info), *and* entry_modify() is going to make a copy
of it into the proper pool regardless.

>...

Cheers,
-g

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2392301
Received on 2009-09-08 11:55:39 CEST

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.