You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by ju...@apache.org on 2010/06/15 15:09:27 UTC

svn commit: r954863 - in /subversion/trunk: notes/wc-ng/conflict-storage notes/wc-ng/props-move.doc notes/wc-ng/working-node subversion/libsvn_wc/update_editor.c

Author: julianfoad
Date: Tue Jun 15 13:09:26 2010
New Revision: 954863

URL: http://svn.apache.org/viewvc?rev=954863&view=rev
Log:
* subversion/libsvn_wc/update_editor.c
  (merge_file): Remove a to-do comment, done in r942637.

Added:
    subversion/trunk/notes/wc-ng/props-move.doc
    subversion/trunk/notes/wc-ng/working-node
Modified:
    subversion/trunk/notes/wc-ng/conflict-storage
    subversion/trunk/subversion/libsvn_wc/update_editor.c

Modified: subversion/trunk/notes/wc-ng/conflict-storage
URL: http://svn.apache.org/viewvc/subversion/trunk/notes/wc-ng/conflict-storage?rev=954863&r1=954862&r2=954863&view=diff
==============================================================================
--- subversion/trunk/notes/wc-ng/conflict-storage (original)
+++ subversion/trunk/notes/wc-ng/conflict-storage Tue Jun 15 13:09:26 2010
@@ -18,9 +18,9 @@ detailed below.
 KIND indicates the kind of conflict description that follows and is one
 of:
 
-  "text" - meaning a "normal" text conflict of the whole node (which must be a
-    file), with left/right/mine full texts saved, and (unless it's
-    "binary") conflict markers in the working text;
+  "text" - meaning a text conflict of the whole text of the node (which
+    must be a file), with left/right/mine full texts saved, and (unless
+    it's "binary") conflict markers in the working text;
   "prop" - meaning a "normal" property conflict, with left/right/mine full
     values saved;
   "tree" - meaning a tree conflict;

Added: subversion/trunk/notes/wc-ng/props-move.doc
URL: http://svn.apache.org/viewvc/subversion/trunk/notes/wc-ng/props-move.doc?rev=954863&view=auto
==============================================================================
--- subversion/trunk/notes/wc-ng/props-move.doc (added)
+++ subversion/trunk/notes/wc-ng/props-move.doc Tue Jun 15 13:09:26 2010
@@ -0,0 +1,191 @@
+Only places in libsvn_wc where the old props files are accessed:
+
+svn_wc__prop_path()
+init_adm()
+
+
+
+/* Set the properties of LOCAL_ABSPATH in ACTUAL to PROPS.
+ * ### Doing what to WORKING and BASE? */
+svn_wc__db_op_set_props();
+
+/* Set the properties of LOCAL_ABSPATH in WORKING to PROPS.
+ * ### Doing what to BASE? */
+svn_wc__db_temp_op_set_pristine_props(on_working = TRUE);
+
+/* Set the properties of LOCAL_ABSPATH in BASE to PROPS.  */
+svn_wc__db_temp_op_set_pristine_props(on_working = FALSE);
+
+
+/* Set *PROPS to the properties of LOCAL_ABSPATH in ACTUAL.  */
+svn_wc__db_read_props();
+
+/* Set *PROPS to the properties of LOCAL_ABSPATH in WORKING.  */
+svn_wc__db_read_pristine_props();
+
+/* Set *PROPS to the properties of LOCAL_ABSPATH in BASE.  */
+svn_wc__db_base_get_props();
+
+
+/* Set *PROPVAL to the value of the property named PROPNAME of the node
+ * LOCAL_ABSPATH in ACTUAL (else WORKING else BASE).  */
+svn_wc__db_read_prop();
+
+/* Set *PROPVAL to the value of the property named PROPNAME of the node
+ * LOCAL_ABSPATH in BASE.  */
+svn_wc__db_base_get_prop();
+
+
+General doc string elements:
+
+/*
+ * PROPS maps "const char *" property names to "const svn_string_t *" values.
+ * *PROPS maps "const char *" property names to "const svn_string_t *" values.
+ */
+
+
+See also:
+
+svn_wc__db_base_set_dav_cache();
+
+svn_wc__db_base_get_dav_cache();
+
+
+[[[
+Doc strings for WC-NG properties functions.
+
+* subversion/libsvn_wc/wc_db.h
+  (svn_wc__db_base_get_prop, svn_wc__db_base_get_props,
+   svn_wc__db_op_set_props, svn_wc__db_temp_op_set_pristine_props,
+   svn_wc__db_read_prop, svn_wc__db_read_props,
+   svn_wc__db_read_pristine_props): Re-write doc strings.
+]]]
+
+--This line, and those below, will be ignored--
+
+Index: subversion/libsvn_wc/wc_db.h
+===================================================================
+--- subversion/libsvn_wc/wc_db.h	(revision 910914)
++++ subversion/libsvn_wc/wc_db.h	(working copy)
+@@ -646,14 +646,9 @@
+                          apr_pool_t *scratch_pool);
+ 
+ 
+-/** Return a property's value from a node in the BASE tree.
+- *
+- * This is a convenience function to return a single property from the
+- * BASE tree node indicated by LOCAL_ABSPATH. The property's name is
+- * given in PROPNAME, and the value returned in PROPVAL.
+- *
+- * All returned data will be allocated in RESULT_POOL. All temporary
+- * allocations will be made in SCRATCH_POOL.
++/** Set *PROPVAL to the value of the property named PROPNAME of the node
++ * LOCAL_ABSPATH in BASE.
++ * Allocate *PROPVAL in RESULT_POOL.
+  */
+ svn_error_t *
+ svn_wc__db_base_get_prop(const svn_string_t **propval,
+@@ -664,14 +659,9 @@
+                          apr_pool_t *scratch_pool);
+ 
+ 
+-/** Return all properties of the given BASE tree node.
+- *
+- * All of the properties for the node indicated by LOCAL_ABSPATH will be
+- * returned in PROPS as a mapping of const char * names to
+- * const svn_string_t * values.
+- *
+- * All returned data will be allocated in RESULT_POOL. All temporary
+- * allocations will be made in SCRATCH_POOL.
++/** Set *PROPS to the properties of LOCAL_ABSPATH in BASE.
++ * *PROPS maps "const char *" property names to "const svn_string_t *" values.
++ * Allocate *PROPS and its keys and values in RESULT_POOL.
+  */
+ svn_error_t *
+ svn_wc__db_base_get_props(apr_hash_t **props,
+@@ -952,21 +942,23 @@
+                           apr_pool_t *scratch_pool);
+ 
+ 
+-/* ### note: there is no db_op_set_prop() function. callers must read
+-   ### all the properties, change one, and write all the properties.  */
+-
+-/* Set the props on the ACTUAL node for LOCAL_ABSPATH to PROPS.  This will
+-   overwrite whatever working props the node currently has.  PROPS maps
+-   property names of type "const char *" to values of type
+-   "const svn_string_t *".  Use SCRATCH_POOL for temporary allocations. */
++/** Set the properties of LOCAL_ABSPATH in ACTUAL to PROPS.
++ * This will overwrite whatever working props the node currently has.
++ * PROPS maps "const char *" property names to "const svn_string_t *" values.
++ *
++ * @note: There is no db_op_set_prop() function. Callers must read
++ * all the properties, change one, and write all the properties.
++ */
+ svn_error_t *
+ svn_wc__db_op_set_props(svn_wc__db_t *db,
+                         const char *local_abspath,
+                         apr_hash_t *props,
+                         apr_pool_t *scratch_pool);
+ 
+-/* Sets the pristine props of LOCAL_ABSPATH on BASE, or when ON_WORKING is
+-   TRUE on WORKING */
++/** Set the properties of LOCAL_ABSPATH in BASE (if ON_WORKING is FALSE) or
++ * in WORKING (if ON_WORKING is TRUE) to PROPS.
++ * PROPS maps "const char *" property names to "const svn_string_t *" values.
++ */
+ svn_error_t *
+ svn_wc__db_temp_op_set_pristine_props(svn_wc__db_t *db,
+                                       const char *local_abspath,
+@@ -1268,12 +1260,9 @@
+                      apr_pool_t *scratch_pool);
+ 
+ 
+-/** Return a property's value for a node, first using ACTUAL, then
+- * WORKING, then BASE.  The property's name is given in PROPNAME, and
+- * the value returned in PROPVAL.
+- *
+- * All returned data will be allocated in RESULT_POOL. All temporary
+- * allocations will be made in SCRATCH_POOL.
++/** Set *PROPVAL to the value of the property named PROPNAME of the node
++ * LOCAL_ABSPATH in ACTUAL (else WORKING else BASE).
++ * Allocate *PROPVAL in RESULT_POOL.
+  */
+ svn_error_t *
+ svn_wc__db_read_prop(const svn_string_t **propval,
+@@ -1284,13 +1273,11 @@
+                      apr_pool_t *scratch_pool);
+ 
+ 
+-/* Read into PROPS the properties for LOCAL_ABSPATH in DB.  This first check
+-   the ACTUAL node, then the WORKING node, and finally the BASE node for
+-   properties.  PROPS maps property names of type "const char *" to values
+-   of type "const svn_string_t *".
+-
+-   Allocate PROPS in RESULT_POOL and do temporary allocations
+-   in SCRATCH_POOL. */
++/** Set *PROPS to the properties of LOCAL_ABSPATH in ACTUAL (else WORKING else
++ * BASE).
++ * *PROPS maps "const char *" property names to "const svn_string_t *" values.
++ * Allocate *PROPS and its keys and values in RESULT_POOL.
++ */
+ svn_error_t *
+ svn_wc__db_read_props(apr_hash_t **props,
+                       svn_wc__db_t *db,
+@@ -1299,13 +1286,10 @@
+                       apr_pool_t *scratch_pool);
+ 
+ 
+-/* Read into PROPS the properties for LOCAL_ABSPATH in DB.  This first check
+-   the WORKING node, and then the BASE node for properties.  PROPS maps
+-   property names of type "const char *" to values of type
+-   "const svn_string_t *".
+-
+-   Allocate PROPS in RESULT_POOL and do temporary allocations
+-   in SCRATCH_POOL. */
++/** Set *PROPS to the properties of LOCAL_ABSPATH in WORKING (else BASE).
++ * *PROPS maps "const char *" property names to "const svn_string_t *" values.
++ * Allocate *PROPS and its keys and values in RESULT_POOL.
++ */
+ svn_error_t *
+ svn_wc__db_read_pristine_props(apr_hash_t **props,
+                                svn_wc__db_t *db,

Added: subversion/trunk/notes/wc-ng/working-node
URL: http://svn.apache.org/viewvc/subversion/trunk/notes/wc-ng/working-node?rev=954863&view=auto
==============================================================================
--- subversion/trunk/notes/wc-ng/working-node (added)
+++ subversion/trunk/notes/wc-ng/working-node Tue Jun 15 13:09:26 2010
@@ -0,0 +1,116 @@
+WORKING_NODE
+============
+
+This file is an attempt to document some aspects of the WORKING_NODE table.
+It is based on the documentation in 'wc-metadata.sql' and other knowledge
+and guesswork about how things ought to work, and does not yet indicate how
+the Subversion code base currently behaves.
+
+The possible tree-structure changes represented by a WORKING_NODE row are
+categorized in two parts.  The table is indexed by path, and a single path
+can have both a node that has "gone away" from that path and a different
+node that has come to that path.  The "gone away" node is a node that was at
+this path but is being deleted or moved away; we don't store much
+information about that one in this table.  The "created" node is a node that
+is being added or copied or moved to this path.
+
+There is under recent consideration the problem that there can be more than
+two nodes associated with a single path, when multiple directory tree copies
+overlap.  This document does not (yet) consider that problem.
+
+
+WORKING_NODE.presence at a particular path
+------------------------------------------
+
+A table showing the possible tree-structure changes that a WORKING_NODE row
+can represent.  "Base node" refers to the node that was at this path before
+we locally deleted it or moved it away.  "New node" refers to the node that
+is locally present at this path, the one that the WORKING_NODE table mostly
+describes and that is present on disk and perhaps in the ACTUAL_NODE table.
+
+  +---------------+-------------------------------------+
+  |               |           New node                  |
+  |               |-------------------------------------|
+  |               |     |   Root of   |   Child of      |
+  | Base node     | n/a | Add Cp- Mv- | Add Cp- Mv-here |
+  +---------------+-------------------------------------+
+  |               |     |             |                 |
+  |   none [B]    |  x  | nor nor nor |  ?   ?   ?      |
+  |               |     |             |                 |
+  | Root of ...   |     |             |                 |
+  |   deleted     | b-d | nor nor nor |  ?   ?   ?      |
+  |               |     |             |                 |
+  |   moved away  | b-d | nor nor nor |  ?   ?   ?      |
+  |               |     |             |                 |
+  | Child of ...  |     |             |                 |
+  |   deleted     |  ?  |  ?   ?   ?  |  ?   ?   ?      |
+  |               |     |             |                 |
+  |   moved away  |  ?  |  ?   ?   ?  |  ?   ?   ?      |
+  |               |     |             |                 |
+  +---------------+-------------------------------------+
+
+  nor Normal
+  abs Absent
+  exc Excluded
+  inc Incomplete
+  b-d Base-deleted
+  n-p Not-present
+  x   No WORKING_NODE entry exists for this path in this case.
+
+  [B] "None" means the BASE_NODE table indicates this path is not present in
+      the repository and is not absent or excluded from the WC.
+
+
+A table showing when each WORKING_NODE column should have a meaningful value
+----------------------------------------------------------------------------
+
+  +-----------------------------+----------------------------------+
+  |                             |                                  |
+  |                             |      Root of     Child of        |
+  | About the new node ...      |  n/a Add Cp- Mv- Add Cp- Mv-here |
+  |                             |  --- --- --- --- --- --- ---     |
+  |                             |                                  |
+  |   kind                      | =unk  Y   Y   Y   ?   ?   ?      |
+  |                             |                                  |
+  |   properties                |   n   Y   Y   Y   ?   ?   ?      |
+  |                             |                                  |
+  |   checksum (=> pristine)    |   n   n   Y   Y   n   ?   ?  [F] |
+  |   translated_size           |   n   n   Y   Y   n   ?   ?  [F] |
+  |                             |                                  |
+  |   symlink_target            |   n   Y   Y   Y   ?   ?   ?  [S] |
+  |                             |                                  |
+  |   changed_rev      )        |                                  |
+  |   changed_date     )        |   n   n   Y   Y   n   ?   ?      |
+  |   changed_author   )        |                                  |
+  |                             |                                  |
+  |   copyfrom_repos   )        |                                  |
+  |   copyfrom_path    )        |   n   n   Y   Y   n   n   n      |
+  |   copyfrom_rev     )        |                                  |
+  |                             |                                  |
+  |   moved_here                |  =0  =0  =0  =1  =0  =0   ?      |
+  |                             |                                  |
+  |                             |                                  |
+  |                             |      Root of Child of            |
+  | About the old base node ... |  n/a Del Mv- Del Mv-away         |
+  |                             |  --- --- --- --- ---             |
+  |                             |                                  |
+  |   moved_to                  |   n   n   Y   ?   ?              |
+  |                             |                                  |
+  |                             |                                  |
+  | About ??? ...               |                                  |
+  |                             |                                  |
+  |   depth                     |                                  |
+  |                             |                                  |
+  |   last_mode_time            |                                  |
+  |                             |                                  |
+  |   keep_local                |                                  |
+  |                             |                                  |
+  +-----------------------------+----------------------------------+
+
+  n   Field is null
+  Y   Field is non-null and has an appropriate value
+  =   Field has the specified value
+
+  [F] Only when kind = file
+  [S] Only when kind = symlink
+

Modified: subversion/trunk/subversion/libsvn_wc/update_editor.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/update_editor.c?rev=954863&r1=954862&r2=954863&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/update_editor.c (original)
+++ subversion/trunk/subversion/libsvn_wc/update_editor.c Tue Jun 15 13:09:26 2010
@@ -4446,7 +4446,6 @@ merge_file(svn_skel_t **work_items,
                  ###   place this file into an inconsistent state.
                  ###   in the future, all the state changes should be
                  ###   made atomically.  */
-              /* ### this should return a work_items  */
               SVN_ERR(svn_wc__internal_merge(
                         &work_item,
                         &merge_outcome,



Re: svn commit: r954863 - committed more than I meant to

Posted by Julian Foad <ju...@btopenworld.com>.
I (Julian Foad) wrote:
> Author: julianfoad
> Date: Tue Jun 15 13:09:26 2010
> New Revision: 954863
> 
> URL: http://svn.apache.org/viewvc?rev=954863&view=rev
> Log:
> * subversion/libsvn_wc/update_editor.c
>   (merge_file): Remove a to-do comment, done in r942637.
> 
> Added:
>     subversion/trunk/notes/wc-ng/props-move.doc
>     subversion/trunk/notes/wc-ng/working-node

Those added files were unintentional, and I removed them shortly
afterwards in r954866.  Updated the log message to note this.

(My 'props-move.doc' was old and not interesting; my 'working-node' file
contained some partial notes and thoughts that I made a while ago in
trying to understand the DB.)

> Modified:
>     subversion/trunk/notes/wc-ng/conflict-storage

I updated the log message to mention that change as well.

>     subversion/trunk/subversion/libsvn_wc/update_editor.c

- Julian