Author: rhuijben
Date: Fri Feb 20 12:46:41 2015
New Revision: 1661111

URL: http://svn.apache.org/r1661111
Log:
Fold the ugly svn_wc__db_node_hidden() function into its only remaining caller.

* subversion/libsvn_wc/node.c
  (filter_and_make_absolute): Use svn_wc__db_read_info directly.

* subversion/libsvn_wc/wc_db.c
  (svn_wc__db_node_hidden): Remove function.

* subversion/libsvn_wc/wc_db.h
  (svn_wc__db_node_hidden): Remove function.

Modified:
    subversion/trunk/subversion/libsvn_wc/node.c
    subversion/trunk/subversion/libsvn_wc/wc_db.c
    subversion/trunk/subversion/libsvn_wc/wc_db.h

Modified: subversion/trunk/subversion/libsvn_wc/node.c
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/node.c?rev=1661111&r1=1661110&r2=1661111&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/node.c (original)
+++ subversion/trunk/subversion/libsvn_wc/node.c Fri Feb 20 12:46:41 2015
@@ -83,12 +83,22 @@ filter_and_make_absolute(const apr_array
       /* Don't add hidden nodes to *CHILDREN if we don't want them. */
       if (!show_hidden)
         {
-          svn_boolean_t child_is_hidden;
+          svn_wc__db_status_t status;
 
-          SVN_ERR(svn_wc__db_node_hidden(&child_is_hidden, wc_ctx->db,
-                                         child_abspath, scratch_pool));
-          if (child_is_hidden)
-            continue;
+          SVN_ERR(svn_wc__db_read_info(&status, NULL, NULL, NULL, NULL, NULL,
+                                       NULL, NULL, NULL, NULL, NULL, NULL,
+                                       NULL, NULL, NULL, NULL, NULL, NULL,
+                                       NULL, NULL, NULL, NULL, NULL, NULL,
+                                       NULL, NULL, NULL,
+                                       wc_ctx->db, child_abspath,
+                                       scratch_pool, scratch_pool));
+
+          if (status == svn_wc__db_status_server_excluded
+              || status == svn_wc__db_status_not_present
+              || status == svn_wc__db_status_excluded)
+            {
+              continue;
+            }
         }
 
       APR_ARRAY_PUSH(children, const char *) = child_abspath;

Modified: subversion/trunk/subversion/libsvn_wc/wc_db.c
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/wc_db.c?rev=1661111&r1=1661110&r2=1661111&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/wc_db.c (original)
+++ subversion/trunk/subversion/libsvn_wc/wc_db.c Fri Feb 20 12:46:41 2015
@@ -14252,38 +14252,6 @@ svn_wc__db_read_kind(svn_node_kind_t *ki
   return svn_error_trace(svn_sqlite__reset(stmt_info));
 }
 
-
-svn_error_t *
-svn_wc__db_node_hidden(svn_boolean_t *hidden,
-                       svn_wc__db_t *db,
-                       const char *local_abspath,
-                       apr_pool_t *scratch_pool)
-{
-  svn_wc__db_wcroot_t *wcroot;
-  const char *local_relpath;
-  svn_wc__db_status_t status;
-
-  SVN_ERR_ASSERT(svn_dirent_is_absolute(local_abspath));
-
-  SVN_ERR(svn_wc__db_wcroot_parse_local_abspath(&wcroot, &local_relpath, db,
-                              local_abspath, scratch_pool, scratch_pool));
-  VERIFY_USABLE_WCROOT(wcroot);
-
-  SVN_ERR(read_info(&status, NULL, NULL, NULL, NULL, NULL,
-                    NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
-                    NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
-                    NULL, NULL, NULL,
-                    wcroot, local_relpath,
-                    scratch_pool, scratch_pool));
-
-  *hidden = (status == svn_wc__db_status_server_excluded
-             || status == svn_wc__db_status_not_present
-             || status == svn_wc__db_status_excluded);
-
-  return SVN_NO_ERROR;
-}
-
-
 svn_error_t *
 svn_wc__db_is_wcroot(svn_boolean_t *is_wcroot,
                      svn_wc__db_t *db,

Modified: subversion/trunk/subversion/libsvn_wc/wc_db.h
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/wc_db.h?rev=1661111&r1=1661110&r2=1661111&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/wc_db.h (original)
+++ subversion/trunk/subversion/libsvn_wc/wc_db.h Fri Feb 20 12:46:41 2015
@@ -2397,16 +2397,6 @@ svn_wc__db_read_kind(svn_node_kind_t *ki
                      svn_boolean_t show_hidden,
                      apr_pool_t *scratch_pool);
 
-
-/* An analog to svn_wc__entry_is_hidden().  Set *HIDDEN to TRUE if
-   LOCAL_ABSPATH in DB "is not present, and I haven't scheduled something
-   over the top of it." */
-svn_error_t *
-svn_wc__db_node_hidden(svn_boolean_t *hidden,
-                       svn_wc__db_t *db,
-                       const char *local_abspath,
-                       apr_pool_t *scratch_pool);
-
 /* Checks if a node replaces a node in a different layer. Also check if it
    replaces a BASE (op_depth 0) node or just a node in a higher layer (a copy).
    Finally check if this is the root of the replacement, or if the replacement


Reply via email to