You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by rh...@apache.org on 2013/02/14 22:19:21 UTC
svn commit: r1446331 - /subversion/trunk/subversion/libsvn_wc/diff_editor.c
Author: rhuijben
Date: Thu Feb 14 21:19:21 2013
New Revision: 1446331
URL: http://svn.apache.org/r1446331
Log:
Two minor cleanups in the diff editor code, which were made visible by the
next to commit patch.
* subversion/libsvn_wc/diff_editor.c
(walk_local_nodes_diff): Remove unneeded boolean which was just the same as
not the two other variables.
(wrap_file_changed): Don't provide files if they aren't modified.
Modified:
subversion/trunk/subversion/libsvn_wc/diff_editor.c
Modified: subversion/trunk/subversion/libsvn_wc/diff_editor.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/diff_editor.c?rev=1446331&r1=1446330&r2=1446331&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/diff_editor.c (original)
+++ subversion/trunk/subversion/libsvn_wc/diff_editor.c Thu Feb 14 21:19:21 2013
@@ -688,7 +688,6 @@ walk_local_nodes_diff(struct edit_baton_
const char *child_abspath;
const char *child_relpath;
svn_boolean_t repos_only;
- svn_boolean_t do_diff;
svn_boolean_t local_only;
svn_kind_t base_kind;
@@ -718,7 +717,6 @@ walk_local_nodes_diff(struct edit_baton_
repos_only = FALSE;
local_only = FALSE;
- do_diff = FALSE;
if (!info->have_base)
{
@@ -728,7 +726,6 @@ walk_local_nodes_diff(struct edit_baton_
{
/* Simple diff */
base_kind = info->kind;
- do_diff = TRUE;
}
else if (info->status == svn_wc__db_status_deleted
&& (!eb->diff_pristine || !info->have_more_work))
@@ -764,10 +761,6 @@ walk_local_nodes_diff(struct edit_baton_
repos_only = TRUE;
local_only = TRUE;
}
- else
- {
- do_diff = TRUE;
- }
}
if (eb->local_before_remote && local_only)
@@ -810,7 +803,7 @@ walk_local_nodes_diff(struct edit_baton_
eb->cancel_baton,
iterpool));
}
- else if (do_diff)
+ else if (!local_only) /* Not local only nor remote only */
{
/* Diff base against actual */
if (info->kind == svn_kind_file && diff_files)
@@ -2687,7 +2680,8 @@ wrap_file_changed(const char *relpath,
SVN_ERR(wb->callbacks->file_changed(&state, &prop_state, &tree_conflicted,
relpath,
- left_file, right_file,
+ file_modified ? left_file : NULL,
+ file_modified ? right_file : NULL,
left_source->revision,
right_source->revision,
left_props