Index: subversion/libsvn_wc/diff.c =================================================================== --- subversion/libsvn_wc/diff.c (revision 17218) +++ subversion/libsvn_wc/diff.c (working copy) @@ -841,8 +841,6 @@ delete_entry (const char *path, the empty file against the current working copy. If 'reverse_order' is set, then show a deletion. */ - if (entry->schedule == svn_wc_schedule_delete) - SVN_ERR (get_empty_file (pb->edit_baton, &full_path)); SVN_ERR (get_local_mimetypes (&pristine_mimetype, &working_mimetype, NULL, adm_access, full_path, pool)); @@ -852,6 +850,8 @@ delete_entry (const char *path, const char *textbase = svn_wc__text_base_path (full_path, FALSE, pool); + if (entry->schedule == svn_wc_schedule_delete) + SVN_ERR (get_empty_file (pb->edit_baton, &textbase)); SVN_ERR (svn_wc_get_prop_diffs (NULL, &baseprops, full_path, adm_access, pool)); SVN_ERR (pb->edit_baton->callbacks->file_deleted @@ -865,12 +865,15 @@ delete_entry (const char *path, } else { + const char *secondpath = full_path; + if (entry->schedule == svn_wc_schedule_delete) + secondpath = empty_file; /* Or normally, show the working file being added. */ /* ### Show the properties as well. */ SVN_ERR (pb->edit_baton->callbacks->file_added (NULL, NULL, NULL, full_path, empty_file, - full_path, + secondpath, 0, entry->revision, NULL, working_mimetype, Index: subversion/tests/clients/cmdline/diff_tests.py =================================================================== --- subversion/tests/clients/cmdline/diff_tests.py (revision 17231) +++ subversion/tests/clients/cmdline/diff_tests.py (working copy) @@ -1956,6 +1956,31 @@ def diff_property_changes_to_base(sbox): finally: os.chdir(current_dir) +def diff_schedule_delete(sbox): + "scheduled deleted" + + sbox.build() + wc_dir = sbox.wc_dir + current_dir = os.getcwd() + os.chdir(wc_dir) + + try: + diff_output, err_output = svntest.main.run_svn(None, 'ci', '-m', 'log msg') + if err_output: raise svntest.Failure + svntest.main.file_append('foo', "xxx") + svntest.main.run_svn(None, 'add', 'foo') + diff_output, err_output = svntest.main.run_svn(None, 'ci', '-m', 'log msg') + if err_output: raise svntest.Failure + svntest.main.run_svn(None, 'rm', 'foo') + expected_output = [ + "Index: foo\n", + "===================================================================\n" + ] + diff_output, err = svntest.actions.run_and_verify_svn(None, expected_output, [], + 'diff', '-r', '1' ) + if err: raise svntest.Failure + finally: + os.chdir(current_dir) ######################################################################## #Run the tests @@ -1989,6 +2014,7 @@ test_list = [ None, diff_prop_on_named_dir, diff_keywords, diff_force, + diff_schedule_delete, XFail(diff_renamed_dir), XFail(diff_property_changes_to_base), ]