Skip to main content

svn_ra_do_update3

Function svn_ra_do_update3 

Source
pub unsafe extern "C" fn svn_ra_do_update3(
    session: *mut svn_ra_session_t,
    reporter: *mut *const svn_ra_reporter3_t,
    report_baton: *mut *mut c_void,
    revision_to_update_to: svn_revnum_t,
    update_target: *const c_char,
    depth: svn_depth_t,
    send_copyfrom_args: svn_boolean_t,
    ignore_ancestry: svn_boolean_t,
    update_editor: *const svn_delta_editor_t,
    update_baton: *mut c_void,
    result_pool: *mut apr_pool_t,
    scratch_pool: *mut apr_pool_t,
) -> *mut svn_error_t
Expand description

Ask the RA layer to update a working copy to a new revision.

The client initially provides an @a update_editor/@a update_baton to the RA layer; this editor contains knowledge of where the change will begin in the working copy (when @c open_root() is called).

In return, the client receives a @a reporter/@a report_baton. The client then describes its working copy by making calls into the @a reporter.

When finished, the client calls @a reporter->finish_report(). The RA layer then does a complete drive of @a update_editor, ending with @a update_editor->close_edit(), to update the working copy.

@a update_target is an optional single path component to restrict the scope of the update to just that entry (in the directory represented by the @a session’s URL). If @a update_target is the empty string, the entire directory is updated.

Update the target only as deeply as @a depth indicates.

If @a send_copyfrom_args is TRUE, then ask the server to send copyfrom arguments to add_file() and add_directory() when possible. (Note: this means that any subsequent txdeltas coming from the server are presumed to apply against the copied file!)

Use @a ignore_ancestry to control whether or not items being updated will be checked for relatedness first. Unrelated items are typically transmitted to the editor as a deletion of one thing and the addition of another, but if this flag is @c TRUE, unrelated items will be diffed as if they were related.

The working copy will be updated to @a revision_to_update_to, or the “latest” revision if this arg is invalid.

The caller may not perform any RA operations using @a session before finishing the report, and may not perform any RA operations using @a session from within the editing operations of @a update_editor.

Allocate @a *reporter and @a *report_baton in @a result_pool. Use @a scratch_pool for temporary allocations.

@note The reporter provided by this function does NOT supply copy- from information to the diff editor callbacks.

@note In order to prevent pre-1.5 servers from doing more work than needed, and sending too much data back, a pre-1.5 ‘recurse’ directive may be sent to the server, based on @a depth.

@note Pre Subversion 1.8 svnserve based servers never ignore ancestry.

@note This differs from calling svn_ra_do_switch3() with the current URL of the target node. Update changes only the revision numbers, leaving any switched subtrees still switched, whereas switch changes every node in the tree to a child of the same URL.

@since New in 1.8.