Author: stsp
Date: Mon Nov 13 22:59:29 2017
New Revision: 1815149
URL: http://svn.apache.org/viewvc?rev=1815149&view=rev
Log:
On the addremove branch, add another regression test.
This test verifies that ambiguous moves are supported with directories.
* subversion/tests/cmdline/addremove_tests.py
(addremove_ambiguous_move_dir, test_list): New test.
Modified:
subversion/branches/addremove/subversion/tests/cmdline/addremove_tests.py
Modified:
subversion/branches/addremove/subversion/tests/cmdline/addremove_tests.py
URL:
http://svn.apache.org/viewvc/subversion/branches/addremove/subversion/tests/cmdline/addremove_tests.py?rev=1815149&r1=1815148&r2=1815149&view=diff
==============================================================================
--- subversion/branches/addremove/subversion/tests/cmdline/addremove_tests.py
(original)
+++ subversion/branches/addremove/subversion/tests/cmdline/addremove_tests.py
Mon Nov 13 22:59:29 2017
@@ -169,6 +169,35 @@ def addremove_unversioned_move_dir(sbox)
})
svntest.actions.run_and_verify_status(wc_dir, expected_status)
+def addremove_ambiguous_move_dir(sbox):
+ "addremove handles ambiguous dir moves"
+
+ sbox.build()
+ wc_dir = sbox.wc_dir
+
+ # Manually move a versioned directory
+ old_path = sbox.ospath('A/B/E')
+ new_path = sbox.ospath('A/B/E-moved')
+ new2_path = sbox.ospath('A/C/E-moved')
+ shutil.copytree(old_path, new_path)
+ shutil.move(old_path, new2_path)
+
+ svntest.actions.run_and_verify_svn(None, [], 'addremove', wc_dir)
+
+ expected_status = svntest.actions.get_virginal_state(wc_dir, 1)
+ expected_status.tweak('A/B/E', status='D ')
+ expected_status.tweak('A/B/E/alpha', status='D ')
+ expected_status.tweak('A/B/E/beta', status='D ')
+ expected_status.add({
+ 'A/B/E-moved' : Item(status='A ', wc_rev='-', copied='+'),
+ 'A/B/E-moved/alpha' : Item(status='A ', wc_rev='-'),
+ 'A/B/E-moved/beta' : Item(status='A ', wc_rev='-'),
+ 'A/C/E-moved' : Item(status='A ', wc_rev='-', copied='+'),
+ 'A/C/E-moved/alpha' : Item(status='A ', wc_rev='-'),
+ 'A/C/E-moved/beta' : Item(status='A ', wc_rev='-'),
+ })
+ svntest.actions.run_and_verify_status(wc_dir, expected_status)
+
########################################################################
# Run the tests
@@ -179,6 +208,7 @@ test_list = [ None,
addremove_unversioned_move_file,
addremove_ambiguous_move_file,
addremove_unversioned_move_dir,
+ addremove_ambiguous_move_dir,
]
if __name__ == '__main__':