subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From phi...@apache.org
Subject svn commit: r1508438 - in /subversion/trunk/subversion/libsvn_client: commit.c update.c
Date Tue, 30 Jul 2013 13:50:23 GMT
Author: philip
Date: Tue Jul 30 13:50:23 2013
New Revision: 1508438

URL: http://svn.apache.org/r1508438
Log:
When sleeping after commit/update use wcroot paths if possible
as they will not have been removed by the operation.  This enables
the shorter sleep in more cases.

* subversion/libsvn_client/commit.c
  (svn_client_commit6): Get wcroot path if possible.

* subversion/libsvn_client/update.c
  (svn_client_update4): Get wcroot path if possible.

Modified:
    subversion/trunk/subversion/libsvn_client/commit.c
    subversion/trunk/subversion/libsvn_client/update.c

Modified: subversion/trunk/subversion/libsvn_client/commit.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/commit.c?rev=1508438&r1=1508437&r2=1508438&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/commit.c (original)
+++ subversion/trunk/subversion/libsvn_client/commit.c Tue Jul 30 13:50:23 2013
@@ -1025,9 +1025,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/trunk/subversion/libsvn_client/update.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/update.c?rev=1508438&r1=1508437&r2=1508438&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/update.c (original)
+++ subversion/trunk/subversion/libsvn_client/update.c Tue Jul 30 13:50:23 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);
 }



Mime
View raw message