On Tue, May 17, 2011 at 8:11 AM, Greg Stein <gst...@gmail.com> wrote: > On May 16, 2011 2:15 AM, <hwri...@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