You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by pb...@apache.org on 2011/03/17 20:40:08 UTC

svn commit: r1082658 - in /subversion/trunk/subversion: include/private/ libsvn_client/ libsvn_fs_base/ libsvn_fs_base/util/ libsvn_subr/ libsvn_wc/ tests/cmdline/

Author: pburba
Date: Thu Mar 17 19:40:07 2011
New Revision: 1082658

URL: http://svn.apache.org/viewvc?rev=1082658&view=rev
Log:
Leverage the recent improvements to svn proplist -R[1] so that svn propget -R
can do away with svn_wc__node_walk_children().

[1] See r1066541 and r1071283.

* subversion/include/private/svn_skel.h
* subversion/libsvn_subr/skel.c
  (svn_skel__parse_proplist): Optionally parse only a particular property.

* subversion/include/private/svn_wc_private.h

  (svn_wc__prop_list_recursive): Optionally list only a particular property.

* subversion/libsvn_client/externals.c

  (svn_client__crawl_for_externals): Update call to
   svn_wc__prop_list_recursive(), forgoing the optional filtering.

* subversion/libsvn_client/prop_commands.c

  (propget_walk_baton,
   propget_walk_cb): Delete this svn_wc__node_found_func_t callback and
   its baton and replace them with...

  (recursive_propget_receiver_baton,
   recursive_propget_receiver): ...this svn_wc__proplist_receiver_t
   callback and its baton.

  (get_prop_from_wc): Reimplement using svn_wc__prop_list_recursive()
   instead of svn_wc__node_walk_children().

  (svn_client_proplist3): Update call to svn_wc__prop_list_recursive(),
   forgoing the optional filtering.

* subversion/libsvn_wc/props.c

  (svn_wc__prop_list_recursive): Optionally list only a particular property.
   Update call to svn_wc__db_read_props_streamily().

* subversion/libsvn_wc/wc_db.c

  (svn_wc__db_read_props_streamily): Optionally list only a particular
   property.  Update call to svn_skel__parse_proplist().

* subversion/libsvn_wc/wc_db.h

  (svn_wc__db_read_props_streamily): Optionally list only a particular
   property.

* subversion/libsvn_fs_base/dag.c
  (svn_fs_base__dag_get_proplist):
* subversion/libsvn_fs_base/util/fs_skels.c
  (svn_fs_base__parse_transaction_skel):
* subversion/libsvn_subr/sqlite.c
  (svn_sqlite__column_properties):
* subversion/libsvn_wc/workqueue.c
  (run_postcommit):
* subversion/tests/cmdline/atomic-ra-revprop-change.c
  (extract_values_from_skel):

   Update calls to svn_skel__parse_proplist(), forgoing the optional
   filtering.

Modified:
    subversion/trunk/subversion/include/private/svn_skel.h
    subversion/trunk/subversion/include/private/svn_wc_private.h
    subversion/trunk/subversion/libsvn_client/externals.c
    subversion/trunk/subversion/libsvn_client/prop_commands.c
    subversion/trunk/subversion/libsvn_fs_base/dag.c
    subversion/trunk/subversion/libsvn_fs_base/util/fs_skels.c
    subversion/trunk/subversion/libsvn_subr/skel.c
    subversion/trunk/subversion/libsvn_subr/sqlite.c
    subversion/trunk/subversion/libsvn_wc/props.c
    subversion/trunk/subversion/libsvn_wc/wc_db.c
    subversion/trunk/subversion/libsvn_wc/wc_db.h
    subversion/trunk/subversion/libsvn_wc/workqueue.c
    subversion/trunk/subversion/tests/cmdline/atomic-ra-revprop-change.c

Modified: subversion/trunk/subversion/include/private/svn_skel.h
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/include/private/svn_skel.h?rev=1082658&r1=1082657&r2=1082658&view=diff
==============================================================================
--- subversion/trunk/subversion/include/private/svn_skel.h (original)
+++ subversion/trunk/subversion/include/private/svn_skel.h Thu Mar 17 19:40:07 2011
@@ -185,10 +185,13 @@ int svn_skel__list_length(const svn_skel
 
 /* Parse a `PROPLIST' SKEL into a regular hash of properties,
    *PROPLIST_P, which has const char * property names, and
-   svn_string_t * values. Use RESULT_POOL for all allocations.  */
+   svn_string_t * values. Use RESULT_POOL for all allocations.
+   If PROPNAME is not NULL then only parse properties with the
+   a same name as PROPNAME. */
 svn_error_t *
 svn_skel__parse_proplist(apr_hash_t **proplist_p,
                          const svn_skel_t *skel,
+                         const char *propname,
                          apr_pool_t *result_pool);
 
 /* Unparse a PROPLIST hash (which has const char * property names and

Modified: subversion/trunk/subversion/include/private/svn_wc_private.h
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/include/private/svn_wc_private.h?rev=1082658&r1=1082657&r2=1082658&view=diff
==============================================================================
--- subversion/trunk/subversion/include/private/svn_wc_private.h (original)
+++ subversion/trunk/subversion/include/private/svn_wc_private.h Thu Mar 17 19:40:07 2011
@@ -750,6 +750,8 @@ typedef svn_error_t *(*svn_wc__proplist_
  * a hash table mapping <tt>char *</tt> names onto <tt>svn_string_t *</tt>
  * values for all the regular properties of the node at @a local_abspath
  * and any node beneath @a local_abspath within the specified @a depth.
+ * If @a propname is not NULL, the passed hash table will only contain
+ * the property @a propname.
  *
  * If @a pristine is @c TRUE, get the pristine (or "BASE") properties
  * from the working copy, instead of getting the current (or "WORKING")
@@ -768,6 +770,7 @@ typedef svn_error_t *(*svn_wc__proplist_
 svn_error_t *
 svn_wc__prop_list_recursive(svn_wc_context_t *wc_ctx,
                             const char *local_abspath,
+                            const char *propname,
                             svn_depth_t depth,
                             svn_boolean_t pristine,
                             svn_wc__proplist_receiver_t receiver_func,

Modified: subversion/trunk/subversion/libsvn_client/externals.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/externals.c?rev=1082658&r1=1082657&r2=1082658&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/externals.c (original)
+++ subversion/trunk/subversion/libsvn_client/externals.c Thu Mar 17 19:40:07 2011
@@ -1428,7 +1428,8 @@ svn_client__crawl_for_externals(apr_hash
 {
   apr_hash_t *externals_hash = apr_hash_make(result_pool);
 
-  SVN_ERR(svn_wc__prop_list_recursive(ctx->wc_ctx, local_abspath, depth,
+  SVN_ERR(svn_wc__prop_list_recursive(ctx->wc_ctx, local_abspath,
+                                      NULL, depth,
                                       FALSE, /* pristine */
                                       externals_crawl_proplist_receiver,
                                       externals_hash,

Modified: subversion/trunk/subversion/libsvn_client/prop_commands.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/prop_commands.c?rev=1082658&r1=1082657&r2=1082658&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/prop_commands.c (original)
+++ subversion/trunk/subversion/libsvn_client/prop_commands.c Thu Mar 17 19:40:07 2011
@@ -653,70 +653,6 @@ pristine_or_working_propval(const svn_st
   return SVN_NO_ERROR;
 }
 
-
-/* A baton for propget_walk_cb. */
-struct propget_walk_baton
-{
-  const char *propname;  /* The name of the property to get. */
-  svn_boolean_t pristine;  /* Select base rather than working props. */
-  svn_wc_context_t *wc_ctx;  /* Context for the tree being walked. */
-  apr_hash_t *changelist_hash;  /* Keys are changelists to filter on. */
-  apr_hash_t *props;  /* Out: mapping of (path:propval). */
-
-  /* Anchor, anchor_abspath pair for converting to relative paths */
-  const char *anchor;
-  const char *anchor_abspath;
-};
-
-/* An entries-walk callback for svn_client_propget.
- *
- * For the path given by PATH and ENTRY,
- * populate wb->PROPS with the values of property wb->PROPNAME,
- * where "wb" is the WALK_BATON of type "struct propget_walk_baton *".
- * If wb->PRISTINE is true, use the base value, else use the working value.
- *
- * The keys of wb->PROPS will be 'const char *' paths, rooted at the
- * path wb->anchor, and the values are 'const svn_string_t *' property values.
- */
-static svn_error_t *
-propget_walk_cb(const char *local_abspath,
-                svn_node_kind_t kind,
-                void *walk_baton,
-                apr_pool_t *pool)
-{
-  struct propget_walk_baton *wb = walk_baton;
-  const svn_string_t *propval;
-
-  /* If our entry doesn't pass changelist filtering, get outta here. */
-  if (! svn_wc__changelist_match(wb->wc_ctx, local_abspath,
-                                 wb->changelist_hash, pool))
-    return SVN_NO_ERROR;
-
-  SVN_ERR(pristine_or_working_propval(&propval, wb->wc_ctx, local_abspath,
-                                      wb->propname, wb->pristine,
-                                      apr_hash_pool_get(wb->props), pool));
-
-  if (propval)
-    {
-      const char *path;
-
-      if (wb->anchor && wb->anchor_abspath)
-        {
-          path = svn_dirent_join(wb->anchor,
-                                 svn_dirent_skip_ancestor(wb->anchor_abspath,
-                                                          local_abspath),
-                                 apr_hash_pool_get(wb->props));
-        }
-      else
-        path = apr_pstrdup(apr_hash_pool_get(wb->props), local_abspath);
-
-      apr_hash_set(wb->props, path, APR_HASH_KEY_STRING, propval);
-    }
-
-  return SVN_NO_ERROR;
-}
-
-
 /* Helper for the remote case of svn_client_propget.
  *
  * Get the value of property PROPNAME in REVNUM, using RA_LIB and
@@ -825,9 +761,61 @@ remote_propget(apr_hash_t *props,
   return SVN_NO_ERROR;
 }
 
+/* Baton for recursive_propget_receiver(). */
+struct recursive_propget_receiver_baton
+{
+  apr_hash_t *props; /* Hash to collect props. */
+  apr_pool_t *pool; /* Pool to allocate additions to PROPS. */
+  apr_hash_t *changelist_hash; /* Keys are changelists to filter on. */
+  svn_wc_context_t *wc_ctx;  /* Working copy context. */
+
+  /* Anchor, anchor_abspath pair for converting to relative paths */
+  const char *anchor;
+  const char *anchor_abspath;
+};
+
+/* An implementation of svn_wc__proplist_receiver_t. */
+static svn_error_t *
+recursive_propget_receiver(void *baton,
+                           const char *local_abspath,
+                           apr_hash_t *props,
+                           apr_pool_t *scratch_pool)
+{
+  struct recursive_propget_receiver_baton *b = baton;
+  const char *path;
+
+  /* If the node doesn't pass changelist filtering, get outta here. */
+  if (! svn_wc__changelist_match(b->wc_ctx, local_abspath,
+                                 b->changelist_hash, scratch_pool))
+    return SVN_NO_ERROR;
+
+  /* Attempt to convert absolute paths to relative paths for
+   * presentation purposes, if needed. */
+  if (b->anchor && b->anchor_abspath)
+    {
+      path = svn_dirent_join(b->anchor,
+                             svn_dirent_skip_ancestor(b->anchor_abspath,
+                                                      local_abspath),
+                             scratch_pool);
+    }
+  else
+    path = local_abspath;
+
+  if (apr_hash_count(props))
+    {
+      apr_hash_index_t *hi = apr_hash_first(scratch_pool, props);
+      apr_hash_set(b->props, apr_pstrdup(b->pool, path),
+                   APR_HASH_KEY_STRING,
+                   svn_string_dup(svn__apr_hash_index_val(hi), b->pool));
+    }
+
+  return SVN_NO_ERROR;
+}
+
 /* Return the property value for any PROPNAME set on TARGET in *PROPS,
    with WC paths of char * for keys and property values of
-   svn_string_t * for values.  Assumes that PROPS is non-NULL.
+   svn_string_t * for values.  Assumes that PROPS is non-NULL.  Additions
+   to *PROPS are allocated in POOL.
 
    CHANGELISTS is an array of const char * changelist names, used as a
    restrictive filter on items whose properties are set; that is,
@@ -849,8 +837,8 @@ get_prop_from_wc(apr_hash_t *props,
                  apr_pool_t *pool)
 {
   apr_hash_t *changelist_hash = NULL;
-  struct propget_walk_baton wb;
   const char *target_abspath;
+  struct recursive_propget_receiver_baton rb;
 
   SVN_ERR(svn_dirent_get_absolute(&target_abspath, target, pool));
 
@@ -865,35 +853,47 @@ get_prop_from_wc(apr_hash_t *props,
   if (depth == svn_depth_unknown)
     depth = svn_depth_infinity;
 
-  if (strcmp(target_abspath, target) != 0)
+  rb.props = props;
+  rb.pool = pool;
+  rb.wc_ctx = ctx->wc_ctx;
+  rb.changelist_hash = changelist_hash;
+
+  if (strcmp(target, target_abspath) != 0)
     {
-      wb.anchor = target;
-      wb.anchor_abspath = target_abspath;
+      rb.anchor = target;
+      rb.anchor_abspath = target_abspath;
     }
   else
     {
-      wb.anchor = NULL;
-      wb.anchor_abspath = NULL;
+      rb.anchor = NULL;
+      rb.anchor_abspath = NULL;
     }
 
-  wb.propname = propname;
-  wb.pristine = pristine;
-  wb.changelist_hash = changelist_hash;
-  wb.props = props;
-  wb.wc_ctx = ctx->wc_ctx;
-
   /* Fetch the property, recursively or for a single resource. */
   if (depth >= svn_depth_files && kind == svn_node_dir)
     {
-      SVN_ERR(svn_wc__node_walk_children(ctx->wc_ctx, target_abspath, FALSE,
-                                         propget_walk_cb, &wb, depth,
-                                         ctx->cancel_func, ctx->cancel_baton,
-                                         pool));
+      SVN_ERR(svn_wc__prop_list_recursive(ctx->wc_ctx, target_abspath,
+                                          propname, depth, pristine,
+                                          recursive_propget_receiver, &rb,
+                                          ctx->cancel_func, ctx->cancel_baton,
+                                          pool));
     }
   else if (svn_wc__changelist_match(ctx->wc_ctx, target_abspath,
                                     changelist_hash, pool))
     {
-      SVN_ERR(propget_walk_cb(target_abspath, kind, &wb, pool));
+      const svn_string_t *propval;
+
+      SVN_ERR(pristine_or_working_propval(&propval, ctx->wc_ctx, target_abspath,
+                                          propname, pristine, pool, pool));
+      if (propval)
+        {
+          apr_hash_t *target_props = apr_hash_make(pool);
+
+          apr_hash_set(target_props, target_abspath, APR_HASH_KEY_STRING,
+                       propval);
+          SVN_ERR(recursive_propget_receiver(&rb, target_abspath, target_props,
+                                             pool));      
+        }
     }
 
   return SVN_NO_ERROR;
@@ -1279,7 +1279,7 @@ svn_client_proplist3(const char *path_or
               rb.anchor_abspath = NULL;
             }
 
-          SVN_ERR(svn_wc__prop_list_recursive(ctx->wc_ctx, local_abspath,
+          SVN_ERR(svn_wc__prop_list_recursive(ctx->wc_ctx, local_abspath, NULL,
                                               depth, pristine,
                                               recursive_proplist_receiver, &rb,
                                               ctx->cancel_func,

Modified: subversion/trunk/subversion/libsvn_fs_base/dag.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs_base/dag.c?rev=1082658&r1=1082657&r2=1082658&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_fs_base/dag.c (original)
+++ subversion/trunk/subversion/libsvn_fs_base/dag.c Thu Mar 17 19:40:07 2011
@@ -570,7 +570,7 @@ svn_fs_base__dag_get_proplist(apr_hash_t
                                     noderev->prop_key, trail, pool));
   proplist_skel = svn_skel__parse(raw_proplist.data, raw_proplist.len, pool);
   if (proplist_skel)
-    SVN_ERR(svn_skel__parse_proplist(&proplist, proplist_skel, pool));
+    SVN_ERR(svn_skel__parse_proplist(&proplist, proplist_skel, NULL, pool));
 
   *proplist_p = proplist;
   return SVN_NO_ERROR;

Modified: subversion/trunk/subversion/libsvn_fs_base/util/fs_skels.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs_base/util/fs_skels.c?rev=1082658&r1=1082657&r2=1082658&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_fs_base/util/fs_skels.c (original)
+++ subversion/trunk/subversion/libsvn_fs_base/util/fs_skels.c Thu Mar 17 19:40:07 2011
@@ -455,7 +455,7 @@ svn_fs_base__parse_transaction_skel(tran
 
   /* PROPLIST */
   SVN_ERR(svn_skel__parse_proplist(&(transaction->proplist),
-                                   proplist, pool));
+                                   proplist, NULL, pool));
 
   /* COPIES */
   if ((len = svn_skel__list_length(copies)))

Modified: subversion/trunk/subversion/libsvn_subr/skel.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_subr/skel.c?rev=1082658&r1=1082657&r2=1082658&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_subr/skel.c (original)
+++ subversion/trunk/subversion/libsvn_subr/skel.c Thu Mar 17 19:40:07 2011
@@ -682,6 +682,7 @@ svn_skel__parse_int(apr_int64_t *n, cons
 svn_error_t *
 svn_skel__parse_proplist(apr_hash_t **proplist_p,
                          const svn_skel_t *skel,
+                         const char *propname,
                          apr_pool_t *pool /* result_pool */)
 {
   apr_hash_t *proplist = NULL;
@@ -695,8 +696,15 @@ svn_skel__parse_proplist(apr_hash_t **pr
   proplist = apr_hash_make(pool);
   for (elt = skel->children; elt; elt = elt->next->next)
     {
-      svn_string_t *value = svn_string_ncreate(elt->next->data,
-                                               elt->next->len, pool);
+      svn_string_t *value;
+      const char *name;
+
+      if (propname
+          && (elt->len != strlen(propname)
+              || strncmp(propname, elt->data, elt->len) != 0))
+        continue; /* Looking for a particular property and this isn't it. */
+
+      value = svn_string_ncreate(elt->next->data, elt->next->len, pool);
       apr_hash_set(proplist,
                    apr_pstrmemdup(pool, elt->data, elt->len),
                    elt->len,

Modified: subversion/trunk/subversion/libsvn_subr/sqlite.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_subr/sqlite.c?rev=1082658&r1=1082657&r2=1082658&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_subr/sqlite.c (original)
+++ subversion/trunk/subversion/libsvn_subr/sqlite.c Thu Mar 17 19:40:07 2011
@@ -509,7 +509,7 @@ svn_sqlite__column_properties(apr_hash_t
 
   SVN_ERR(svn_skel__parse_proplist(props,
                                    svn_skel__parse(val, len, scratch_pool),
-                                   result_pool));
+                                   NULL, result_pool));
 
   return SVN_NO_ERROR;
 }

Modified: subversion/trunk/subversion/libsvn_wc/props.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/props.c?rev=1082658&r1=1082657&r2=1082658&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/props.c (original)
+++ subversion/trunk/subversion/libsvn_wc/props.c Thu Mar 17 19:40:07 2011
@@ -1671,6 +1671,7 @@ svn_wc_prop_list2(apr_hash_t **props,
 svn_error_t *
 svn_wc__prop_list_recursive(svn_wc_context_t *wc_ctx,
                             const char *local_abspath,
+                            const char *propname,
                             svn_depth_t depth,
                             svn_boolean_t pristine,
                             svn_wc__proplist_receiver_t receiver_func,
@@ -1702,7 +1703,7 @@ svn_wc__prop_list_recursive(svn_wc_conte
     case svn_depth_immediates:
     case svn_depth_infinity:
       SVN_ERR(svn_wc__db_read_props_streamily(wc_ctx->db, local_abspath,
-                                              depth, pristine,
+                                              propname, depth, pristine,
                                               receiver_func, receiver_baton,
                                               cancel_func, cancel_baton,
                                               scratch_pool));

Modified: subversion/trunk/subversion/libsvn_wc/wc_db.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/wc_db.c?rev=1082658&r1=1082657&r2=1082658&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/wc_db.c (original)
+++ subversion/trunk/subversion/libsvn_wc/wc_db.c Thu Mar 17 19:40:07 2011
@@ -5555,6 +5555,7 @@ cache_props_recursive(void *cb_baton,
 svn_error_t *
 svn_wc__db_read_props_streamily(svn_wc__db_t *db,
                                 const char *local_abspath,
+                                const char *propname,
                                 svn_depth_t depth,
                                 svn_boolean_t pristine,
                                 svn_wc__proplist_receiver_t receiver_func,
@@ -5640,7 +5641,8 @@ svn_wc__db_read_props_streamily(svn_wc__
               child_relpath = svn_sqlite__column_text(stmt, 0, NULL);
               child_abspath = svn_dirent_join(wcroot->abspath,
                                               child_relpath, iterpool);
-              SVN_ERR(svn_skel__parse_proplist(&props, prop_skel, iterpool));
+              SVN_ERR(svn_skel__parse_proplist(&props, prop_skel, propname,
+                                               iterpool));
               if (receiver_func && apr_hash_count(props) != 0)
                 {
                   SVN_ERR((*receiver_func)(receiver_baton,

Modified: subversion/trunk/subversion/libsvn_wc/wc_db.h
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/wc_db.h?rev=1082658&r1=1082657&r2=1082658&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/wc_db.h (original)
+++ subversion/trunk/subversion/libsvn_wc/wc_db.h Thu Mar 17 19:40:07 2011
@@ -1632,6 +1632,8 @@ svn_wc__db_read_props(apr_hash_t **props
  * a hash table mapping <tt>char *</tt> names onto svn_string_t *
  * values for any properties of child nodes of LOCAL_ABSPATH (up to DEPTH).
  * If PRISTINE is TRUE, read the pristine props (op_depth = 0).
+ * If PROPNAME is not NULL, the passed hash table will only contain
+ * the property PROPNAME.
  *
  * NOTE: The only valid values for DEPTH are svn_depth_files,
  *       svn_depth_immediates, and svn_depth_infinity.
@@ -1639,6 +1641,7 @@ svn_wc__db_read_props(apr_hash_t **props
 svn_error_t *
 svn_wc__db_read_props_streamily(svn_wc__db_t *db,
                                 const char *local_abspath,
+                                const char *propname,
                                 svn_depth_t depth,
                                 svn_boolean_t pristine,
                                 svn_wc__proplist_receiver_t receiver_func,

Modified: subversion/trunk/subversion/libsvn_wc/workqueue.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/workqueue.c?rev=1082658&r1=1082657&r2=1082658&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/workqueue.c (original)
+++ subversion/trunk/subversion/libsvn_wc/workqueue.c Thu Mar 17 19:40:07 2011
@@ -1246,7 +1246,7 @@ run_postcommit(svn_wc__db_t *db,
   if (arg5->next->is_atom)
     new_dav_cache = NULL;
   else
-    SVN_ERR(svn_skel__parse_proplist(&new_dav_cache, arg5->next,
+    SVN_ERR(svn_skel__parse_proplist(&new_dav_cache, arg5->next, NULL,
                                      scratch_pool));
   SVN_ERR(svn_skel__parse_int(&val, arg5->next->next, scratch_pool));
   keep_changelist = (val != 0);

Modified: subversion/trunk/subversion/tests/cmdline/atomic-ra-revprop-change.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/atomic-ra-revprop-change.c?rev=1082658&r1=1082657&r2=1082658&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/atomic-ra-revprop-change.c (original)
+++ subversion/trunk/subversion/tests/cmdline/atomic-ra-revprop-change.c Thu Mar 17 19:40:07 2011
@@ -198,7 +198,7 @@ extract_values_from_skel(svn_string_t **
   svn_skel_t *skel;
 
   skel = svn_skel__parse(skel_cstr, strlen(skel_cstr), pool);
-  SVN_ERR(svn_skel__parse_proplist(&proplist, skel, pool));
+  SVN_ERR(svn_skel__parse_proplist(&proplist, skel, NULL, pool));
   *old_propval_p = apr_hash_get(proplist, KEY_OLD_PROPVAL, APR_HASH_KEY_STRING);
   *propval_p = apr_hash_get(proplist, KEY_NEW_PROPVAL, APR_HASH_KEY_STRING);
 



Re: svn commit: r1082658 - in /subversion/trunk/subversion: include/private/ libsvn_client/ libsvn_fs_base/ libsvn_fs_base/util/ libsvn_subr/ libsvn_wc/ tests/cmdline/

Posted by Paul Burba <pt...@gmail.com>.
On Thu, Mar 17, 2011 at 3:52 PM, Greg Stein <gs...@gmail.com> wrote:
> On Mar 17, 2011 7:40 PM, <pb...@apache.org> wrote:
>>
>> Author: pburba
>> Date: Thu Mar 17 19:40:07 2011
>> New Revision: 1082658
>>
>> URL: http://svn.apache.org/viewvc?rev=1082658&view=rev
>> Log:
>> Leverage the recent improvements to svn proplist -R[1] so that svn propget
> -R
>> can do away with svn_wc__node_walk_children().
>>
>> [1] See r1066541 and r1071283.
>>
>> * subversion/include/private/svn_skel.h
>> * subversion/libsvn_subr/skel.c
>>  (svn_skel__parse_proplist): Optionally parse only a particular property.
>
> I think this is a truly awful API. You have two entirely different
> semantics, keyed by a parameter, rather than two functions with appropriate
> param lists. And the "parse one" can just return a string_t rather than a
> hash-of-one-element.
>
> Internally, the parse code might look like this, shared between the two, but
> exposing it thus way is really ugly.
>
> Could you please revert this change, and redo it with the two-function
> approach? (or, of course, explain why that doesn't make sense)

Hi Greg,

Point taken, I'll redo it with two functions.

Paul

> Cheers,
> -g
>

Re: svn commit: r1082658 - in /subversion/trunk/subversion: include/private/ libsvn_client/ libsvn_fs_base/ libsvn_fs_base/util/ libsvn_subr/ libsvn_wc/ tests/cmdline/

Posted by Greg Stein <gs...@gmail.com>.
On Mar 17, 2011 7:40 PM, <pb...@apache.org> wrote:
>
> Author: pburba
> Date: Thu Mar 17 19:40:07 2011
> New Revision: 1082658
>
> URL: http://svn.apache.org/viewvc?rev=1082658&view=rev
> Log:
> Leverage the recent improvements to svn proplist -R[1] so that svn propget
-R
> can do away with svn_wc__node_walk_children().
>
> [1] See r1066541 and r1071283.
>
> * subversion/include/private/svn_skel.h
> * subversion/libsvn_subr/skel.c
>  (svn_skel__parse_proplist): Optionally parse only a particular property.

I think this is a truly awful API. You have two entirely different
semantics, keyed by a parameter, rather than two functions with appropriate
param lists. And the "parse one" can just return a string_t rather than a
hash-of-one-element.

Internally, the parse code might look like this, shared between the two, but
exposing it thus way is really ugly.

Could you please revert this change, and redo it with the two-function
approach? (or, of course, explain why that doesn't make sense)

Cheers,
-g