You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by ph...@apache.org on 2010/06/08 18:19:04 UTC

svn commit: r952720 - /subversion/trunk/subversion/libsvn_wc/wc_db.c

Author: philip
Date: Tue Jun  8 16:19:04 2010
New Revision: 952720

URL: http://svn.apache.org/viewvc?rev=952720&view=rev
Log:
When determining 'hidden' status allow for SVN_EXPERIMENTAL_COPY which
correctly copies excluded nodes into WORKING_NODE not BASE_NODE.

* subversion/libsvn_wc/wc_db.c
  (svn_wc__db_node_hidden): Allow for excluded in WORKING_NODE.

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

Modified: subversion/trunk/subversion/libsvn_wc/wc_db.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/wc_db.c?rev=952720&r1=952719&r2=952720&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/wc_db.c (original)
+++ subversion/trunk/subversion/libsvn_wc/wc_db.c Tue Jun  8 16:19:04 2010
@@ -6957,12 +6957,13 @@ svn_wc__db_node_hidden(svn_boolean_t *hi
 {
   svn_wc__db_pdh_t *pdh;
   const char *local_relpath;
-  svn_wc__db_status_t base_status;
+  svn_wc__db_status_t work_status, base_status;
   svn_sqlite__stmt_t *stmt;
   svn_boolean_t have_row;
 
-  /* Check two things: does a WORKING node exist, and what is the BASE
-     status? */
+  /* This uses an optimisation that first reads the working node and
+     then may read the base node.  It could call svn_wc__db_read_info
+     but that would always read both nodes. */
 
   SVN_ERR_ASSERT(svn_dirent_is_absolute(local_abspath));
 
@@ -6976,18 +6977,19 @@ svn_wc__db_node_hidden(svn_boolean_t *hi
                                     STMT_SELECT_WORKING_NODE));
   SVN_ERR(svn_sqlite__bindf(stmt, "is", pdh->wcroot->wc_id, local_relpath));
   SVN_ERR(svn_sqlite__step(&have_row, stmt));
-  SVN_ERR(svn_sqlite__reset(stmt));
-
-  /* If a working node exists, the node will not be hidden.
 
-     Note: this can ONLY be an add/copy-here/move-here. It is not possible
-     to delete a "hidden" node.  */
   if (have_row)
     {
-      *hidden = FALSE;
+      /* Note: this can ONLY be an add/copy-here/move-here. It is not
+         possible to delete a "hidden" node.  */
+      work_status = svn_sqlite__column_token(stmt, 0, presence_map);
+      *hidden = (work_status == svn_wc__db_status_excluded);
+      SVN_ERR(svn_sqlite__reset(stmt));
       return SVN_NO_ERROR;
     }
 
+  SVN_ERR(svn_sqlite__reset(stmt));
+
   /* Now check the BASE node's status.  */
   SVN_ERR(svn_wc__db_base_get_info(&base_status, NULL, NULL, NULL, NULL,
                                    NULL, NULL, NULL, NULL, NULL, NULL, NULL,