You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by ko...@apache.org on 2015/05/13 18:54:31 UTC
svn commit: r1679240 -
/subversion/trunk/subversion/tests/cmdline/svnmucc_tests.py
Author: kotkov
Date: Wed May 13 16:54:30 2015
New Revision: 1679240
URL: http://svn.apache.org/r1679240
Log:
Following up on r1658406, rework the recently added svnmucc tests.
There is a behavior change in how svnmucc processes actions, and this change
happened between 1.8.13 and 1.9.0-rc1. Some action sequences with deletes
and moves that used to work in 1.8.13 will trigger an error in 1.9.0-rc1 and
later versions. Based on the discussion in <de...@subversion.apache.org>, they
probably indicate a mistake and could lead to unexpected results for the end
user. We now prohibit them and accept the possible incompatibility outcomes.
I turned the corresponding XFail() tests into a single passing test that
specifies the current behavior, i.e., svnmucc returning errors. Related
discussion can be found in http://svn.haxx.se/dev/archive-2015-05/0038.shtml
(Subject: "Re: Issue 4579 / svnmucc fails to process certain deletes").
* subversion/tests/cmdline/svnmucc_tests.py:
(modify_and_delete_file, propset_and_delete_file, delete_and_delete_file):
Remove. Take all the interesting command sequences and consolidate them
in ...
(prohibited_deletes_and_moves): ...this new test. Populate it with a
couple of move action sequences that we currently disallow.
(test_list): Track the test changes.
Modified:
subversion/trunk/subversion/tests/cmdline/svnmucc_tests.py
Modified: subversion/trunk/subversion/tests/cmdline/svnmucc_tests.py
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/svnmucc_tests.py?rev=1679240&r1=1679239&r2=1679240&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/svnmucc_tests.py (original)
+++ subversion/trunk/subversion/tests/cmdline/svnmucc_tests.py Wed May 13 16:54:30 2015
@@ -453,47 +453,54 @@ rm A/B/C/Y
'log', '-qvr3', repo_url)
-@XFail()
-@Issue(4579)
-def modify_and_delete_file(sbox):
- "modify and delete file"
+def prohibited_deletes_and_moves(sbox):
+ "test prohibited delete and move operations"
+
+ # These action sequences were allowed in 1.8.13, but are prohibited in 1.9.x
+ # and later. Most of them probably indicate an inadvertent user mistake.
+ # See dev@, 2015-05-11, "Re: Issue 4579 / svnmucc fails to process certain
+ # deletes", <http://svn.haxx.se/dev/archive-2015-05/0038.shtml>
- # This used to fail with:
- # svnmucc: E200009: Can't delete node at 'iota'
sbox.build()
- svntest.main.file_write(sbox.ospath('file'), "New iota")
- test_svnmucc(sbox.repo_url, ['D /iota'],
- '-m', 'r2: modify and delete /iota',
- 'put', sbox.ospath('file'), '/iota',
- 'rm', '/iota')
-
-
-@XFail()
-@Issue(4579)
-def propset_and_delete_file(sbox):
- "propset and delete file"
-
- # This used to fail with:
- # svnmucc: E200009: Can't delete node at 'iota'
- sbox.build(create_wc=False)
- test_svnmucc(sbox.repo_url, ['D /iota'],
- '-m', 'r2: propset and delete /iota',
- 'propset', 'prop', 'val', '/iota',
- 'rm', '/iota')
-
-
-@XFail()
-@Issue(4579)
-def delete_and_delete_file(sbox):
- "delete and delete file"
-
- # This used to fail with:
- # svnmucc: E160013: Can't delete node at 'iota' as it does not exist
- sbox.build(create_wc=False)
- test_svnmucc(sbox.repo_url, ['D /iota'],
- '-m', 'r2: delete and delete /iota',
- 'rm', '/iota',
- 'rm', '/iota')
+ svntest.main.file_write(sbox.ospath('file'), "New contents")
+
+ xtest_svnmucc(sbox.repo_url,
+ ["svnmucc: E200009: Can't delete node at 'iota'",
+ ], #---------
+ '-m', 'r2: modify and delete /iota',
+ 'put', sbox.ospath('file'), 'iota',
+ 'rm', 'iota')
+
+ xtest_svnmucc(sbox.repo_url,
+ ["svnmucc: E200009: Can't delete node at 'iota'",
+ ], #---------
+ '-m', 'r2: propset and delete /iota',
+ 'propset', 'prop', 'val', 'iota',
+ 'rm', 'iota')
+
+ xtest_svnmucc(sbox.repo_url,
+ ["svnmucc: E160013: Can't delete node at 'iota' as it does "
+ "not exist",
+ ], #---------
+ '-m', 'r2: delete and delete /iota',
+ 'rm', 'iota',
+ 'rm', 'iota')
+
+ # Subversion 1.8.13 used to move /iota without applying the text change.
+ xtest_svnmucc(sbox.repo_url,
+ ["svnmucc: E200009: Can't delete node at 'iota'",
+ ], #---------
+ '-m', 'r2: modify and move /iota',
+ 'put', sbox.ospath('file'), 'iota',
+ 'mv', 'iota', 'iota2')
+
+ # Subversion 1.8.13 used to move /A without applying the inner remove.
+ xtest_svnmucc(sbox.repo_url,
+ ["svnmucc: E200009: Can't delete node at 'A'",
+ ], #---------
+ '-m', 'r2: delete /A/B and move /A',
+ 'rm', 'A/B',
+ 'mv', 'A', 'A1')
######################################################################
@@ -505,9 +512,7 @@ test_list = [ None,
too_many_log_messages,
no_log_msg_non_interactive,
nested_replaces,
- modify_and_delete_file,
- propset_and_delete_file,
- delete_and_delete_file,
+ prohibited_deletes_and_moves,
]
if __name__ == '__main__':