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

Re: svn commit: r1103582 - in /subversion/trunk/subversion/libsvn_wc: wc-queries.sql wc_db.c

From: Hyrum K Wright <hyrum_at_hyrumwright.org>
Date: Tue, 17 May 2011 09:03:32 +0000

On Tue, May 17, 2011 at 8:11 AM, Greg Stein <gstein_at_gmail.com> wrote:
> On May 16, 2011 2:15 AM, <hwright_at_apache.org> wrote:
>>
>> Author: hwright
>> Date: Mon May 16 00:14:39 2011
>> New Revision: 1103582
>>
>> URL: http://svn.apache.org/viewvc?rev=1103582&view=rev
>> Log:
>> When populating the targets list, don't bother calculating the
> parent_relpath,
>> when we already have that information in the database.
>>
>> We also have to relax the constraint slightly, since NULL parent relpaths
> are
>> acceptable (and documented as such).
>
> Not really true. parent_relpath of NULL implies the wcroot. You can't delete
> that, nor apply a changelist on it. Maybe when we define what a changelist
> on a directory means, but not any time soon.

True, but as this technique is intended to be generalizable, I don't
think we should constrain ourselves to non-changelist-able nodes.

>
>>...
>> +++ subversion/trunk/subversion/libsvn_wc/wc-queries.sql Mon May 16
> 00:14:39 2011
>> @@ -432,7 +432,7 @@ ORDER BY wc_id, local_relpath
>>  DROP TABLE IF EXISTS targets_list;
>>  CREATE TEMPORARY TABLE targets_list (
>>   local_relpath TEXT NOT NULL,
>> -  parent_relpath TEXT NOT NULL,
>> +  parent_relpath TEXT,
>>   kind TEXT NOT NULL
>>   );
>>  CREATE INDEX targets_list_kind
>> @@ -443,7 +443,8 @@ DROP TABLE IF EXISTS targets_list;
>>
>>  -- STMT_INSERT_TARGET
>>  INSERT INTO targets_list(local_relpath, parent_relpath, kind)
>> -SELECT ?2, ?3, kind FROM nodes_current WHERE wc_id = ?1 AND local_relpath
> = ?2
>> +SELECT ?2, parent_relpath, kind
>> +FROM nodes_current WHERE wc_id = ?1 AND local_relpath = ?2
>
> Strictly speaking, you could SELECT local_relpath since it is equivalent,
> given the WHERE clause.

Correct. The current code does this.

-Hyrum
Received on 2011-05-17 11:04:06 CEST

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.