Author: stsp
Date: Tue Apr 10 16:06:19 2012
New Revision: 1311811
URL: http://svn.apache.org/viewvc?rev=1311811&view=rev
Log:
* subversion/libsvn_client/diff.c
(arbitrary_diff_walker): Remove useless and wrong special case code for
a file replacing a directory. This case is already handled further below,
while comparing dirents. Also, the file would need to be shown as added,
not deleted, so this special case code was producing wrong output.
Modified:
subversion/trunk/subversion/libsvn_client/diff.c
Modified: subversion/trunk/subversion/libsvn_client/diff.c
URL:
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/diff.c?rev=1311811&r1=1311810&r2=1311811&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/diff.c (original)
+++ subversion/trunk/subversion/libsvn_client/diff.c Tue Apr 10 16:06:19 2012
@@ -2055,21 +2055,6 @@ arbitrary_diff_walker(void *baton, const
local_abspath2 = svn_dirent_join(b->root2_abspath, child_relpath,
scratch_pool);
SVN_ERR(svn_io_check_resolved_path(local_abspath2, &kind2, scratch_pool));
- if (kind2 == svn_node_file)
- {
- /* Show file as deleted (being replaced by a directory). */
- SVN_ERR(do_arbitrary_files_diff(local_abspath2, b->empty_file_abspath,
- svn_dirent_skip_ancestor(
- b->root2_abspath,
- local_abspath2),
- FALSE, TRUE,
- b->callbacks, b->callback_baton,
- b->ctx, scratch_pool));
- dirents2 = apr_hash_make(scratch_pool);
- }
-
- if (kind2 == svn_node_none)
- dirents2 = apr_hash_make(scratch_pool);
if (kind2 == svn_node_dir)
{
@@ -2095,6 +2080,8 @@ arbitrary_diff_walker(void *baton, const
TRUE, /* only_check_type */
scratch_pool, scratch_pool));
}
+ else
+ dirents2 = apr_hash_make(scratch_pool);
/* Compare dirents1 to dirents2 and show added/deleted/changed files. */
merged_dirents = apr_hash_merge(scratch_pool, dirents1, dirents2,