Author: svn-role
Date: Thu Aug 15 04:00:42 2013
New Revision: 1514149

URL: http://svn.apache.org/r1514149
Log:
Merge r1508438 from trunk:

 * r1508438
   Try harder to pass an existing path to sleep for timestamps
   Justification:
     Performance regression from 1.6, reported by user.
   Votes:
     +1: philip, rhuijben, stefan2

Modified:
    subversion/branches/1.8.x/   (props changed)
    subversion/branches/1.8.x/STATUS
    subversion/branches/1.8.x/subversion/libsvn_client/commit.c
    subversion/branches/1.8.x/subversion/libsvn_client/update.c

Propchange: subversion/branches/1.8.x/
------------------------------------------------------------------------------
  Merged /subversion/trunk:r1508438

Modified: subversion/branches/1.8.x/STATUS
URL: 
http://svn.apache.org/viewvc/subversion/branches/1.8.x/STATUS?rev=1514149&r1=1514148&r2=1514149&view=diff
==============================================================================
--- subversion/branches/1.8.x/STATUS (original)
+++ subversion/branches/1.8.x/STATUS Thu Aug 15 04:00:42 2013
@@ -230,13 +230,6 @@ Veto-blocked changes:
 Approved changes:
 =================
 
- * r1508438
-   Try harder to pass an existing path to sleep for timestamps
-   Justification:
-     Performance regression from 1.6, reported by user.
-   Votes:
-     +1: philip, rhuijben, stefan2
-
  * r1506966, r1511603
    Don't do double UTF8-to-native conversion in svnadmin notifications.
    Justification:

Modified: subversion/branches/1.8.x/subversion/libsvn_client/commit.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/1.8.x/subversion/libsvn_client/commit.c?rev=1514149&r1=1514148&r2=1514149&view=diff
==============================================================================
--- subversion/branches/1.8.x/subversion/libsvn_client/commit.c (original)
+++ subversion/branches/1.8.x/subversion/libsvn_client/commit.c Thu Aug 15 
04:00:42 2013
@@ -999,9 +999,22 @@ svn_client_commit6(const apr_array_heade
     }
 
  cleanup:
-  /* Sleep to ensure timestamp integrity. */
+  /* Sleep to ensure timestamp integrity.  BASE_ABSPATH may have been
+     removed by the commit or it may the common ancestor of multiple
+     working copies. */
   if (timestamp_sleep)
-    svn_io_sleep_for_timestamps(base_abspath, pool);
+    {
+      const char *wcroot_abspath;
+      svn_error_t *err = svn_wc__get_wcroot(&wcroot_abspath, ctx->wc_ctx,
+                                            base_abspath, pool, pool);
+      if (err)
+        {
+          svn_error_clear(err);
+          wcroot_abspath = NULL;
+        }
+
+      svn_io_sleep_for_timestamps(wcroot_abspath, pool);
+    }
 
   /* Abort the commit if it is still in progress. */
   svn_pool_clear(iterpool); /* Close open handles before aborting */

Modified: subversion/branches/1.8.x/subversion/libsvn_client/update.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/1.8.x/subversion/libsvn_client/update.c?rev=1514149&r1=1514148&r2=1514149&view=diff
==============================================================================
--- subversion/branches/1.8.x/subversion/libsvn_client/update.c (original)
+++ subversion/branches/1.8.x/subversion/libsvn_client/update.c Thu Aug 15 
04:00:42 2013
@@ -701,7 +701,23 @@ svn_client_update4(apr_array_header_t **
 
  cleanup:
   if (sleep)
-    svn_io_sleep_for_timestamps((paths->nelts == 1) ? path : NULL, pool);
+    {
+      const char *wcroot_abspath;
+
+      if (paths->nelts == 1)
+        {
+          const char *abspath;
+
+          /* PATH iteslf may have been removed by the update. */
+          SVN_ERR(svn_dirent_get_absolute(&abspath, path, pool));
+          SVN_ERR(svn_wc__get_wcroot(&wcroot_abspath, ctx->wc_ctx, abspath,
+                                     pool, pool));
+        }
+      else
+        wcroot_abspath = NULL;
+
+      svn_io_sleep_for_timestamps(wcroot_abspath, pool);
+    }
 
   return svn_error_trace(err);
 }


Reply via email to