On Sep 8, 2009, at 4:55 AM, Greg Stein wrote:
> 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(©from_url,
>> ©from_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.
Agreed, but I just updated the code, not wrote it. In any case
svn_wc__entry_modify() and friends are not long for this earth, so I'd
rather not worry about it.
-Hyrum
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2392656
Received on 2009-09-08 23:05:22 CEST