Login | Register
My pages Projects Community openCollabNet

Discussions > dev [DISABLED] > Re: svn commit: r38518 - in trunk/subversion: include libsvn_wc

subversion
Discussion topic

Back to topic list

Re: svn commit: r38518 - in trunk/subversion: include libsvn_wc

Author gstein
Full name Greg Stein
Date 2009-08-01 06:04:16 PDT
Message On Sat, Aug 1, 2009 at 15:01, Greg Stein<gstein at gmail dot com> wrote:
> On Sat, Aug 1, 2009 at 07:47, Hyrum K. Wright<hyrum@hyru​mwright.org> wrote:
>>...
>> +++ trunk/subversion/lib​svn_wc/revision_stat​us.c        Fri Jul 31 22:47:16 2009        (r38518)
>>...
>> @@ -95,9 +101,12 @@ svn_wc_revision_stat​us(svn_wc_revision_s​
>>   const svn_delta_editor_t *editor;
>>   void *edit_baton;
>>   svn_revnum_t edit_revision;
>> -  svn_wc_revision_status_t *result = apr_palloc(pool, sizeof(**result_p));
>> +  svn_wc_revision_status_t *result = apr_palloc(result_pool,
>> +                                                sizeof(**result_p));
>>   *result_p = result;
>
> I realize you didn't into this, but the sizeof() above is very bad
> form. It is the size of a *different* variable. Sure, it happens to be
> the same size, but "happens" and "is definitely" are two different
> things.
>
>>...
>> @@ -108,14 +117,14 @@ svn_wc_revision_stat​us(svn_wc_revision_s​
>>   /* initialize walking baton */
>>   sb.result = result;
>>   sb.committed = committed;
>> -  sb.wc_path = wc_path;
>> +  sb.local_abspath = local_abspath;
>>   sb.wc_url = NULL;
>> -  sb.pool = pool;
>> +  sb.pool = scratch_pool;
>>
>>   SVN_ERR(svn_wc_adm_o​pen_anchor(&anch​or_access, &target_access, &target,
>> -                                 wc_path, FALSE, -1,
>> +                                 local_abspath, FALSE, -1,
>>                                  cancel_func, cancel_baton,
>> -                                 pool));
>> +                                 scratch_pool));
>
> Access batons should not be opened with absolute paths. The
> association stuff will not work properly.
>
> I also suspect you want to use one of the new "open with DB" functions
> that Bert added. And if you do, then using consistent paths will be
> even MORE important.
>
> Of course, better yet is to just remove access baton usage from this function.

Even better is to revamp the status stuff and entirely remove the guts
of this function. The callback is a simple function. Using editors in
here is an insane way to do a simple walk to find nodes to report
status on.

Cheers,
-g

« Previous message in topic | 2 of 3 | Next message in topic »

Messages

Show all messages in topic

Re: svn commit: r38518 - in trunk/subversion: include libsvn_wc gstein Greg Stein 2009-08-01 06:01:57 PDT
     Re: svn commit: r38518 - in trunk/subversion: include libsvn_wc gstein Greg Stein 2009-08-01 06:04:16 PDT
         Re: svn commit: r38518 - in trunk/subversion: include libsvn_wc hwright Hyrum K. Wright 2009-08-01 14:13:05 PDT
Messages per page: