Author: rhuijben
Date: Wed Mar 11 13:48:48 2015
New Revision: 1665874
URL: http://svn.apache.org/r1665874
Log:
Add regression test for problem fixed by r1660220.
Found by: stsp
* subversion/tests/cmdline/move_tests.py
(move_conflict_markers): New function.
(test_list): Add move_conflict_markers.
Modified:
subversion/trunk/subversion/tests/cmdline/move_tests.py
Modified: subversion/trunk/subversion/tests/cmdline/move_tests.py
URL:
http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/move_tests.py?rev=1665874&r1=1665873&r2=1665874&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/move_tests.py (original)
+++ subversion/trunk/subversion/tests/cmdline/move_tests.py Wed Mar 11 13:48:48
2015
@@ -1694,6 +1694,75 @@ def move_conflict_details(sbox):
svntest.actions.run_and_verify_info(expected_info, sbox.ospath('B'),
'--depth', 'infinity')
+def move_conflict_markers(sbox):
+ "move conflict markers"
+
+ sbox.build()
+ wc_dir = sbox.wc_dir
+ sbox.simple_propset('key','val', 'iota', 'A/B/E', 'A/B/E/beta')
+ sbox.simple_commit()
+ sbox.simple_update('', 1)
+ sbox.simple_propset('key','false', 'iota', 'A/B/E', 'A/B/E/beta')
+
+ expected_output = svntest.wc.State(wc_dir, {
+ 'A/B/E' : Item(status=' C'),
+ 'A/B/E/beta' : Item(status=' C'),
+ 'iota' : Item(status=' C'),
+ })
+ expected_status = svntest.actions.get_virginal_state(wc_dir, 2)
+ expected_status.tweak('iota', 'A/B/E', 'A/B/E/beta', status=' C')
+ expected_disk = svntest.main.greek_state.copy()
+ expected_disk.add({
+ 'A/B/E/dir_conflicts.prej' : Item(contents=
+ "Trying to add new property 'key'\n"
+ "but the property already exists.\n"
+ "<<<<<<< (local property value)\n"
+ "false||||||| (incoming 'changed from'
value)\n"
+ "=======\n"
+ "val>>>>>>> (incoming 'changed to'
value)\n"),
+ 'A/B/E/beta.prej' : Item(contents=
+ "Trying to add new property 'key'\n"
+ "but the property already exists.\n"
+ "<<<<<<< (local property value)\n"
+ "false||||||| (incoming 'changed from'
value)\n"
+ "=======\n"
+ "val>>>>>>> (incoming 'changed to'
value)\n"),
+ 'iota.prej' : Item(contents=
+ "Trying to add new property 'key'\n"
+ "but the property already exists.\n"
+ "<<<<<<< (local property value)\n"
+ "false||||||| (incoming 'changed from'
value)\n"
+ "=======\n"
+ "val>>>>>>> (incoming 'changed to'
value)\n"),
+ })
+ svntest.actions.run_and_verify_update(wc_dir,
+ expected_output,
+ expected_disk,
+ expected_status)
+
+ sbox.simple_move('iota', 'A/iotb')
+ sbox.simple_move('A/B/E', 'E')
+
+ expected_status.tweak('iota', status='D ', moved_to='A/iotb')
+ expected_status.tweak('A/B/E', status='D ', moved_to='E')
+ expected_status.tweak('A/B/E/alpha', 'A/B/E/beta', status='D ')
+ expected_status.add({
+ 'A/iotb' : Item(status='A ', copied='+', moved_from='iota', wc_rev='-'),
+ 'E' : Item(status='A ', copied='+', moved_from='A/B/E', wc_rev='-'),
+ 'E/beta' : Item(status=' M', copied='+', wc_rev='-'),
+ 'E/alpha' : Item(status=' ', copied='+', wc_rev='-'),
+ })
+ expected_disk.remove('iota', 'iota.prej',
+ 'A/B/E', 'A/B/E/alpha', 'A/B/E/beta',
+ 'A/B/E/dir_conflicts.prej',
+ 'A/B/E/beta.prej')
+ expected_disk.add({
+ 'A/iotb' : Item(contents="This is the file 'iota'.\n"),
+ 'E/beta' : Item(contents="This is the file 'beta'.\n"),
+ 'E/alpha' : Item(contents="This is the file 'alpha'.\n"),
+ })
+ svntest.actions.run_and_verify_status(wc_dir, expected_status)
+ svntest.actions.verify_disk(wc_dir, expected_disk)
#######################################################################
# Run the tests
@@ -1714,6 +1783,7 @@ test_list = [ None,
move_to_from_external,
revert_del_root_of_move,
move_conflict_details,
+ move_conflict_markers,
]
if __name__ == '__main__':