Exemple #1
0
/* Helper function:  push the svn_wc_entry_t for WCPATH at
   RECEIVER/BATON, and possibly recurse over more entries. */
static svn_error_t *
crawl_entries(const char *wcpath,
              svn_info_receiver_t receiver,
              void *receiver_baton,
              svn_depth_t depth,
              apr_hash_t *changelist_hash,
              svn_client_ctx_t *ctx,
              apr_pool_t *pool)
{
    svn_wc_adm_access_t *adm_access;
    int adm_lock_level = SVN_WC__LEVELS_TO_LOCK_FROM_DEPTH(depth);
    struct found_entry_baton fe_baton;

    SVN_ERR(svn_wc_adm_probe_open3(&adm_access, NULL, wcpath, FALSE,
                                   adm_lock_level, ctx->cancel_func,
                                   ctx->cancel_baton, pool));

    fe_baton.changelist_hash = changelist_hash;
    fe_baton.receiver = receiver;
    fe_baton.receiver_baton = receiver_baton;
    fe_baton.adm_access = adm_access;
    return svn_wc_walk_entries3(wcpath, adm_access,
                                &entry_walk_callbacks, &fe_baton,
                                depth, FALSE, ctx->cancel_func,
                                ctx->cancel_baton, pool);
}
Exemple #2
0
/* Helper function:  push the svn_wc_entry_t for WCPATH at
   RECEIVER/BATON, and possibly recurse over more entries. */
static svn_error_t *
crawl_entries(const char *wcpath,
              svn_info_receiver_t receiver,
              void *receiver_baton,
              svn_depth_t depth,
              apr_hash_t *changelist_hash,
              svn_client_ctx_t *ctx,
              apr_pool_t *pool)
{
  svn_wc_adm_access_t *adm_access;
  const svn_wc_entry_t *entry;
  int adm_lock_level = SVN_WC__LEVELS_TO_LOCK_FROM_DEPTH(depth);

  SVN_ERR(svn_wc_adm_probe_open3(&adm_access, NULL, wcpath, FALSE, 
                                 adm_lock_level, ctx->cancel_func, 
                                 ctx->cancel_baton, pool));
  SVN_ERR(svn_wc__entry_versioned(&entry, wcpath, adm_access, FALSE, pool));


  if (entry->kind == svn_node_file)
    {
      if (SVN_WC__CL_MATCH(changelist_hash, entry))
        {
          svn_info_t *info;
          SVN_ERR(build_info_from_entry(&info, entry, pool));
          return receiver(receiver_baton, wcpath, info, pool);
        }
    }
  else if (entry->kind == svn_node_dir)
    {
      struct found_entry_baton fe_baton;
      fe_baton.changelist_hash = changelist_hash;
      fe_baton.receiver = receiver;
      fe_baton.receiver_baton = receiver_baton;
      SVN_ERR(svn_wc_walk_entries3(wcpath, adm_access,
                                   &entry_walk_callbacks, &fe_baton,
                                   depth, FALSE, ctx->cancel_func,
                                   ctx->cancel_baton, pool));
    }

  return SVN_NO_ERROR;
}