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

Re: [PATCH] NODES table presence values

From: Greg Stein <gstein_at_gmail.com>
Date: Wed, 15 Sep 2010 16:13:54 -0400

On Wed, Sep 15, 2010 at 13:29, Julian Foad <julian.foad_at_wandisco.com> wrote:
> Bert, Erik, Greg...
>
> I think the schema should not disallow the 'excluded' presence in NODES
> table where op_depth > 0 (which corresponds roughly to old
> WORKING_NODE).  There are already 'copy' cases where it is used, and
> seems useful and right.

Agreed.

The doc for WORKING_NODE was simply out of date; we had agreed on
allowing 'excluded' a while back.

For example, I might have a directory with a huge subdir containing
test-data which I've excluded in my local working copy, and want to
make a new copy of that directory. I should be able to make the copy
and commit it, where my new local copy continues to have no test-data,
yet the repository *does* have that data.

> I also think the schema should not disallow 'absent'.  We have already
> talked about how, if you allow a sub-tree copy (for example) to have a
> child that is 'absent' (unauthorized), you won't be able to commit that
> copy.  But I don't think that means that the schema should forbid ever
> representing such a case.  I think if we forbid it at this level we
> would possibly be making the rules more complex than they need to be and
> would possibly run into problems later when we might find that actually
> there are good cases to be made for representing such a state.

I can see that reasoning, but I don't see that allowing it today
simplifies anything. In fact, if we *do* see it today, then something
has gone wrong.

In the future, we can start writing 'unauthz' into the presence
column, and then start interpreting it properly. That change in the
future has no impact on today.

Also, please note that I want to expand the presence values
dramatically with this move to NODES. I suggest the following new
values:

* copied [-here]
* moved-away (aka deleted)
* moved-here
* deleted
* added

Children of the root of the operation would have the same presence
value. They can be detected as root vs children based on their actual
depth vs their op_depth value. (I had previously pondered on some
"inherit-*" presence values, but that is not necessary).

(tho it could be argued that encoded the root/child concept into the
presence would simplify the detection, compared to fetching the
op_depth and performing a calculation)

The following presence values would no longer be necessary:

* base-deleted

The following would not be used when op_depth > 0, but are still
needed for op_depth == 0:

* normal
* not-present

Thoughts?

Cheers,
-g
Received on 2010-09-15 22:14:31 CEST

This is an archived mail posted to the Subversion Dev mailing list.