Example #1
0
svn_error_t *
svn_delta_path_driver(const svn_delta_editor_t *editor,
                      void *edit_baton,
                      svn_revnum_t revision,
                      const apr_array_header_t *paths,
                      svn_delta_path_driver_cb_func_t callback_func,
                      void *callback_baton,
                      apr_pool_t *scratch_pool)
{
    apr_array_header_t *sorted;

    /* REVISION is dropped on the floor.  */

    /* Construct a copy of PATHS, then sort them in a depth-first order.  */
    sorted = apr_array_copy(scratch_pool, paths);
    qsort(sorted->elts, sorted->nelts, sorted->elt_size, svn_sort_compare_paths);

    return svn_error_trace(svn_delta_path_driver2(editor, edit_baton, sorted,
                           callback_func, callback_baton,
                           scratch_pool));
}
Example #2
0
    SVN_ERR(svn_client__ensure_revprop_table(&commit_revprops, revprop_table,
            log_msg, ctx, pool));

    /* Fetch RA commit editor */
    SVN_ERR(svn_ra__register_editor_shim_callbacks(ra_session,
            svn_client__get_shim_callbacks(ctx->wc_ctx,
                                           NULL, pool)));
    SVN_ERR(svn_ra_get_commit_editor3(ra_session, &editor, &edit_baton,
                                      commit_revprops,
                                      commit_callback,
                                      commit_baton,
                                      NULL, TRUE, /* No lock tokens */
                                      pool));

    /* Call the path-based editor driver. */
    err = svn_delta_path_driver2(editor, edit_baton, relpaths, TRUE,
                                 path_driver_cb_func, (void *)editor, pool);

    if (err)
    {
        return svn_error_trace(
                   svn_error_compose_create(err,
                                            editor->abort_edit(edit_baton, pool)));
    }

    /* Close the edit. */
    return svn_error_trace(editor->close_edit(edit_baton, pool));
}


/* Structure for tracking remote delete targets associated with a
   specific repository. */