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

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

From: C. Michael Pilato <cmpilato_at_collab.net>
Date: 2006-04-05 15:53:56 CEST

Madan U S wrote:
>> @@ -242,7 +245,10 @@
>> = apr_hash_get(atts, SVN_WC__ENTRY_ATTR_URL, APR_HASH_KEY_STRING);
>>
>> if (entry->url)
>> - *modify_flags |= SVN_WC__ENTRY_MODIFY_URL;
>> + {
>> + *modify_flags |= SVN_WC__ENTRY_MODIFY_URL;
>> + entry->url = apr_pstrdup(pool, entry->url);
>
> sorry, I dont understand why this is done... could you pl. explain this,
> lundblad? (There are other similar usages of apr_pstrdup() in the rest
> of the diff, but am taking this as an example)

Now that Peter made the bulk of this entry cache reading stuff use a
temporary "scratch_pool", he needs to copy select bits of information from
that pool and into the longer-lived "pool" so that they survive beyond his
clearing of the "scratch_pool". And he's cleverly just updating the
structure members (such as entry->url) from pointing to data-in-scratch-pool
to pointing to data-in-pool instead of futzing with both a structure named
"entry" and one named "scratch_entry" (or the likes).

-- 
C. Michael Pilato <cmpilato@collab.net>
CollabNet   <>   www.collab.net   <>   Distributed Development On Demand

Received on Wed Apr 5 15:55:04 2006

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.