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

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

From: Greg Stein <gstein_at_gmail.com>
Date: Wed, 4 Mar 2009 17:13:30 +0100

my mistake... I had some local weirdness. we've actually fixed a few
dozen tests with the change below. new numbers:

  1015 tests PASSED
  24 tests SKIPPED
  24 tests XFAILED
  84 tests FAILED
  2 tests XPASSED

On Wed, Mar 4, 2009 at 16:05, Greg Stein <gstein_at_gmail.com> wrote:
> Oop. There are a number of regressions with this change, including in
> basic_tests. I'll get 'em fixed up shortly.
>
> Three steps forward... two steps back...
>
> On Wed, Mar 4, 2009 at 15:28, Greg Stein <gstein_at_gmail.com> wrote:
>> Author: gstein
>> Date: Wed Mar  4 06:28:05 2009
>> New Revision: 36307
>>
>> Log:
>> Refine the SCHEDULE field of returned entries, and make sure that DELETED
>> nodes are recorded properly.
>>
>> * subversion/libsvn_wc/entries.c:
>>  (read_entries): for added nodes, it might be a simple add (rather than
>>    replace) when there isn't a node in the current BASE tree (ie. the
>>    database records it as "not present at this revision"). if we're
>>    attempting to reading all the entries for a directory, and that
>>    directory is obstructed/missing, then the dir itself should be listed
>>    as schedule "normal" (the real state is in the parent). lastly, any
>>    entry marked DELETED should be in the "normal" state since we aren't
>>    actually going to try and delete anything.
>>  (write_entry): a node that is marked DELETED should get a row in the
>>    BASE_NODE table to record its not-present status.
>>
>> Modified:
>>   trunk/subversion/libsvn_wc/entries.c
>>
>> Modified: trunk/subversion/libsvn_wc/entries.c
>> URL: http://svn.collab.net/viewvc/svn/trunk/subversion/libsvn_wc/entries.c?pathrev=36307&r1=36306&r2=36307
>> ==============================================================================
>> --- trunk/subversion/libsvn_wc/entries.c        Wed Mar  4 05:07:13 2009        (r36306)
>> +++ trunk/subversion/libsvn_wc/entries.c        Wed Mar  4 06:28:05 2009        (r36307)
>> @@ -1030,20 +1030,37 @@ read_entries(svn_wc_adm_access_t *adm_ac
>>
>>           if (base_shadowed)
>>             {
>> -              entry->schedule = svn_wc_schedule_replace;
>> +              svn_wc__db_status_t base_status;
>>
>>               /* ### mystery: make the rev same as BASE. */
>> -              SVN_ERR(svn_wc__db_base_get_info(NULL, NULL,
>> +              SVN_ERR(svn_wc__db_base_get_info(&base_status, NULL,
>>                                                &entry->revision,
>>                                                NULL, NULL, NULL,
>>                                                NULL, NULL, NULL,
>>                                                NULL, NULL, NULL, NULL,
>>                                                db, entry_abspath,
>>                                                iterpool, iterpool));
>> +
>> +              if (base_status == svn_wc__db_status_not_present)
>> +                {
>> +                  /* ### the underlying node is DELETED in this revision.  */
>> +                  entry->deleted = TRUE;
>> +
>> +                  /* This is an add since there isn't a node to replace.  */
>> +                  entry->schedule = svn_wc_schedule_add;
>> +                }
>> +              else
>> +                entry->schedule = svn_wc_schedule_replace;
>>             }
>>           else
>>             {
>> -              entry->schedule = svn_wc_schedule_add;
>> +              /* ### when we're reading a directory that is not present,
>> +                 ### then it must be "normal" rather than "add".  */
>> +              if (*entry->name == '\0'
>> +                  && status == svn_wc__db_status_obstructed_add)
>> +                entry->schedule = svn_wc_schedule_normal;
>> +              else
>> +                entry->schedule = svn_wc_schedule_add;
>>
>>               /* ### if this looks like a plain old add, then rev=0.  */
>>               if (!SVN_IS_VALID_REVNUM(entry->copyfrom_rev)
>> @@ -1087,7 +1104,10 @@ read_entries(svn_wc_adm_access_t *adm_ac
>>         }
>>       else if (status == svn_wc__db_status_not_present)
>>         {
>> -          entry->schedule = svn_wc_schedule_delete;
>> +          /* ### buh. 'deleted' nodes are actually supposed to be
>> +             ### schedule "normal" since we aren't going to actually *do*
>> +             ### anything to this node at commit time.  */
>> +          entry->schedule = svn_wc_schedule_normal;
>>           entry->deleted = TRUE;
>>         }
>>       else if (status == svn_wc__db_status_obstructed)
>> @@ -1572,6 +1592,13 @@ write_entry(svn_sqlite__db_t *wc_db,
>>         break;
>>     }
>>
>> +  /* Something deleted in this revision means there should always be a
>> +     BASE node to indicate the not-present node.  */
>> +  if (entry->deleted)
>> +    {
>> +      base_node = MAYBE_ALLOC(base_node, scratch_pool);
>> +    }
>> +
>>   if (entry->copied)
>>     {
>>       /* Make sure we get a WORKING_NODE inserted. The copyfrom information
>>
>> ------------------------------------------------------
>> http://subversion.tigris.org/ds/viewMessage.do?dsForumId=495&dsMessageId=1266997
>>
>

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=1267449
Received on 2009-03-04 17:13:45 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.