Author: rhuijben
Date: Thu Jul  1 13:39:57 2010
New Revision: 959655

URL: http://svn.apache.org/viewvc?rev=959655&view=rev
Log:
Document the regression in reporting copied on deleted nodes. With
the current state of WC-NG (without 4th tree) there is no way to
fix the regression without guessing for data that was removed by
deleting the working node.

* subversion/libsvn_wc/node.c
  (svn_wc__internal_node_get_schedule): Note problem with
    calculating copied for deleted nodes.

* subversion/libsvn_wc/status.c
  (assemble_status): Try to obtain copied for deleted nodes.

Modified:
    subversion/trunk/subversion/libsvn_wc/node.c
    subversion/trunk/subversion/libsvn_wc/status.c

Modified: subversion/trunk/subversion/libsvn_wc/node.c
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/node.c?rev=959655&r1=959654&r2=959655&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/node.c (original)
+++ subversion/trunk/subversion/libsvn_wc/node.c Thu Jul  1 13:39:57 2010
@@ -1258,10 +1258,33 @@ svn_wc__internal_node_get_schedule(svn_w
 
       case svn_wc__db_status_deleted:
       case svn_wc__db_status_obstructed_delete:
-        if (schedule)
-          *schedule = svn_wc_schedule_delete;
-        break;
+        {
+          const char *work_del_abspath;
+
+          if (schedule)
+            *schedule = svn_wc_schedule_delete;
+
+          if (!copied)
+            break;
+
+          /* Find out details of our deletion.  */
+          SVN_ERR(svn_wc__db_scan_deletion(NULL,
+                                           NULL,
+                                           NULL,
+                                           &work_del_abspath,
+                                           db, local_abspath,
+                                           scratch_pool, scratch_pool));
+
+          if (!work_del_abspath)
+            break; /* Base deletion */
+
+          /* We miss the 4th tree to properly find out if this is
+             the root of a working-delete. Only in that case
+             should copied be set to true. See entries.c for details. */
 
+          *copied = FALSE; /* Until we can fix this test */
+          break;
+        }
       case svn_wc__db_status_added:
       case svn_wc__db_status_obstructed_add:
         {

Modified: subversion/trunk/subversion/libsvn_wc/status.c
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/status.c?rev=959655&r1=959654&r2=959655&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/status.c (original)
+++ subversion/trunk/subversion/libsvn_wc/status.c Thu Jul  1 13:39:57 2010
@@ -382,12 +382,24 @@ assemble_status(svn_wc_status3_t **statu
             node_status = svn_wc_status_obstructed;
         }
       else if (db_status == svn_wc__db_status_deleted)
-        node_status = svn_wc_status_deleted;
+        {
+          node_status = svn_wc_status_deleted;
+
+          SVN_ERR(svn_wc__internal_node_get_schedule(NULL, &copied,
+                                                     db, local_abspath,
+                                                     scratch_pool));
+        }
     }
   else
     {
       if (db_status == svn_wc__db_status_deleted)
-        node_status = svn_wc_status_deleted;
+        {
+          node_status = svn_wc_status_deleted;
+
+          SVN_ERR(svn_wc__internal_node_get_schedule(NULL, &copied,
+                                                     db, local_abspath,
+                                                     scratch_pool));
+        }
       else if (path_kind != svn_node_file)
         {
           /* A present or added file should be on disk, so it is


Reply via email to