Return-Path: Delivered-To: apmail-subversion-commits-archive@minotaur.apache.org Received: (qmail 27438 invoked from network); 8 Jul 2010 08:37:07 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 8 Jul 2010 08:37:07 -0000 Received: (qmail 76616 invoked by uid 500); 8 Jul 2010 08:37:07 -0000 Delivered-To: apmail-subversion-commits-archive@subversion.apache.org Received: (qmail 76381 invoked by uid 500); 8 Jul 2010 08:37:05 -0000 Mailing-List: contact commits-help@subversion.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@subversion.apache.org Delivered-To: mailing list commits@subversion.apache.org Received: (qmail 76374 invoked by uid 99); 8 Jul 2010 08:37:04 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 08 Jul 2010 08:37:04 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 08 Jul 2010 08:37:01 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id A4C1A23889E1; Thu, 8 Jul 2010 08:35:38 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r961629 - /subversion/trunk/subversion/libsvn_wc/lock.c Date: Thu, 08 Jul 2010 08:35:38 -0000 To: commits@subversion.apache.org From: rhuijben@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20100708083538.A4C1A23889E1@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: rhuijben Date: Thu Jul 8 08:35:38 2010 New Revision: 961629 URL: http://svn.apache.org/viewvc?rev=961629&view=rev Log: * subversion/libsvn_wc/lock.c (adm_access_alloc): Following up on r958908, only allow creating an access baton for a locked directory if there is no existing access baton for that directory attached to the db. Modified: subversion/trunk/subversion/libsvn_wc/lock.c Modified: subversion/trunk/subversion/libsvn_wc/lock.c URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/lock.c?rev=961629&r1=961628&r2=961629&view=diff ============================================================================== --- subversion/trunk/subversion/libsvn_wc/lock.c (original) +++ subversion/trunk/subversion/libsvn_wc/lock.c Thu Jul 8 08:35:38 2010 @@ -314,10 +314,17 @@ adm_access_alloc(svn_wc_adm_access_t **a /* If the db already owns a lock, we can't add an extra lock record */ SVN_ERR(svn_wc__db_temp_own_lock(&owns_lock, db, path, scratch_pool)); - if (!owns_lock) - SVN_ERR(svn_wc__db_wclock_set(db, lock->abspath, 0, scratch_pool)); + /* If DB owns the lock, but when there is no access baton open for this + directory, old access baton based code is trying to access data that + was previously locked by new code. Just hand them the lock, or + important code paths like svn_wc_add3() will start failing */ + if (!owns_lock + || svn_wc__adm_retrieve_internal2(db, lock->abspath, scratch_pool)) + { + SVN_ERR(svn_wc__db_wclock_set(db, lock->abspath, 0, scratch_pool)); - SVN_ERR(svn_wc__db_temp_mark_locked(db, lock->abspath, scratch_pool)); + SVN_ERR(svn_wc__db_temp_mark_locked(db, lock->abspath, scratch_pool)); + } } err = add_to_shared(lock, scratch_pool);