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

[PATCH] NODES table presence values

From: Julian Foad <julian.foad_at_wandisco.com>
Date: Wed, 15 Sep 2010 18:29:56 +0100

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.

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.

So I think we should simplify the NODES table doc string as follows:

[[[
Index: subversion/libsvn_wc/wc-metadata.sql
===================================================================
--- subversion/libsvn_wc/wc-metadata.sql (revision 997335)
+++ subversion/libsvn_wc/wc-metadata.sql (working copy)
@@ -709,38 +709,13 @@ CREATE TABLE NODES (
   /* Is this node "present" or has it been excluded for some reason?
 
      In case 'op_depth' is equal to 0, this is part of the BASE tree; in
      that case, all presence values except 'base-deleted' are allowed.
 
      In case 'op_depth' is greater than 0, this is part of a layer of
- working nodes; in that case, the following presence values apply:
-
- Only allowed values: normal, not-present, incomplete, base-deleted.
- (the others do not make sense for the WORKING tree)
-
- normal: this node has been added/copied/moved-here. There may be an
- underlying BASE node at this location, implying this is a replace.
- Scan upwards from here looking for copyfrom or moved_here values
- to detect the type of operation constructing this node.
-
- not-present: the node (or parent) was originally copied or moved-here.
- A subtree of that source has since been deleted. There may be
- underlying BASE node to replace. For a move-here or copy-here, the
- records are simply removed rather than switched to not-present.
- Note this reflects a deletion only. It is not possible move-away
- nodes from the WORKING tree. The purported destination would receive
- a copy from the original source of a copy-here/move-here, or if the
- nodes were plain adds, those nodes would be shifted to that target
- for addition.
-
- incomplete: nodes are being added into the WORKING tree, and the full
- information about this node is not (yet) present.
-
- base-deleted: the underlying BASE node has been marked for deletion due
- to a delete or a move-away (see the moved_to column to determine
- which), and has not been replaced. */
+ working nodes; in that case, all presence values are allowed. */
   presence TEXT NOT NULL,
 
   /* NULL depth means "default" (typically svn_depth_infinity) */
   /* ### depth on WORKING? seems this is a BASE-only concept. how do
      ### you do "files" on an added-directory? can't really ignore
      ### the subdirs! */
]]]

Thoughts?

- Julian
Received on 2010-09-15 19:30:55 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.