You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by sv...@apache.org on 2014/12/01 05:01:40 UTC

svn commit: r1642635 - in /subversion/branches/1.8.x: ./ STATUS subversion/libsvn_wc/cleanup.c

Author: svn-role
Date: Mon Dec  1 04:01:39 2014
New Revision: 1642635

URL: http://svn.apache.org/r1642635
Log:
Merge the 1.8.x-r1633126 branch:

 * r1633126
   Improve performance of recorded timestamp fixups in svn cleanup
   Justification:
     Fixing timestamps on a working copy with properly recorded timestamps
     should not cost 10* the time of walking the working copy for status.
   Branch:
     ^/subversion/branches/1.8.x-r1633126
   Votes:
     +1: rhuijben, philip, stefan2

Modified:
    subversion/branches/1.8.x/   (props changed)
    subversion/branches/1.8.x/STATUS
    subversion/branches/1.8.x/subversion/libsvn_wc/cleanup.c

Propchange: subversion/branches/1.8.x/
------------------------------------------------------------------------------
  Merged /subversion/trunk:r1633126
  Merged /subversion/branches/1.8.x-r1633126:r1633130-1642634

Modified: subversion/branches/1.8.x/STATUS
URL: http://svn.apache.org/viewvc/subversion/branches/1.8.x/STATUS?rev=1642635&r1=1642634&r2=1642635&view=diff
==============================================================================
--- subversion/branches/1.8.x/STATUS (original)
+++ subversion/branches/1.8.x/STATUS Mon Dec  1 04:01:39 2014
@@ -108,16 +108,6 @@ Veto-blocked changes:
 Approved changes:
 =================
 
- * r1633126
-   Improve performance of recorded timestamp fixups in svn cleanup
-   Justification:
-     Fixing timestamps on a working copy with properly recorded timestamps
-     should not cost 10* the time of walking the working copy for status.
-   Branch:
-     ^/subversion/branches/1.8.x-r1633126
-   Votes:
-     +1: rhuijben, philip, stefan2
-
  * r1641564
    Fix issue 4185: file external not following history.
    Justification:

Modified: subversion/branches/1.8.x/subversion/libsvn_wc/cleanup.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.8.x/subversion/libsvn_wc/cleanup.c?rev=1642635&r1=1642634&r2=1642635&view=diff
==============================================================================
--- subversion/branches/1.8.x/subversion/libsvn_wc/cleanup.c (original)
+++ subversion/branches/1.8.x/subversion/libsvn_wc/cleanup.c Mon Dec  1 04:01:39 2014
@@ -67,69 +67,13 @@ can_be_cleaned(int *wc_format,
   return SVN_NO_ERROR;
 }
 
-/* Do a modifed check for LOCAL_ABSPATH, and all working children, to force
-   timestamp repair. */
+/* Dummy svn_wc_status_func4_t implementation */
 static svn_error_t *
-repair_timestamps(svn_wc__db_t *db,
-                  const char *local_abspath,
-                  svn_cancel_func_t cancel_func,
-                  void *cancel_baton,
-                  apr_pool_t *scratch_pool)
+status_dummy_callback(void *baton,
+                      const char *local_abspath,
+                      const svn_wc_status3_t *status,
+                      apr_pool_t *scratch_pool)
 {
-  svn_node_kind_t kind;
-  svn_wc__db_status_t status;
-
-  if (cancel_func)
-    SVN_ERR(cancel_func(cancel_baton));
-
-  SVN_ERR(svn_wc__db_read_info(&status, &kind,
-                               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,
-                               db, local_abspath, scratch_pool, scratch_pool));
-
-  if (status == svn_wc__db_status_server_excluded
-      || status == svn_wc__db_status_deleted
-      || status == svn_wc__db_status_excluded
-      || status == svn_wc__db_status_not_present)
-    return SVN_NO_ERROR;
-
-  if (kind == svn_node_file
-      || kind == svn_node_symlink)
-    {
-      svn_boolean_t modified;
-      SVN_ERR(svn_wc__internal_file_modified_p(&modified,
-                                               db, local_abspath, FALSE,
-                                               scratch_pool));
-    }
-  else if (kind == svn_node_dir)
-    {
-      apr_pool_t *iterpool = svn_pool_create(scratch_pool);
-      const apr_array_header_t *children;
-      int i;
-
-      SVN_ERR(svn_wc__db_read_children_of_working_node(&children, db,
-                                                       local_abspath,
-                                                       scratch_pool,
-                                                       iterpool));
-      for (i = 0; i < children->nelts; ++i)
-        {
-          const char *child_abspath;
-
-          svn_pool_clear(iterpool);
-
-          child_abspath = svn_dirent_join(local_abspath,
-                                          APR_ARRAY_IDX(children, i,
-                                                        const char *),
-                                          iterpool);
-
-          SVN_ERR(repair_timestamps(db, child_abspath,
-                                    cancel_func, cancel_baton, iterpool));
-        }
-      svn_pool_destroy(iterpool);
-    }
-
   return SVN_NO_ERROR;
 }
 
@@ -184,8 +128,17 @@ cleanup_internal(svn_wc__db_t *db,
       SVN_ERR(svn_wc__db_pristine_cleanup(db, dir_abspath, scratch_pool));
     }
 
-  SVN_ERR(repair_timestamps(db, dir_abspath, cancel_func, cancel_baton,
-                            scratch_pool));
+  /* Instead of implementing a separate repair step here, use the standard
+     status walker's optimized implementation, which performs repairs when
+     there is a lock. */
+  SVN_ERR(svn_wc__internal_walk_status(db, dir_abspath, svn_depth_infinity,
+                                       FALSE /* get_all */,
+                                       FALSE /* no_ignore */,
+                                       FALSE /* ignore_text_mods */,
+                                       NULL /* ignore patterns */,
+                                       status_dummy_callback, NULL,
+                                       cancel_func, cancel_baton,
+                                       scratch_pool));
 
   /* All done, toss the lock */
   SVN_ERR(svn_wc__db_wclock_release(db, dir_abspath, scratch_pool));