Return-Path: X-Original-To: apmail-subversion-commits-archive@minotaur.apache.org Delivered-To: apmail-subversion-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 91F839702 for ; Mon, 27 Feb 2012 20:32:16 +0000 (UTC) Received: (qmail 85855 invoked by uid 500); 27 Feb 2012 20:32:16 -0000 Delivered-To: apmail-subversion-commits-archive@subversion.apache.org Received: (qmail 85829 invoked by uid 500); 27 Feb 2012 20:32:16 -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 85821 invoked by uid 99); 27 Feb 2012 20:32:16 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 27 Feb 2012 20:32:16 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.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; Mon, 27 Feb 2012 20:32:13 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id A319323889BB; Mon, 27 Feb 2012 20:31:52 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1294315 - in /subversion/trunk/subversion: libsvn_wc/adm_ops.c tests/cmdline/basic_tests.py Date: Mon, 27 Feb 2012 20:31:52 -0000 To: commits@subversion.apache.org From: philip@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20120227203152.A319323889BB@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: philip Date: Mon Feb 27 20:31:52 2012 New Revision: 1294315 URL: http://svn.apache.org/viewvc?rev=1294315&view=rev Log: When deleting multiple targets don't use the conflict status of the last target to determine whether to remove conflict files for other targets. * subversion/libsvn_wc/adm_ops.c (svn_wc__delete_many): Reduce scope of variable. * subversion/tests/cmdline/basic_tests.py (verify_file_deleted): Qualify name. (delete_conflicts_one_of_many): New test. (test_list): Add new test. Modified: subversion/trunk/subversion/libsvn_wc/adm_ops.c subversion/trunk/subversion/tests/cmdline/basic_tests.py Modified: subversion/trunk/subversion/libsvn_wc/adm_ops.c URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/adm_ops.c?rev=1294315&r1=1294314&r2=1294315&view=diff ============================================================================== --- subversion/trunk/subversion/libsvn_wc/adm_ops.c (original) +++ subversion/trunk/subversion/libsvn_wc/adm_ops.c Mon Feb 27 20:31:52 2012 @@ -610,7 +610,6 @@ svn_wc__delete_many(svn_wc_context_t *wc svn_error_t *err; svn_wc__db_status_t status; svn_kind_t kind; - svn_boolean_t conflicted = FALSE; const apr_array_header_t *conflicts = NULL; apr_array_header_t *versioned_targets; const char *local_abspath; @@ -622,6 +621,8 @@ svn_wc__delete_many(svn_wc_context_t *wc sizeof(const char *)); for (i = 0; i < targets->nelts; i++) { + svn_boolean_t conflicted = FALSE; + svn_pool_clear(iterpool); local_abspath = APR_ARRAY_IDX(targets, i, const char *); @@ -699,7 +700,7 @@ svn_wc__delete_many(svn_wc_context_t *wc cancel_func, cancel_baton, notify_func, notify_baton, scratch_pool)); - if (!keep_local && conflicted && conflicts != NULL) + if (!keep_local && conflicts != NULL) { svn_pool_clear(iterpool); Modified: subversion/trunk/subversion/tests/cmdline/basic_tests.py URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/basic_tests.py?rev=1294315&r1=1294314&r2=1294315&view=diff ============================================================================== --- subversion/trunk/subversion/tests/cmdline/basic_tests.py (original) +++ subversion/trunk/subversion/tests/cmdline/basic_tests.py Mon Feb 27 20:31:52 2012 @@ -991,7 +991,7 @@ def verify_file_deleted(message, path): if message is not None: print(message) ###TODO We should raise a less generic error here. which? - raise Failure + raise svntest.Failure def verify_dir_deleted(path): if not os.path.isdir(path): @@ -2922,6 +2922,29 @@ def rm_missing_with_case_clashing_ondisk svntest.actions.run_and_verify_unquiet_status(wc_dir, expected_status) +def delete_conflicts_one_of_many(sbox): + """delete multiple targets one conflict""" + + sbox.build() + wc_dir = sbox.wc_dir + + svntest.main.file_append(sbox.ospath('A/D/G/rho'), 'new rho') + sbox.simple_commit() + svntest.main.file_append(sbox.ospath('A/D/G/rho'), 'conflict rho') + svntest.actions.run_and_verify_svn(None, None, [], + 'update', '-r1', '--accept', 'postpone', + wc_dir) + + if not os.path.exists(sbox.ospath('A/D/G/rho.mine')): + raise svntest.Failure("conflict file rho.mine missing") + + svntest.actions.run_and_verify_svn(None, None, [], + 'rm', '--force', + sbox.ospath('A/D/G/rho'), + sbox.ospath('A/D/G/tau')) + + verify_file_deleted("failed to remove conflict file", + sbox.ospath('A/D/G/rho.mine')) ######################################################################## # Run the tests @@ -2988,6 +3011,7 @@ test_list = [ None, add_multiple_targets, quiet_commits, rm_missing_with_case_clashing_ondisk_item, + delete_conflicts_one_of_many, ] if __name__ == '__main__':