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

Re: svn commit: r14849 - in trunk/subversion: tests/clients/cmdline

From: Brian W. Fitzpatrick <fitz_at_collab.net>
Date: 2005-05-27 18:15:18 CEST

On May 27, 2005, at 10:27 AM, kfogel@collab.net wrote:

> fitz@tigris.org writes:
>
>> Log:
>> Fix locking bug that occurs when locking a switched file. The
>> failing
>> test was committed in r14774 but is now passing (with minor changes).
>>
>
> Was this issue #2307? Log should say so, if so.

Well so it is! *sound of typing*

>> @@ -255,14 +269,71 @@
>> return svn_error_createf (SVN_ERR_ENTRY_MISSING_URL,
>> NULL,
>> _("'%s' has no URL"),
>> svn_path_local_style
>> (target, pool));
>> -
>> +
>> + (*((const char **)(apr_array_push (urls)))) = apr_pstrdup
>> + (pool, entry->url);
>> +
>> +
>> + }
>>
>
> Is there some reason we're not using a subpool for at least the tmp
> work in that 'for' loop?

Oversight. I'll fix in a moment.

>> + *rel_urls_p = urls_hash;
>> + *common_parent = common_url;
>> +
>> + /* Now that we've got the relative URLs, gather our
>> targets. */
>> + for (i = 0; i < rel_targets->nelts; i++)
>> + {
>> + const svn_wc_entry_t *entry;
>> + const char *target = ((const char **) (rel_targets-
>> >elts))[i];
>> + const char *url = ((const char **) (rel_urls->elts))[i];
>> + const char *abs_path;
>> +
>> + abs_path = svn_path_join
>> + (svn_wc_adm_access_path (*parent_adm_access_p),
>> target, pool);
>> +
>> + SVN_ERR (svn_wc_entry (&entry, abs_path,
>> *parent_adm_access_p, FALSE,
>> + pool));
>> +
>> if (do_lock) /* Lock. */
>> {
>> svn_revnum_t *revnum;
>> revnum = apr_palloc (pool, sizeof (* revnum));
>> *revnum = entry->revision;
>>
>> - apr_hash_set (rel_targets_ret, apr_pstrdup (pool,
>> target),
>> + apr_hash_set (rel_targets_ret, apr_pstrdup (pool,
>> url),
>> APR_HASH_KEY_STRING, revnum);
>> }
>> else /* Unlock. */
>>
>
> On the other hand, the gather-targets loop could use a subpool for its
> tmp operations.

Yep. Will do.

Thanks,

-Fitz

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Fri May 27 18:17:13 2005

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