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

Re: NODE_DATA (aka fourth tree)

From: Erik Huelsmann <ehuels_at_gmail.com>
Date: Mon, 12 Jul 2010 12:32:34 +0200

On Sun, Jul 11, 2010 at 1:04 AM, Greg Stein <gstein_at_gmail.com> wrote:
> On Sat, Jul 10, 2010 at 17:55, Erik Huelsmann <ehuels_at_gmail.com> wrote:
>>...
>> Columns to be placed in NODE_DATA:
>>
>>  * wc_id
>>  * local_relpath
>>  * oproot_distance
>>  * presence
>>  * kind
>>  * revnum
>
> revnum is a BASE concept, so it does not belong here. WORKING nodes do
> not have a revision until they are committed. If the node is copied
> from the repository, then the *source* of that copy needs a revision
> and path, but that is conceptually different from "revnum" (which
> identifies the rev of the node itself).
>
>>  * checksum
>>  * translated_size
>>  * last_mod_time

Thinking about it a bit more, I think translated_size and
last_mod_time are a bit odd to have in NODE_DATA - although they are
part of both BASE_NODE and WORKING_NODE: they really do apply only to
BASE and the *current* working node: they are part of the optimization
to determine if a file has changed. Presumably, when a different layer
of WORKING becomes visible, we'll be recalculating both fields.

If that's the case, shouldn't we just hold onto them in their respective tables?

>>  * changed_rev
>>  * changed_date
>>  * changed_author
>>  * depth
>>  * properties
>>  * dav_cache
>
> dav_cache is also a BASE concept, and remains in BASE_NODE.

Agreed.

>>  * symlink_target
>>  * file_external
>
> I'm not sure that file_external belongs here. We certainly don't have
> it in WORKING_NODE.

I've been informing around on IRC to understand the difference between
why that would apply to file_external, but not to symlink_target. The
difference isn't clear to me yet. Do you have anything which might
help me?

>> This means, these columns stay in WORKING_NODE (next to its key, ofcourse):
>>
>>  * copyfrom_repos_id
>>  * copyfrom_repos_path
>>  * copyfrom_revnum
>>  * moved_here
>>  * moved_to
>>
>> These columns can stay in WORKING_NODE, because all children inherit
>> their values from the oproot. I.e. a subdirectory of a copied
>> directory inherits the copy/move info, unless it's been copied/moved
>> itself, in which case it has its own copy information.
>
> Right.
>
> Also note that we can opportunistically rename the above columns to
> their wc_db API names: original_*. They would be original_repos_id,
> original_repos_relpath, original_revision.

Done. (In my local patch-in-preparation.)

Bye,

Erik.
Received on 2010-07-12 12:33:15 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.