From commits-return-26189-apmail-subversion-commits-archive=subversion.apache.org@subversion.apache.org Thu Jan 17 13:42:23 2013 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 05DF2E2AD for ; Thu, 17 Jan 2013 13:42:23 +0000 (UTC) Received: (qmail 69381 invoked by uid 500); 17 Jan 2013 13:42:22 -0000 Delivered-To: apmail-subversion-commits-archive@subversion.apache.org Received: (qmail 69253 invoked by uid 500); 17 Jan 2013 13:42:22 -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 69222 invoked by uid 99); 17 Jan 2013 13:42:21 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 17 Jan 2013 13:42:21 +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; Thu, 17 Jan 2013 13:42:20 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 0413623889DA; Thu, 17 Jan 2013 13:42:01 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1434668 - /subversion/trunk/subversion/tests/cmdline/update_tests.py Date: Thu, 17 Jan 2013 13:42:00 -0000 To: commits@subversion.apache.org From: stsp@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20130117134201.0413623889DA@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: stsp Date: Thu Jan 17 13:42:00 2013 New Revision: 1434668 URL: http://svn.apache.org/viewvc?rev=1434668&view=rev Log: * subversion/tests/cmdline/update_tests.py (break_moved_replaced_dir, test_list): New XFAIL test for resolving a local dir move tree conflict with --accept=theirs-conflict, where the move source has been locally replaced. This is another interesting case but probably not a 1.8 blocker, though it would be very nice to have. Modified: subversion/trunk/subversion/tests/cmdline/update_tests.py Modified: subversion/trunk/subversion/tests/cmdline/update_tests.py URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/update_tests.py?rev=1434668&r1=1434667&r2=1434668&view=diff ============================================================================== --- subversion/trunk/subversion/tests/cmdline/update_tests.py (original) +++ subversion/trunk/subversion/tests/cmdline/update_tests.py Thu Jan 17 13:42:00 2013 @@ -6088,6 +6088,70 @@ def break_moved_dir_edited_leaf_del(sbox expected_status.tweak('A/B/E2', moved_from=None) svntest.actions.run_and_verify_status(wc_dir, expected_status) +@XFail() +@Issue(3144,3630) +def break_moved_replaced_dir(sbox): + "break local move of dir plus replace" + sbox.build() + wc_dir = sbox.wc_dir + + svntest.main.run_svn(False, 'rm', '-m', 'remove /A/B/E/alpha', + sbox.repo_url + "/A/B/E/alpha") + sbox.simple_move("A/B/E", "A/B/E2") + svntest.main.file_write(sbox.ospath('A/B/E2/alpha'), + "This is a changed 'alpha'.\n") + + # Locally replace A/B/E with something else + sbox.simple_copy('A/D/H', 'A/B/E') + + # Produce a tree conflict by updating the working copy to the + # revision which removed A/B/E/alpha. The deletion collides with + # the local move of A/B/E to A/B/E2. + expected_output = svntest.wc.State(wc_dir, { + 'A/B/E' : Item(status=' ', treeconflict='C'), + 'A/B/E/alpha' : Item(status=' ', treeconflict='D'), + }) + expected_disk = svntest.main.greek_state.copy() + expected_disk.remove('A/B/E/alpha', 'A/B/E/beta') + expected_disk.add({ + 'A/B/E/chi' : Item(contents="This is the file 'chi'.\n"), + 'A/B/E/psi' : Item(contents="This is the file 'psi'.\n"), + 'A/B/E/omega' : Item(contents="This is the file 'omega'.\n"), + 'A/B/E2' : Item(), + 'A/B/E2/alpha' : Item(contents="This is a changed 'alpha'.\n"), + 'A/B/E2/beta' : Item(contents="This is the file 'beta'.\n"), + }) + expected_status = svntest.actions.get_virginal_state(wc_dir, 2) + expected_status.add({ + 'A/B/E/chi' : Item(status=' ', copied='+', wc_rev='-'), + 'A/B/E/psi' : Item(status=' ', copied='+', wc_rev='-'), + 'A/B/E/omega' : Item(status=' ', copied='+', wc_rev='-'), + 'A/B/E2' : Item(status='A ', copied='+', wc_rev='-', + moved_from='A/B/E'), + 'A/B/E2/beta' : Item(status=' ', copied='+', wc_rev='-'), + 'A/B/E2/alpha' : Item(status='M ', copied='+', wc_rev='-'), + }) + expected_status.remove('A/B/E/alpha') + expected_status.tweak('A/B/E', status='R ', copied='+', wc_rev='-', + treeconflict='C', moved_to='A/B/E2') + expected_status.tweak('A/B/E/beta', status='D ') + svntest.actions.run_and_verify_update(wc_dir, + expected_output, + expected_disk, + expected_status, + None, None, None, + None, None, 1) + + # Now resolve the conflict, using --accept=theirs-conflict. + # This should break the move of A/B/E to A/B/E2, leaving A/B/E2 + # as a copy. A/B/E is not reverted since it has been replaced + # by a new A/B/E. + svntest.actions.run_and_verify_svn("resolve failed", None, [], + 'resolve', '--recursive', + '--accept=theirs-conflict', wc_dir) + expected_status.tweak('A/B/E2', moved_from=None) + svntest.actions.run_and_verify_status(wc_dir, expected_status) + ####################################################################### # Run the tests @@ -6165,6 +6229,7 @@ test_list = [ None, update_edit_delete_obstruction, update_deleted, break_moved_dir_edited_leaf_del, + break_moved_replaced_dir, ] if __name__ == '__main__':