subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rhuij...@apache.org
Subject svn commit: r1433599 - in /subversion/trunk/subversion/libsvn_client: diff.c diff_summarize.c
Date Tue, 15 Jan 2013 19:39:38 GMT
Author: rhuijben
Date: Tue Jan 15 19:39:37 2013
New Revision: 1433599

URL: http://svn.apache.org/viewvc?rev=1433599&view=rev
Log:
Remove unneeded state output argument processing from the diff output code.
The caller produces a valid initial state, which shouldn't be overwritten
for no use.

* subversion/libsvn_client/diff.c
  (diff_props_changed): Remove unneeded arguments. Remove setting of state.
  (diff_dir_props_changed): Update caller.
  (diff_file_changed,
   diff_file_added): Update caller. Remove setting of state.
  (diff_file_deleted): Remove setting of state.

* subversion/libsvn_client/diff_summarize.c
  (cb_dir_deleted,
   cb_file_deleted,
   cb_dir_added,
   cb_dir_opened,
   cb_dir_closed,
   cb_file_added,
   cb_file_opened,
   cb_file_changed,
   cb_dir_props_changed): Remove unneeded code.

Modified:
    subversion/trunk/subversion/libsvn_client/diff.c
    subversion/trunk/subversion/libsvn_client/diff_summarize.c

Modified: subversion/trunk/subversion/libsvn_client/diff.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/diff.c?rev=1433599&r1=1433598&r2=1433599&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/diff.c (original)
+++ subversion/trunk/subversion/libsvn_client/diff.c Tue Jan 15 19:39:37 2013
@@ -606,9 +606,7 @@ struct diff_cmd_baton {
 /* An helper for diff_dir_props_changed, diff_file_changed and diff_file_added
  */
 static svn_error_t *
-diff_props_changed(svn_wc_notify_state_t *state,
-                   svn_boolean_t *tree_conflicted,
-                   const char *diff_relpath,
+diff_props_changed(const char *diff_relpath,
                    svn_revnum_t rev1,
                    svn_revnum_t rev2,
                    svn_boolean_t dir_was_added,
@@ -649,11 +647,6 @@ diff_props_changed(svn_wc_notify_state_t
                                  scratch_pool));
     }
 
-  if (state)
-    *state = svn_wc_notify_state_unknown;
-  if (tree_conflicted)
-    *tree_conflicted = FALSE;
-
   return SVN_NO_ERROR;
 }
 
@@ -670,9 +663,7 @@ diff_dir_props_changed(svn_wc_notify_sta
 {
   struct diff_cmd_baton *diff_cmd_baton = diff_baton;
 
-  return svn_error_trace(diff_props_changed(state,
-                                            tree_conflicted,
-                                            diff_relpath,
+  return svn_error_trace(diff_props_changed(diff_relpath,
                                             /* ### These revs be filled
                                              * ### with per node info */
                                             diff_cmd_baton->revnum1,
@@ -957,16 +948,9 @@ diff_file_changed(svn_wc_notify_state_t 
                                  SVN_INVALID_REVNUM, diff_cmd_baton,
                                  scratch_pool));
   if (prop_changes->nelts > 0)
-    SVN_ERR(diff_props_changed(prop_state, tree_conflicted,
-                               diff_relpath, rev1, rev2, FALSE, prop_changes,
+    SVN_ERR(diff_props_changed(diff_relpath, rev1, rev2, FALSE, prop_changes,
                                original_props, !wrote_header,
                                diff_cmd_baton, scratch_pool));
-  if (content_state)
-    *content_state = svn_wc_notify_state_unknown;
-  if (prop_state)
-    *prop_state = svn_wc_notify_state_unknown;
-  if (tree_conflicted)
-    *tree_conflicted = FALSE;
   return SVN_NO_ERROR;
 }
 
@@ -1028,17 +1012,10 @@ diff_file_added(svn_wc_notify_state_t *c
                                  diff_cmd_baton, scratch_pool));
 
   if (prop_changes->nelts > 0)
-    SVN_ERR(diff_props_changed(prop_state, tree_conflicted,
-                               diff_relpath, rev1, rev2,
+    SVN_ERR(diff_props_changed(diff_relpath, rev1, rev2,
                                FALSE, prop_changes,
                                original_props, ! wrote_header,
                                diff_cmd_baton, scratch_pool));
-  if (content_state)
-    *content_state = svn_wc_notify_state_unknown;
-  if (prop_state)
-    *prop_state = svn_wc_notify_state_unknown;
-  if (tree_conflicted)
-    *tree_conflicted = FALSE;
 
   return SVN_NO_ERROR;
 }
@@ -1091,11 +1068,6 @@ diff_file_deleted(svn_wc_notify_state_t 
 
   /* We don't list all the deleted properties. */
 
-  if (state)
-    *state = svn_wc_notify_state_unknown;
-  if (tree_conflicted)
-    *tree_conflicted = FALSE;
-
   return SVN_NO_ERROR;
 }
 

Modified: subversion/trunk/subversion/libsvn_client/diff_summarize.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/diff_summarize.c?rev=1433599&r1=1433598&r2=1433599&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/diff_summarize.c (original)
+++ subversion/trunk/subversion/libsvn_client/diff_summarize.c Tue Jan 15 19:39:37 2013
@@ -118,10 +118,6 @@ cb_dir_deleted(svn_wc_notify_state_t *st
   SVN_ERR(send_summary(b, path, svn_client_diff_summarize_kind_deleted,
                        FALSE, svn_node_dir, scratch_pool));
 
-  if (state)
-    *state = svn_wc_notify_state_inapplicable;
-  if (tree_conflicted)
-    *tree_conflicted = FALSE;
   return SVN_NO_ERROR;
 }
 
@@ -142,10 +138,6 @@ cb_file_deleted(svn_wc_notify_state_t *s
   SVN_ERR(send_summary(b, path, svn_client_diff_summarize_kind_deleted,
                        FALSE, svn_node_file, scratch_pool));
 
-  if (state)
-    *state = svn_wc_notify_state_inapplicable;
-  if (tree_conflicted)
-    *tree_conflicted = FALSE;
   return SVN_NO_ERROR;
 }
 
@@ -161,12 +153,6 @@ cb_dir_added(svn_wc_notify_state_t *stat
              void *diff_baton,
              apr_pool_t *scratch_pool)
 {
-  if (tree_conflicted)
-    *tree_conflicted = FALSE;
-  if (skip)
-    *skip = FALSE;
-  if (skip_children)
-    *skip_children = FALSE;
   return SVN_NO_ERROR;
 }
 
@@ -179,12 +165,6 @@ cb_dir_opened(svn_boolean_t *tree_confli
               void *diff_baton,
               apr_pool_t *scratch_pool)
 {
-  if (tree_conflicted)
-    *tree_conflicted = FALSE;
-  if (skip)
-    *skip = FALSE;
-  if (skip_children)
-    *skip_children = FALSE;
   return SVN_NO_ERROR;
 }
 
@@ -207,12 +187,6 @@ cb_dir_closed(svn_wc_notify_state_t *con
                                        : svn_client_diff_summarize_kind_normal,
                          prop_change, svn_node_dir, scratch_pool));
 
-  if (contentstate)
-    *contentstate = svn_wc_notify_state_inapplicable;
-  if (propstate)
-    *propstate = svn_wc_notify_state_inapplicable;
-  if (tree_conflicted)
-    *tree_conflicted = FALSE;
   return SVN_NO_ERROR;
 }
 
@@ -240,12 +214,6 @@ cb_file_added(svn_wc_notify_state_t *con
                        props_changed(propchanges, scratch_pool),
                        svn_node_file, scratch_pool));
 
-  if (contentstate)
-    *contentstate = svn_wc_notify_state_inapplicable;
-  if (propstate)
-    *propstate = svn_wc_notify_state_inapplicable;
-  if (tree_conflicted)
-    *tree_conflicted = FALSE;
   return SVN_NO_ERROR;
 }
 
@@ -257,10 +225,6 @@ cb_file_opened(svn_boolean_t *tree_confl
                void *diff_baton,
                apr_pool_t *scratch_pool)
 {
-  if (tree_conflicted)
-    *tree_conflicted = FALSE;
-  if (skip)
-    *skip = FALSE;
   return SVN_NO_ERROR;
 }
 
@@ -290,12 +254,6 @@ cb_file_changed(svn_wc_notify_state_t *c
                                      : svn_client_diff_summarize_kind_normal,
                          prop_change, svn_node_file, scratch_pool));
 
-  if (contentstate)
-    *contentstate = svn_wc_notify_state_inapplicable;
-  if (propstate)
-    *propstate = svn_wc_notify_state_inapplicable;
-  if (tree_conflicted)
-    *tree_conflicted = FALSE;
   return SVN_NO_ERROR;
 }
 
@@ -314,10 +272,6 @@ cb_dir_props_changed(svn_wc_notify_state
   if (props_changed(propchanges, scratch_pool))
     apr_hash_set(b->prop_changes, path, APR_HASH_KEY_STRING, path);
 
-  if (propstate)
-    *propstate = svn_wc_notify_state_inapplicable;
-  if (tree_conflicted)
-    *tree_conflicted = FALSE;
   return SVN_NO_ERROR;
 }
 



Mime
View raw message