Index: subversion/tests/clients/cmdline/lock_tests.py =================================================================== --- subversion/tests/clients/cmdline/lock_tests.py (revision 16197) +++ subversion/tests/clients/cmdline/lock_tests.py (working copy) @@ -938,6 +938,48 @@ svntest.actions.run_and_verify_status(wc_dir, expected_status) #---------------------------------------------------------------------- +def unlock_already_unlocked_files(sbox): + "lock/unlock set of files, one already unlocked" + + sbox.build() + wc_dir = sbox.wc_dir + + # Deliberately have no direct child of A as a target + iota_path = os.path.join(sbox.wc_dir, 'iota') + lambda_path = os.path.join(sbox.wc_dir, 'A', 'B', 'lambda') + alpha_path = os.path.join(sbox.wc_dir, 'A', 'B', 'E', 'alpha') + + svntest.actions.run_and_verify_svn(None, None, [], 'lock', + '--username', svntest.main.wc_author2, + '--password', svntest.main.wc_passwd, + '--no-auth-cache', + '-m', 'lock several', + iota_path, lambda_path, alpha_path) + + expected_status = svntest.actions.get_virginal_state(wc_dir, 1) + expected_status.tweak('iota', 'A/B/lambda', 'A/B/E/alpha', writelocked='K') + svntest.actions.run_and_verify_status(wc_dir, expected_status) + + svntest.actions.run_and_verify_svn(None, None, [], 'unlock', + '--username', svntest.main.wc_author2, + '--password', svntest.main.wc_passwd, + '--no-auth-cache', + lambda_path) + + expected_status.tweak('A/B/lambda', writelocked=None) + svntest.actions.run_and_verify_status(wc_dir, expected_status) + + svntest.actions.run_and_verify_svn(None, None, [], 'unlock', + '--username', svntest.main.wc_author2, + '--password', svntest.main.wc_passwd, + '--no-auth-cache', + '--force', + iota_path, lambda_path, alpha_path) + + expected_status.tweak('iota', 'A/B/lambda', 'A/B/E/alpha', writelocked=None) + svntest.actions.run_and_verify_status(wc_dir, expected_status) + +#---------------------------------------------------------------------- def lock_switched_files(sbox): "lock/unlock switched files" @@ -1258,6 +1300,7 @@ Skip(lock_and_exebit1, (os.name != 'posix')), Skip(lock_and_exebit2, (os.name != 'posix')), commit_xml_unsafe_file_unlock, + unlock_already_unlocked_files, ] if __name__ == '__main__':