subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gst...@apache.org
Subject svn commit: r929365 - /subversion/trunk/subversion/libsvn_wc/workqueue.c
Date Wed, 31 Mar 2010 02:45:29 GMT
Author: gstein
Date: Wed Mar 31 02:45:28 2010
New Revision: 929365

URL: http://svn.apache.org/viewvc?rev=929365&view=rev
Log:
Removing the use of entry_modify2() resulted in copyfrom information in
the database that did NOT get elided. We do this manually (for now),
though the most-correct resolution is to prevent that stray copyfrom
information from getting into the database in the first place.

* subversion/libsvn_wc/workqueue.c:
  (run_revert): go ahead and use db_global_record_fileinfo(), but follow
    it up with a call to db_temp_elide_copyfrom()

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

Modified: subversion/trunk/subversion/libsvn_wc/workqueue.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/workqueue.c?rev=929365&r1=929364&r2=929365&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/workqueue.c (original)
+++ subversion/trunk/subversion/libsvn_wc/workqueue.c Wed Mar 31 02:45:28 2010
@@ -312,6 +312,8 @@ run_revert(svn_wc__db_t *db,
               reinstall_working = TRUE;
 #endif
 #if 0
+              /* ### try to avoid altering the timestamp if the intended
+                 ### contents are the same as current-contents.  */
               SVN_ERR(svn_wc__text_modified_internal_p(&reinstall_working,
                                                        db, local_abspath,
                                                        FALSE, FALSE,
@@ -325,6 +327,8 @@ run_revert(svn_wc__db_t *db,
           svn_boolean_t use_commit_times;
           apr_finfo_t finfo;
 
+          /* ### this should use OP_FILE_INSTALL.  */
+
           /* Copy from the text base to the working file. The working file
              specifies the params for translation.  */
           SVN_ERR(copy_and_translate(db, text_base_path, local_abspath,
@@ -2036,27 +2040,16 @@ run_file_install(svn_wc__db_t *db,
                           APR_FINFO_MIN | APR_FINFO_LINK,
                           scratch_pool));
 
-      /* ### for now, stick to the entry_modify2(). there is something more
-         ### going on there. merge_tests 34 will fail if we switch to the
-         ### wc_db API.  */
-#if 0
       SVN_ERR(svn_wc__db_global_record_fileinfo(db, local_abspath,
                                                 finfo.size, last_mod_time,
                                                 scratch_pool));
-#else
-      {
-        svn_wc_entry_t tmp_entry;
 
-        tmp_entry.text_time = last_mod_time;
-        tmp_entry.working_size = finfo.size;
-      SVN_ERR(svn_wc__entry_modify2(db, local_abspath,
-                                    svn_node_unknown, FALSE,
-                                    &tmp_entry,
-                                    SVN_WC__ENTRY_MODIFY_TEXT_TIME
-                                      | SVN_WC__ENTRY_MODIFY_WORKING_SIZE,
-                                    scratch_pool));
-      }
-#endif
+      /* ### there used to be a call to entry_modify2() here, to set the
+         ### TRANSLATED_SIZE and LAST_MOD_TIME values. that function elided
+         ### copyfrom information that snuck into the database. it should
+         ### not be there in the first place, but we can manually get rid
+         ### of the erroneous, inheritable copyfrom data.  */
+      SVN_ERR(svn_wc__db_temp_elide_copyfrom(db, local_abspath, scratch_pool));
     }
 
   return SVN_NO_ERROR;



Mime
View raw message