Index: subversion/libsvn_wc/adm_ops.c =================================================================== --- subversion/libsvn_wc/adm_ops.c (revision 17196) +++ subversion/libsvn_wc/adm_ops.c (working copy) @@ -935,7 +935,17 @@ adm_access, prop_revert, prop_base, TRUE, pool)); } + if (was_schedule == svn_wc_schedule_add) + { + /* remove the properties file */ + const char *svn_thang; + /* Working prop file. */ + SVN_ERR (svn_wc__prop_path (&svn_thang, path, adm_access, FALSE, + pool)); + SVN_ERR (remove_file_if_present (svn_thang, pool)); + } + SVN_ERR (svn_wc__write_log (adm_access, 0, log_accum, pool)); SVN_ERR (svn_wc__run_log (adm_access, NULL, pool)); Index: subversion/tests/clients/cmdline/prop_tests.py =================================================================== --- subversion/tests/clients/cmdline/prop_tests.py (revision 17196) +++ subversion/tests/clients/cmdline/prop_tests.py (working copy) @@ -1104,7 +1104,45 @@ verify_output([ prop1 + ' : ' + propval1, prop2 + ' : ' + propval2, 'Properties on ' ], output, errput) +#---------------------------------------------------------------------- +def removal_schedule_added_props(sbox): + "removal of schedule added file with properties" + + sbox.build() + + wc_dir = sbox.wc_dir + newfile_path = os.path.join(wc_dir, 'newfile') + file_add_output = "A svn-test-work/working_copies/" + file_add_output = file_add_output + "prop_tests-16/newfile" + propset_output = "property 'newprop' set on 'svn-test-work/" + propset_output = propset_output + "working_copies/prop_tests-16/newfile" + file_rm_output = \ + "D svn-test-work/working_copies/prop_tests-16/newfile" + propls_output = [ + "Properties on 'svn-test-work/working_copies/prop_tests-16/newfile':\n", + " newprop : newvalue\n", + ] + # create new fs file + open(newfile_path, 'w').close() + # Add it and set a property + svntest.actions.run_and_verify_svn(None, file_add_output, [], 'add', newfile_path) + svntest.actions.run_and_verify_svn(None, propset_output, [], 'propset', + 'newprop', 'newvalue', newfile_path) + svntest.actions.run_and_verify_svn(None, propls_output, [], + 'proplist', '-v', newfile_path) + # remove the file + svntest.actions.run_and_verify_svn(None, file_rm_output, [], + 'rm', '--force', newfile_path) + # recreate the file and add it again + open(newfile_path, 'w').close() + svntest.actions.run_and_verify_svn(None, file_add_output, [], 'add', newfile_path) + + # Now there should be NO properties leftover... + svntest.actions.run_and_verify_svn(None, [], [], + 'proplist', '-v', newfile_path) + + ######################################################################## # Run the tests @@ -1129,6 +1167,7 @@ binary_props, recursive_base_wc_ops, url_props_ops, + removal_schedule_added_props, ] if __name__ == '__main__':