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 2015/09/07 18:39:39 UTC
svn commit: r1701649 -
/subversion/trunk/subversion/libsvn_wc/wc_db_pristine.c
Author: rhuijben
Date: Mon Sep 7 16:39:38 2015
New Revision: 1701649
URL: http://svn.apache.org/r1701649
Log:
Following up on r1701641, handle the ugly pristine store testcase
here instead of by slowing down each and every pristine delete.
* subversion/libsvn_wc/wc_db_pristine.c
(svn_wc__db_pristine_check): Introduce special handling for pristine
store testcase here, where it doesn't slow down the generic case.
Modified:
subversion/trunk/subversion/libsvn_wc/wc_db_pristine.c
Modified: subversion/trunk/subversion/libsvn_wc/wc_db_pristine.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/wc_db_pristine.c?rev=1701649&r1=1701648&r2=1701649&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/wc_db_pristine.c (original)
+++ subversion/trunk/subversion/libsvn_wc/wc_db_pristine.c Mon Sep 7 16:39:38 2015
@@ -909,11 +909,28 @@ svn_wc__db_pristine_check(svn_boolean_t
{
const char *pristine_abspath;
svn_node_kind_t kind_on_disk;
+ svn_error_t *err;
SVN_ERR(get_pristine_fname(&pristine_abspath, wcroot->abspath,
sha1_checksum, scratch_pool, scratch_pool));
- SVN_ERR(svn_io_check_path(pristine_abspath, &kind_on_disk, scratch_pool));
- if (kind_on_disk != svn_node_file)
+ err = svn_io_check_path(pristine_abspath, &kind_on_disk, scratch_pool);
+#ifdef WIN32
+ if (err && err->apr_err == APR_FROM_OS_ERROR(ERROR_ACCESS_DENIED))
+ {
+ svn_error_clear(err);
+ /* Possible race condition: The filename is locked, but there is no
+ file or dir with this name. Let's fall back on checking the DB.
+
+ This case is triggered by the pristine store tests on deleting
+ a file that is still open via another handle, where this other
+ handle has a FILE_SHARE_DELETE share mode.
+ */
+ }
+ else
+#endif
+ if (err)
+ return svn_error_trace(err);
+ else if (kind_on_disk != svn_node_file)
{
*present = FALSE;
return SVN_NO_ERROR;