svn_client_update4

Function svn_client_update4 

Source
pub unsafe extern "C" fn svn_client_update4(
    result_revs: *mut *mut apr_array_header_t,
    paths: *const apr_array_header_t,
    revision: *const svn_opt_revision_t,
    depth: svn_depth_t,
    depth_is_sticky: svn_boolean_t,
    ignore_externals: svn_boolean_t,
    allow_unver_obstructions: svn_boolean_t,
    adds_as_modification: svn_boolean_t,
    make_parents: svn_boolean_t,
    ctx: *mut svn_client_ctx_t,
    pool: *mut apr_pool_t,
) -> *mut svn_error_t
Expand description

Update working trees @a paths to @a revision, authenticating with the authentication baton cached in @a ctx. @a paths is an array of const char * paths to be updated. Unversioned paths that are direct children of a versioned path will cause an update that attempts to add that path; other unversioned paths are skipped. If @a result_revs is not NULL, @a *result_revs will be set to an array of svn_revnum_t with each element set to the revision to which @a revision was resolved for the corresponding element of @a paths.

@a revision must be of kind #svn_opt_revision_number, #svn_opt_revision_head, or #svn_opt_revision_date. If @a revision does not meet these requirements, return the error #SVN_ERR_CLIENT_BAD_REVISION.

The paths in @a paths can be from multiple working copies from multiple repositories, but even if they all come from the same repository there is no guarantee that revision represented by #svn_opt_revision_head will remain the same as each path is updated.

If @a ignore_externals is set, don’t process externals definitions as part of this operation.

If @a depth is #svn_depth_infinity, update fully recursively. Else if it is #svn_depth_immediates or #svn_depth_files, update each target and its file entries, but not its subdirectories. Else if #svn_depth_empty, update exactly each target, nonrecursively (essentially, update the target’s properties).

If @a depth is #svn_depth_unknown, take the working depth from @a paths and then behave as described above.

If @a depth_is_sticky is set and @a depth is not #svn_depth_unknown, then in addition to updating PATHS, also set their sticky ambient depth value to @a depth.

If @a allow_unver_obstructions is TRUE then the update tolerates existing unversioned items that obstruct added paths. Only obstructions of the same type (file or dir) as the added item are tolerated. The text of obstructing files is left as-is, effectively treating it as a user modification after the update. Working properties of obstructing items are set equal to the base properties. If @a allow_unver_obstructions is FALSE then the update will abort if there are any unversioned obstructing items.

If @a adds_as_modification is TRUE, a local addition at the same path as an incoming addition of the same node kind results in a normal node with a possible local modification, instead of a tree conflict.

If @a make_parents is TRUE, create any non-existent parent directories also by checking them out at depth=empty.

If @a ctx->notify_func2 is non-NULL, invoke @a ctx->notify_func2 with @a ctx->notify_baton2 for each item handled by the update, and also for files restored from text-base. If @a ctx->cancel_func is non-NULL, invoke it passing @a ctx->cancel_baton at various places during the update.

Use @a pool for any temporary allocation.

@todo Multiple Targets

  • Up for debate: an update on multiple targets is not atomic. Right now, svn_client_update only takes one path. What’s debatable is whether this should ever change. On the one hand, it’s kind of losing to have the client application loop over targets and call svn_client_update() on each one; each call to update initializes a whole new repository session (network overhead, etc.) On the other hand, it’s a very simple implementation, and allows for the possibility that different targets may come from different repositories.

@since New in 1.7.