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

Re: svn commit: r921588 - in /subversion/trunk/subversion: include/svn_wc.h libsvn_wc/adm_files.h libsvn_wc/adm_ops.c

From: Neels J Hofmeyr <neels_at_elego.de>
Date: Fri, 12 Mar 2010 02:20:13 +0100

Greg Stein wrote:
> On Wed, Mar 10, 2010 at 17:00, <neels_at_apache.org> wrote:
>> ...
>> +++ subversion/trunk/subversion/libsvn_wc/adm_ops.c Wed Mar 10 22:00:38 2010
>> @@ -2208,17 +2208,39 @@ svn_wc__get_pristine_contents(svn_stream
>> apr_pool_t *result_pool,
>> apr_pool_t *scratch_pool)
>> {
>> + svn_wc__db_status_t status;
>> const char *text_base;
>>
>> - SVN_ERR(svn_wc__text_base_path(&text_base, db, local_abspath, FALSE,
>> - scratch_pool));
>> -
>> - if (text_base == NULL)
>> + SVN_ERR(svn_wc__db_read_info(&status,
>> + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
>> + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
>> + NULL, NULL, NULL, NULL, NULL, NULL, NULL,
>> + db, local_abspath, scratch_pool, scratch_pool));
>
> You can read the KIND at the same time here, and early-out for non-files.
>
>> + if (status == svn_wc__db_status_added)
>
> You should also check for obstructed_add. This could be a local copy
> of a file, and the user rm'd the file and put a directory there. You
> still want access to the underlying pristine.

r921848, but since now bailing on non-files, obstructed_add should not
happen -- thus just added an ASSERT for that.

~Neels

Received on 2010-03-12 02:21:54 CET

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.