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 2012/08/01 06:03:45 UTC

svn commit: r1367856 - in /subversion/branches/1.7.x: ./ STATUS subversion/libsvn_wc/lock.c

Author: svn-role
Date: Wed Aug  1 04:03:45 2012
New Revision: 1367856

URL: http://svn.apache.org/viewvc?rev=1367856&view=rev
Log:
Reintegrate the 1.7.x-r1361341 branch:

 * r1361341
   Avoid checking for working copies above the current working copy from
   svn_wc__acquire_write_lock() to avoid checking for .svn/wc.db in
   directories where we might not have read permission.
   Justification:
     Resolves a problem reported on the CollabNet Subversion forum.
   Branch: ^/subversion/branches/1.7.x-r1361341
   Notes:
     Requires a backport branch because we renamed svn_wc__db_kind_dir to
     svn_kind_dir for 1.8.
   Votes:
     +1: rhuijben, cmpilato, philip

Modified:
    subversion/branches/1.7.x/   (props changed)
    subversion/branches/1.7.x/STATUS
    subversion/branches/1.7.x/subversion/libsvn_wc/lock.c

Propchange: subversion/branches/1.7.x/
------------------------------------------------------------------------------
  Merged /subversion/trunk:r1361341
  Merged /subversion/branches/1.7.x-r1361341:r1361342-1367855

Modified: subversion/branches/1.7.x/STATUS
URL: http://svn.apache.org/viewvc/subversion/branches/1.7.x/STATUS?rev=1367856&r1=1367855&r2=1367856&view=diff
==============================================================================
--- subversion/branches/1.7.x/STATUS (original)
+++ subversion/branches/1.7.x/STATUS Wed Aug  1 04:03:45 2012
@@ -80,16 +80,3 @@ Veto-blocked changes:
 
 Approved changes:
 =================
-
- * r1361341
-   Avoid checking for working copies above the current working copy from
-   svn_wc__acquire_write_lock() to avoid checking for .svn/wc.db in
-   directories where we might not have read permission.
-   Justification:
-     Resolves a problem reported on the CollabNet Subversion forum.
-   Branch: ^/subversion/branches/1.7.x-r1361341
-   Notes:
-     Requires a backport branch because we renamed svn_wc__db_kind_dir to
-     svn_kind_dir for 1.8.
-   Votes:
-     +1: rhuijben, cmpilato, philip

Modified: subversion/branches/1.7.x/subversion/libsvn_wc/lock.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.7.x/subversion/libsvn_wc/lock.c?rev=1367856&r1=1367855&r2=1367856&view=diff
==============================================================================
--- subversion/branches/1.7.x/subversion/libsvn_wc/lock.c (original)
+++ subversion/branches/1.7.x/subversion/libsvn_wc/lock.c Wed Aug  1 04:03:45 2012
@@ -1524,6 +1524,21 @@ svn_wc__acquire_write_lock(const char **
                              svn_dirent_local_style(local_abspath,
                                                     scratch_pool));
 
+  if (lock_anchor && kind == svn_wc__db_kind_dir)
+    {
+      svn_boolean_t is_wcroot;
+
+      SVN_ERR_ASSERT(lock_root_abspath != NULL);
+
+      /* Perform a cheap check to avoid looking for a parent working copy,
+         which might be very expensive in some specific scenarios */
+      SVN_ERR(svn_wc__db_is_wcroot(&is_wcroot, db, local_abspath,
+                                   scratch_pool));
+
+      if (is_wcroot)
+        lock_anchor = FALSE;
+    }
+
   if (lock_anchor)
     {
       const char *parent_abspath;