You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by rh...@apache.org on 2010/06/01 12:48:49 UTC

svn commit: r950009 - /subversion/trunk/subversion/libsvn_wc/copy.c

Author: rhuijben
Date: Tue Jun  1 10:48:49 2010
New Revision: 950009

URL: http://svn.apache.org/viewvc?rev=950009&view=rev
Log:
Remove a direct entry manipulation.

* subversion/libsvn_wc/copy.c
  (post_copy_cleanup): Replace an entries specific hack for recording
    deletions of not present nodes with a slightly different hack relying
    on wc_db's handling of subdirectories without administrative area.
    The hack part will no longer be a hack once we move to a central db.

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

Modified: subversion/trunk/subversion/libsvn_wc/copy.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/copy.c?rev=950009&r1=950008&r2=950009&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/copy.c (original)
+++ subversion/trunk/subversion/libsvn_wc/copy.c Tue Jun  1 10:48:49 2010
@@ -559,39 +559,26 @@ post_copy_cleanup(svn_wc__db_t *db,
          with creating a directory.  See Issue #2101 for details. */
       if (entry->deleted)
         {
-          int modify_flags = (SVN_WC__ENTRY_MODIFY_FORCE
-                              | SVN_WC__ENTRY_MODIFY_SCHEDULE
-                              | SVN_WC__ENTRY_MODIFY_DELETED);
-          svn_wc_entry_t tmp_entry;
-
-          tmp_entry.schedule = svn_wc_schedule_delete;
-          tmp_entry.deleted = FALSE;
-
-          if (entry->kind == svn_node_dir)
-            {
-              /* ### WARNING: Very dodgy stuff here! ###
-
-              Directories are a problem since a schedule delete directory
-              needs an admin directory to be present.  It's possible to
-              create a dummy admin directory and that sort of works, it's
-              good enough if the user commits the copy.  Where it falls
-              down is if the user *reverts* the dummy directory since the
-              now schedule normal, copied, directory doesn't have the
-              correct contents.
-
-              The dodgy solution is to cheat and use a schedule delete file
-              as a placeholder!  This is sufficient to provide a delete
-              when the copy is committed.  Attempts to revert any such
-              "fake" files will fail due to a missing text-base. This
-              effectively means that the schedule deletes have to remain
-              schedule delete until the copy is committed, when they become
-              state deleted and everything works! */
-              tmp_entry.kind = svn_node_file;
-              modify_flags |= SVN_WC__ENTRY_MODIFY_KIND;
-            }
+          /* ### WARNING: Very dodgy stuff here! ###
 
-          SVN_ERR(svn_wc__entry_modify(db, child_abspath, svn_node_unknown,
-                                       &tmp_entry, modify_flags, iterpool));
+            Directories are a problem since a schedule delete directory
+            needs an admin directory to be present.  It's possible to
+            create a dummy admin directory and that sort of works, it's
+            good enough if the user commits the copy.  Where it falls
+            down is if the user *reverts* the dummy directory since the
+            now schedule normal, copied, directory doesn't have the
+            correct contents.
+
+            In the entries world we cheated a bit by making directories
+            a file, to allow not creating the administrative area for
+            these not-present directories.
+
+            Currently we apply a different cheat: We record a directory
+            deletion in the parent directory, which our future compatibility
+            handling already handles as if we were in the future single-db
+            operation. */
+
+          SVN_ERR(svn_wc__db_temp_op_delete(db, child_abspath, iterpool));
         }
 
       /* Remove lock stuffs. */