Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Subversion Wiki" for 
change notification.

The "InheritedProperties" page has been changed by pburba:
http://wiki.apache.org/subversion/InheritedProperties?action=diff&rev1=13&rev2=14

Comment:
Another tweak to the suggested APIs: Inherting from the nearest parent isn't 
sufficient, need to account for *all* path-wise ancestors.

      bar
  }}}
  == API Changes ==
- Rev svn_proplist_receiver_t to svn_proplist_receiver2_t, adding the argument 
'''apr_hash_t *inherited_prop_hash'''.  Also allow the possibility that the 
existing apr_hash_t *prop_hash argument may be null:
+ Rev svn_proplist_receiver_t to svn_proplist_receiver2_t, adding the argument 
apr_hash_t *'''inherited_prop_hash'''.  Also allow the possibility that the 
existing apr_hash_t *prop_hash argument may be null:
  
  {{{#!cplusplus
  /**
   * The callback invoked by svn_client_proplist4().  Each invocation
-  * provides the regular and/or inherited properties of @a path which
+  * provides the regular and/or inherited properties of @a path, which is
-  * is either a WC path or a URL.  If @a prop_hash is not null, then it
+  * either a working copy path or a URL.  If @a prop_hash is not @c NULL, then
-  * maps explicit property names (char *) to explicit property
-  * values (svn_string_t *).  If @a inherited_prop_hash is not null,
-  * then it maps inherited property names (char *) to explicit property
+  * it maps explicit <tt>char *</tt> property names to <tt>svn_string_t *</tt>
+  * explicit property values.  If @a inherited_prop_hash is not @c NULL,
+  * then it maps <tt>const char *</tt> paths (either working copy paths or
+  * URLs), which are parents of @a path, to a hash mapping <tt>char *</tt>
+  * inherited property names to the <tt>svn_string_t *</tt> explicit property
-  * values (svn_string_t *).  Use @a pool for all temporary allocations.
+  * values found on these parents.  Use @a pool for all temporary allocations.
   *
   * @since New in 1.8.
   */
@@ -223, +225 @@

   *
   * If @a get_target_inherited_props is true, then also return any inherited
   * properties when @a receiver is called for @a target.  If @a target is a
-  * working copy path, then @a target may inherit properties up to the root
-  * of the working copy.  If no inherited properties are found up to the
-  * root of the working copy, then check the inherited properties cache.
-  * If @a target is a URL, then @a target may inherit properties up to the
-  * root of the repository. If @a get_target_inherited_props is false, then
-  * no inherited properties are returned to @a receiver.
+  * working copy path, then properties inherited by @a target as far as the
+  * root of the working copy are obtained from the working copy's actual
+  * property values.  Properties inherited from above the working copy
+  * root come from the inherited properties cache.  If @a target is a URL,
+  * then the inherited properties come from the repository.
+  * If @a get_target_inherited_props is false, then no inherited properties
+  * are returned to @a receiver.
   *
   * If @a target is not found, return the error #SVN_ERR_ENTRY_NOT_FOUND.
   *
@@ -246, +249 @@

                       svn_client_ctx_t *ctx,
                       apr_pool_t *pool);
  }}}
- Rev svn_client_propget4 to svn_client_propget5, adding the argument 
'''svn_string_t **target_inherited_prop''':
+ Rev svn_client_propget4 to svn_client_propget5, adding the argument 
apr_hash_t **'''inherited_prop_hash''':
  
  {{{#!cplusplus
  /**
   * Set @a *props to a hash table whose keys are absolute paths or URLs
   * of items on which property @a propname is explicitly set, and whose
-  * values are `#svn_string_t *' representing the property value for
+  * values are <tt>svn_string_t *</tt> representing the property value for
   * @a propname at that path.
   *
-  * If @a target_inherited_prop is not null, then set
-  * @a *target_inherited_prop to the value of @a propname which @a target
-  * inherits from its nearest parent.  If @a target is a working copy path,
-  * then @a target may inherit properties up to the root of the working
-  * copy.  If no inherited properties are found up to the root of the
-  * working copy, then the the inherited properties cache is checked.
-  * If @a target is a URL, then @a target may inherit properties up to the
-  * root of the repository.  If no property is inherited, then set
-  * @a *target_inherited_prop to null.
+  * If @a inherited_prop_hash is not @c NULL, then set @a *inherited_prop_hash
+  * to a mapping of <tt>const char *</tt> paths (either absolute working copy
+  * paths or URLs) which are parents of @a target, to <tt>svn_string_t *</tt>
+  * inheritable property values which are set on that parent.  If @a target
+  * is a working copy path, then properties inherited by @a target as far as 
the
+  * root of the working copy are obtained from the working copy's actual
+  * property values.  Properties inherited from above the working copy
+  * root come from the inherited properties cache.  If @a target is a URL,
+  * then the inherited properties come from the repository.
+  * If @a inherited_prop_hash is not @c NULL and no inheritable properties
+  * are found, then set @a *inherited_prop_hash to an empty hash.
   *
   * Allocate @a *props, its keys, and its values in @a pool, use
   * @a scratch_pool for temporary allocations.
@@ -307, +312 @@

   */
  svn_error_t *
  svn_client_propget5(apr_hash_t **props,
-                     svn_string_t **target_inherited_prop,
+                     apr_hash_t **inherited_prop_hash,
                      const char *propname,
                      const char *target,  /* abspath or URL */
                      const svn_opt_revision_t *peg_revision,
@@ -319, +324 @@

                      apr_pool_t *result_pool,
                      apr_pool_t *scratch_pool);
  }}}
- Rev svn_ra_get_dir2 to svn_ra_get_dir3, adding the argument '''apr_hash_t 
**inherited_props'''.'''  '''Also allow the possibility that the existing 
apr_hash_t **props argument may be null:
+ Rev svn_ra_get_dir2 to svn_ra_get_dir3, adding the argument apr_hash_t 
**'''inherited_props'''.'''  '''Also allow the possibility that the existing 
apr_hash_t **props argument may be null:
  
  {{{#!cplusplus
  /**
@@ -347, +352 @@

   * etc.)  The keys are <tt>const char *</tt>, values are
   * <tt>@c svn_string_t *</tt>.
   *
-  * If @a inherited_props is non @c NULL, set @a *inherited_props to contain
+  * If @a inherited_props is not @c NULL, then set @a *inherited_props
-  * any properties inherited by the directory @a path.  The keys are
-  * <tt>const char *</tt>, values are <tt>@c svn_string_t *</tt>.
+  * to a mapping of <tt>const char *</tt> URLS which are parents of @a path,
+  * to a hash mapping <tt>const char *</tt> property names to
+  * <tt>svn_string_t *</tt> property values for each inheritable property set
+  * on the parent URL.  If @a inherited_props is not @c NULL no inheritable
+  * properties are found, then set @a *inherited_props to an empty hash.
   *
   * @since New in 1.8.
   */
@@ -364, +372 @@

                  apr_uint32_t dirent_fields,
                  apr_pool_t *pool);
  }}}
- Rev svn_ra_get_file to svn_ra_get_file2, adding the argument '''apr_hash_t 
**inherited_props'''.  Also allow the possibility that the existing apr_hash_t 
**props argument may be null:
+ Rev svn_ra_get_file to svn_ra_get_file2, adding the argument apr_hash_t 
**'''inherited_props'''.  Also allow the possibility that the existing 
apr_hash_t **props argument may be null:
  
  {{{#!cplusplus
  /** Fetch the contents and properties of file @a path at @a revision.
@@ -389, +397 @@

   * If @a inherited_props is non @c NULL, set @a *inherited_props to contain
   * any properties inherited by the directory @a path.  The keys are
   * <tt>const char *</tt>, values are <tt>@c svn_string_t *</tt>.
+  *
+  * If @a inherited_props is not @c NULL, then set @a *inherited_props
+  * to a mapping of <tt>const char *</tt> URLS which are parents of @a path,
+  * to a hash mapping <tt>const char *</tt> property names to
+  * <tt>svn_string_t *</tt> property values for each inheritable property set
+  * on the parent URL.  If @a inherited_props is not @c NULL no inheritable
+  * properties are found, then set @a *inherited_props to an empty hash.
   *
   * The stream handlers for @a stream may not perform any RA
   * operations using @a session.
@@ -405, +420 @@

                   apr_hash_t **inherited_props,
                   apr_pool_t *pool);
  }}}
- Rev svn_wc_prop_get2 to svn_wc_prop_get3, adding the argument '''svn_string_t 
**inherited_value'''.  Also allow the possibility that the existing 
svn_string_t **value argument may be null:
+ Rev svn_wc_prop_get2 to svn_wc_prop_get3, adding the argument apr_hash_t 
**'''inherited_values'''. Also allow the possibility that the existing 
svn_string_t **value argument may be null:
  
  {{{#!cplusplus
  /** If @a value is not null, then set @a *value to the value of property
@@ -413, +428 @@

   * If no such prop, set @a *value to @c NULL. @a name may be a regular or
   * wc property; if it is an entry property, return the error
   * #SVN_ERR_BAD_PROP_KIND.
- 
-  * If @a inherited_value is not null, then set @a *inherited_value to the
-  * value of property @a name which @a local_abspath inherits from its
-  * nearest parent, allocating @a *inherited_value in @a result_pool.
-  * If no such prop is inherited, then set @a *inherited_value to @c NULL.
-  * @a name may only be a regular property; if it is a wc or entry property,
+  *
+  * If @a inherited_values is not @c NULL and @a name is a regular property,
+  * then set @a *inherited_values to a mapping of <tt>const char *</tt> paths
+  * (either working copy paths or URLs), which are parents of @a local_abspath,
+  * to the <tt>svn_string_t *</tt> explicit property found on these parents.
+  * If @a inherited_values is not @c NULL and no properties are inherited, then
+  * set @a *inherited_values to an empty hash.  If @a inherited_values is not
+  * @c NULL and @a name is a wc or entry property, then return the error
-  * return the error #SVN_ERR_BAD_PROP_KIND.
+  * #SVN_ERR_BAD_PROP_KIND.
   *
   * @a wc_ctx is used to access the working copy.
   *
@@ -430, +447 @@

   */
  svn_error_t *
  svn_wc_prop_get3(const svn_string_t **value,
-                  const svn_string_t **inherited_value,
+                  apr_hash_t **inherited_values,
                   svn_wc_context_t *wc_ctx,
                   const char *local_abspath,
                   const char *name,
                   apr_pool_t *result_pool,
                   apr_pool_t *scratch_pool);
  }}}
- Rev svn_fs_node_prop to svn_fs_node_prop2, adding the argument 
'''svn_string_t **inherited_value_p'''.  Also allow the possibility that the 
existing svn_string_t **value_p argument may be null:
+ Rev svn_fs_node_prop to svn_fs_node_prop2, adding the argument apr_hash_t 
**'''inherited_values'''. Also allow the possibility that the existing 
svn_string_t **value_p argument may be null:
  
  {{{#!cplusplus
  /** If @a value_p is not null, then set @a *value_p to the value of the
   * property named @a propname of @a path in @a root.  If the node has no
   * property by that name, set @a *value_p to null.
   *
-  * If @a inherited_value_p is not null, then set @a *inherited_value_p to
+  * If @a inherited_values is not @c NULL then set @a *inherited_values to
-  * the value of the property named @a propname inherited by @a path in
-  * @a root.  If the node has no inherited property by that name, set
+  * a mapping of <tt>const char *</tt> absolute filesystem paths, which are
+  * parents of @a path, to the <tt>svn_string_t *</tt> explicit inheritable
+  * property @a propname found on these parents.  If @a inherited_values is
+  * not @c NULL and no inherited properties are found, then set
-  * @a *inherited_value_p to null.
+  * @a *inherited_values to an empty hash.
   *
   * Allocate the results in @a pool.
   *
@@ -455, +474 @@

   */
  svn_error_t *
  svn_fs_node_prop2(svn_string_t **value_p,
-                   svn_string_t **inherited_value_p
+                   apr_hash_t **inherited_values,
                    svn_fs_root_t *root,
                    const char *path,
                    const char *propname,
                    svn_boolean_t get_inherited_prop,
                    apr_pool_t *pool);
  }}}
- Rev svn_fs_node_proplist to svn_fs_node_proplist2, adding the argument 
'''apr_hash_t **inherited_table_p'''.  Also allow the possibility that the 
existing apr_hash_t **table_p argument may be null:
+ Rev svn_fs_node_proplist to svn_fs_node_proplist2, adding the argument 
apr_hash_t **'''inherited_table_p'''.  Also allow the possibility that the 
existing apr_hash_t **table_p argument may be null:
  
  {{{#!cplusplus
  /** If @a table_p is not null, then set @a *table_p to the entire property
   * list of @a path in @a root.
   *
   * If @a inherited_table_p is not null, then set @a *inherited_table_p to
-  * the entire inherited property list of @a path in @a root.
+  * a mapping of <tt>const char *</tt> absolute filesystem paths, which are
+  * parents of @a path, to a hash mapping <tt>const char *</tt> property names
+  * to <tt>svn_string_t *</tt> property values for each inheritable property
+  * set on the parent paths.  If @a inherited_table_p is not @c NULL and no
+  * inherited properties are found, then set @a *inherited_table_p to an empty
+  * hash.
   *
   * Both hashes map property names to pointers to #svn_string_t objects
   * containing the property value.  Both hashes are allocated in @a pool.

Reply via email to