Author: rhuijben
Date: Thu Dec 19 23:39:51 2013
New Revision: 1552456

URL: http://svn.apache.org/r1552456
Log:
Small code cleanup in ra_plugin.c. No functional changes.

* subversion/libsvn_ra_local/ra_plugin.c
  (get_node_props): Remove iprop support and cleanup arguments.
  (svn_ra_local__get_file,
   svn_ra_local__get_dir): Update caller that only needs node props.
  (svn_ra_local__get_inherited_props): Obtain iprops directly.

Modified:
    subversion/trunk/subversion/libsvn_ra_local/ra_plugin.c

Modified: subversion/trunk/subversion/libsvn_ra_local/ra_plugin.c
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_ra_local/ra_plugin.c?rev=1552456&r1=1552455&r2=1552456&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_ra_local/ra_plugin.c (original)
+++ subversion/trunk/subversion/libsvn_ra_local/ra_plugin.c Thu Dec 19 23:39:51 
2013
@@ -1121,12 +1121,12 @@ svn_ra_local__stat(svn_ra_session_t *ses
 
 
 
+/* Obtain the properties for a node, including its 'entry props */
 static svn_error_t *
 get_node_props(apr_hash_t **props,
-               apr_array_header_t **inherited_props,
-               svn_ra_local__session_baton_t *sess,
                svn_fs_root_t *root,
                const char *path,
+               const char *uuid,
                apr_pool_t *result_pool,
                apr_pool_t *scratch_pool)
 {
@@ -1134,39 +1134,25 @@ get_node_props(apr_hash_t **props,
   const char *cmt_date, *cmt_author;
 
   /* Create a hash with props attached to the fs node. */
-  if (props)
-    {
-      SVN_ERR(svn_fs_node_proplist(props, root, path, result_pool));
-    }
-
-  /* Get inherited properties if requested. */
-  if (inherited_props)
-    {
-      SVN_ERR(svn_repos_fs_get_inherited_props(inherited_props, root, path,
-                                               NULL, NULL, NULL,
-                                               result_pool, scratch_pool));
-    }
+  SVN_ERR(svn_fs_node_proplist(props, root, path, result_pool));
 
   /* Now add some non-tweakable metadata to the hash as well... */
 
-  if (props)
-    {
-      /* The so-called 'entryprops' with info about CR & friends. */
-      SVN_ERR(svn_repos_get_committed_info(&cmt_rev, &cmt_date,
-                                           &cmt_author, root, path,
-                                           scratch_pool));
-
-      svn_hash_sets(*props, SVN_PROP_ENTRY_COMMITTED_REV,
-                    svn_string_createf(result_pool, "%ld", cmt_rev));
-      svn_hash_sets(*props, SVN_PROP_ENTRY_COMMITTED_DATE, cmt_date ?
-                    svn_string_create(cmt_date, result_pool) :NULL);
-      svn_hash_sets(*props, SVN_PROP_ENTRY_LAST_AUTHOR, cmt_author ?
-                    svn_string_create(cmt_author, result_pool) :NULL);
-      svn_hash_sets(*props, SVN_PROP_ENTRY_UUID,
-                    svn_string_create(sess->uuid, result_pool));
+  /* The so-called 'entryprops' with info about CR & friends. */
+  SVN_ERR(svn_repos_get_committed_info(&cmt_rev, &cmt_date,
+                                       &cmt_author, root, path,
+                                       scratch_pool));
+
+  svn_hash_sets(*props, SVN_PROP_ENTRY_COMMITTED_REV,
+                svn_string_createf(result_pool, "%ld", cmt_rev));
+  svn_hash_sets(*props, SVN_PROP_ENTRY_COMMITTED_DATE, cmt_date ?
+                svn_string_create(cmt_date, result_pool) : NULL);
+  svn_hash_sets(*props, SVN_PROP_ENTRY_LAST_AUTHOR, cmt_author ?
+                svn_string_create(cmt_author, result_pool) : NULL);
+  svn_hash_sets(*props, SVN_PROP_ENTRY_UUID,
+                svn_string_create(uuid, result_pool));
 
-      /* We have no 'wcprops' in ra_local, but might someday. */
-    }
+  /* We have no 'wcprops' in ra_local, but might someday. */
 
   return SVN_NO_ERROR;
 }
@@ -1238,7 +1224,7 @@ svn_ra_local__get_file(svn_ra_session_t 
 
   /* Handle props if requested. */
   if (props)
-    SVN_ERR(get_node_props(props, NULL, sess, root, abs_path, pool, pool));
+    SVN_ERR(get_node_props(props, root, abs_path, sess->uuid, pool, pool));
 
   return SVN_NO_ERROR;
 }
@@ -1349,7 +1335,7 @@ svn_ra_local__get_dir(svn_ra_session_t *
 
   /* Handle props if requested. */
   if (props)
-    SVN_ERR(get_node_props(props, NULL, sess, root, abs_path, pool, pool));
+    SVN_ERR(get_node_props(props, root, abs_path, sess->uuid, pool, pool));
 
   return SVN_NO_ERROR;
 }
@@ -1664,8 +1650,11 @@ svn_ra_local__get_inherited_props(svn_ra
                                _("'%s' path not found"), abs_path);
     }
 
-  return svn_error_trace(get_node_props(NULL, iprops, sess, root, abs_path,
-                                        result_pool, scratch_pool));
+  return svn_error_trace(
+                svn_repos_fs_get_inherited_props(iprops, root, abs_path,
+                                                 NULL /* propname */,
+                                                 NULL, NULL /* auth */,
+                                                 result_pool, scratch_pool));
 }
 
 static svn_error_t *


Reply via email to