static svn_error_t *
cb_file_changed(svn_wc_notify_state_t *contentstate,
                svn_wc_notify_state_t *propstate,
                svn_boolean_t *tree_conflicted,
                const char *path,
                const char *tmpfile1,
                const char *tmpfile2,
                svn_revnum_t rev1,
                svn_revnum_t rev2,
                const char *mimetype1,
                const char *mimetype2,
                const apr_array_header_t *propchanges,
                apr_hash_t *originalprops,
                void *diff_baton,
                apr_pool_t *scratch_pool)
{
  struct summarize_baton_t *b = diff_baton;
  svn_boolean_t text_change = (tmpfile2 != NULL);
  svn_boolean_t prop_change = props_changed(propchanges, scratch_pool);

  if (text_change || prop_change)
    SVN_ERR(send_summary(b, path,
                         text_change ? svn_client_diff_summarize_kind_modified
                                     : 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;
}
static svn_error_t *
cb_file_added(svn_wc_notify_state_t *contentstate,
              svn_wc_notify_state_t *propstate,
              svn_boolean_t *tree_conflicted,
              const char *path,
              const char *tmpfile1,
              const char *tmpfile2,
              svn_revnum_t rev1,
              svn_revnum_t rev2,
              const char *mimetype1,
              const char *mimetype2,
              const char *copyfrom_path,
              svn_revnum_t copyfrom_revision,
              const apr_array_header_t *propchanges,
              apr_hash_t *originalprops,
              void *diff_baton,
              apr_pool_t *scratch_pool)
{
  struct summarize_baton_t *b = diff_baton;

  SVN_ERR(send_summary(b, path, svn_client_diff_summarize_kind_added,
                       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;
}
static svn_error_t *
cb_dir_closed(svn_wc_notify_state_t *contentstate,
              svn_wc_notify_state_t *propstate,
              svn_boolean_t *tree_conflicted,
              const char *path,
              svn_boolean_t dir_was_added,
              void *diff_baton,
              apr_pool_t *scratch_pool)
{
  struct summarize_baton_t *b = diff_baton;
  svn_boolean_t prop_change;

  prop_change = apr_hash_get(b->prop_changes, path, APR_HASH_KEY_STRING) != NULL;
  if (dir_was_added || prop_change)
    SVN_ERR(send_summary(b, path,
                         dir_was_added ? svn_client_diff_summarize_kind_added
                                       : 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;
}
Esempio n. 4
0
/* svn_diff_tree_processor_t callback */
static svn_error_t *
diff_dir_deleted(const char *relpath,
                 const svn_diff_source_t *left_source,
                 /*const*/ apr_hash_t *left_props,
                 void *dir_baton,
                 const struct svn_diff_tree_processor_t *processor,
                 apr_pool_t *scratch_pool)
{
  struct summarize_baton_t *b = processor->baton;

  SVN_ERR(send_summary(b, relpath, svn_client_diff_summarize_kind_deleted,
                       FALSE, svn_node_dir, scratch_pool));

  return SVN_NO_ERROR;
}
Esempio n. 5
0
/* svn_diff_tree_processor_t callback */
static svn_error_t *
diff_dir_changed(const char *relpath,
                 const svn_diff_source_t *left_source,
                 const svn_diff_source_t *right_source,
                 /*const*/ apr_hash_t *left_props,
                 /*const*/ apr_hash_t *right_props,
                 const apr_array_header_t *prop_changes,
                 void *dir_baton,
                 const struct svn_diff_tree_processor_t *processor,
                 apr_pool_t *scratch_pool)
{
  struct summarize_baton_t *b = processor->baton;

  SVN_ERR(send_summary(b, relpath, svn_client_diff_summarize_kind_normal,
                       TRUE, svn_node_dir, scratch_pool));

  return SVN_NO_ERROR;
}
static svn_error_t *
cb_dir_deleted(svn_wc_notify_state_t *state,
               svn_boolean_t *tree_conflicted,
               const char *path,
               void *diff_baton,
               apr_pool_t *scratch_pool)
{
  struct summarize_baton_t *b = diff_baton;

  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;
}
Esempio n. 7
0
/* svn_diff_tree_processor_t callback */
static svn_error_t *
diff_dir_added(const char *relpath,
               const svn_diff_source_t *copyfrom_source,
               const svn_diff_source_t *right_source,
               /*const*/ apr_hash_t *copyfrom_props,
               /*const*/ apr_hash_t *right_props,
               void *dir_baton,
               const struct svn_diff_tree_processor_t *processor,
               apr_pool_t *scratch_pool)
{
  struct summarize_baton_t *b = processor->baton;

  /* ### Send from dir_opened without prop info? */
  SVN_ERR(send_summary(b, relpath, svn_client_diff_summarize_kind_added,
                       props_changed_hash(right_props, scratch_pool),
                       svn_node_dir, scratch_pool));

  return SVN_NO_ERROR;
}
Esempio n. 8
0
/* svn_diff_tree_processor_t callback */
static svn_error_t *
diff_file_changed(const char *relpath,
                  const svn_diff_source_t *left_source,
                  const svn_diff_source_t *right_source,
                  const char *left_file,
                  const char *right_file,
                  /*const*/ apr_hash_t *left_props,
                  /*const*/ apr_hash_t *right_props,
                  svn_boolean_t file_modified,
                  const apr_array_header_t *prop_changes,
                  void *file_baton,
                  const struct svn_diff_tree_processor_t *processor,
                  apr_pool_t *scratch_pool)
{
  struct summarize_baton_t *b = processor->baton;

  SVN_ERR(send_summary(b, relpath,
                       file_modified ? svn_client_diff_summarize_kind_modified
                                     : svn_client_diff_summarize_kind_normal,
                       props_changed(prop_changes, scratch_pool),
                       svn_node_file, scratch_pool));

  return SVN_NO_ERROR;
}