Subversion
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Functions
Commit local modifications to the repository.

Functions

svn_error_tsvn_client_commit6 (const apr_array_header_t *targets, svn_depth_t depth, svn_boolean_t keep_locks, svn_boolean_t keep_changelists, svn_boolean_t commit_as_operations, svn_boolean_t include_file_externals, svn_boolean_t include_dir_externals, const apr_array_header_t *changelists, const apr_hash_t *revprop_table, svn_commit_callback2_t commit_callback, void *commit_baton, svn_client_ctx_t *ctx, apr_pool_t *pool)
 Commit files or directories into repository, authenticating with the authentication baton cached in ctx, and using ctx->log_msg_func3/ctx->log_msg_baton3 to obtain the log message. More...
 
svn_error_tsvn_client_commit5 (const apr_array_header_t *targets, svn_depth_t depth, svn_boolean_t keep_locks, svn_boolean_t keep_changelists, svn_boolean_t commit_as_operations, const apr_array_header_t *changelists, const apr_hash_t *revprop_table, svn_commit_callback2_t commit_callback, void *commit_baton, svn_client_ctx_t *ctx, apr_pool_t *pool)
 Similar to svn_client_commit6(), but passes include_file_externals as FALSE and include_dir_externals as FALSE. More...
 
svn_error_tsvn_client_commit4 (svn_commit_info_t **commit_info_p, const apr_array_header_t *targets, svn_depth_t depth, svn_boolean_t keep_locks, svn_boolean_t keep_changelists, const apr_array_header_t *changelists, const apr_hash_t *revprop_table, svn_client_ctx_t *ctx, apr_pool_t *pool)
 Similar to svn_client_commit5(), but returns the commit info in *commit_info_p rather than through a callback function. More...
 
svn_error_tsvn_client_commit3 (svn_commit_info_t **commit_info_p, const apr_array_header_t *targets, svn_boolean_t recurse, svn_boolean_t keep_locks, svn_client_ctx_t *ctx, apr_pool_t *pool)
 Similar to svn_client_commit4(), but always with NULL for changelist_name, FALSE for keep_changelist, NULL for revprop_table, and depth set according to recurse: if recurse is TRUE, use svn_depth_infinity, else svn_depth_empty. More...
 
svn_error_tsvn_client_commit2 (svn_client_commit_info_t **commit_info_p, const apr_array_header_t *targets, svn_boolean_t recurse, svn_boolean_t keep_locks, svn_client_ctx_t *ctx, apr_pool_t *pool)
 Similar to svn_client_commit3(), but uses svn_client_commit_info_t for commit_info_p. More...
 
svn_error_tsvn_client_commit (svn_client_commit_info_t **commit_info_p, const apr_array_header_t *targets, svn_boolean_t nonrecursive, svn_client_ctx_t *ctx, apr_pool_t *pool)
 Similar to svn_client_commit2(), but with keep_locks set to TRUE and nonrecursive instead of recurse. More...
 

Detailed Description

Function Documentation

svn_error_t* svn_client_commit ( svn_client_commit_info_t **  commit_info_p,
const apr_array_header_t *  targets,
svn_boolean_t  nonrecursive,
svn_client_ctx_t ctx,
apr_pool_t *  pool 
)

Similar to svn_client_commit2(), but with keep_locks set to TRUE and nonrecursive instead of recurse.

Deprecated:
Provided for backward compatibility with the 1.1 API.
svn_error_t* svn_client_commit2 ( svn_client_commit_info_t **  commit_info_p,
const apr_array_header_t *  targets,
svn_boolean_t  recurse,
svn_boolean_t  keep_locks,
svn_client_ctx_t ctx,
apr_pool_t *  pool 
)

Similar to svn_client_commit3(), but uses svn_client_commit_info_t for commit_info_p.

Deprecated:
Provided for backward compatibility with the 1.2 API.
Since
New in 1.2.
svn_error_t* svn_client_commit3 ( svn_commit_info_t **  commit_info_p,
const apr_array_header_t *  targets,
svn_boolean_t  recurse,
svn_boolean_t  keep_locks,
svn_client_ctx_t ctx,
apr_pool_t *  pool 
)

Similar to svn_client_commit4(), but always with NULL for changelist_name, FALSE for keep_changelist, NULL for revprop_table, and depth set according to recurse: if recurse is TRUE, use svn_depth_infinity, else svn_depth_empty.

Deprecated:
Provided for backward compatibility with the 1.4 API.
Since
New in 1.3.
svn_error_t* svn_client_commit4 ( svn_commit_info_t **  commit_info_p,
const apr_array_header_t *  targets,
svn_depth_t  depth,
svn_boolean_t  keep_locks,
svn_boolean_t  keep_changelists,
const apr_array_header_t *  changelists,
const apr_hash_t *  revprop_table,
svn_client_ctx_t ctx,
apr_pool_t *  pool 
)

Similar to svn_client_commit5(), but returns the commit info in *commit_info_p rather than through a callback function.

Does not use svn_wc_notify_commit_copied or svn_wc_notify_commit_copied_replaced (preferring svn_wc_notify_commit_added and svn_wc_notify_commit_replaced, respectively, instead).

Also, if no error is returned and (*commit_info_p)->revision is set to SVN_INVALID_REVNUM, then the commit was a no-op; nothing needed to be committed.

Sets commit_as_operations to FALSE to match Subversion 1.6's behavior.

Since
New in 1.5.
Deprecated:
Provided for backward compatibility with the 1.6 API.
svn_error_t* svn_client_commit5 ( const apr_array_header_t *  targets,
svn_depth_t  depth,
svn_boolean_t  keep_locks,
svn_boolean_t  keep_changelists,
svn_boolean_t  commit_as_operations,
const apr_array_header_t *  changelists,
const apr_hash_t *  revprop_table,
svn_commit_callback2_t  commit_callback,
void *  commit_baton,
svn_client_ctx_t ctx,
apr_pool_t *  pool 
)

Similar to svn_client_commit6(), but passes include_file_externals as FALSE and include_dir_externals as FALSE.

Since
New in 1.7.
Deprecated:
Provided for backward compatibility with the 1.7 API.
svn_error_t* svn_client_commit6 ( const apr_array_header_t *  targets,
svn_depth_t  depth,
svn_boolean_t  keep_locks,
svn_boolean_t  keep_changelists,
svn_boolean_t  commit_as_operations,
svn_boolean_t  include_file_externals,
svn_boolean_t  include_dir_externals,
const apr_array_header_t *  changelists,
const apr_hash_t *  revprop_table,
svn_commit_callback2_t  commit_callback,
void *  commit_baton,
svn_client_ctx_t ctx,
apr_pool_t *  pool 
)

Commit files or directories into repository, authenticating with the authentication baton cached in ctx, and using ctx->log_msg_func3/ctx->log_msg_baton3 to obtain the log message.

Set *commit_info_p to the results of the commit, allocated in pool.

targets is an array of const char * paths to commit. They need not be canonicalized nor condensed; this function will take care of that. If targets has zero elements, then do nothing and return immediately without error.

If non-NULL, revprop_table is a hash table holding additional, custom revision properties (const char * names mapped to svn_string_t * values) to be set on the new revision. This table cannot contain any standard Subversion properties.

If ctx->notify_func2 is non-NULL, then call ctx->notify_func2 with ctx->notify_baton2 as the commit progresses, with any of the following actions: svn_wc_notify_commit_modified, svn_wc_notify_commit_added, svn_wc_notify_commit_deleted, svn_wc_notify_commit_replaced, svn_wc_notify_commit_copied, svn_wc_notify_commit_copied_replaced, svn_wc_notify_commit_postfix_txdelta.

If depth is svn_depth_infinity, commit all changes to and below named targets. If depth is svn_depth_empty, commit only named targets (that is, only property changes on named directory targets, and property and content changes for named file targets). If depth is svn_depth_files, behave as above for named file targets, and for named directory targets, commit property changes on a named directory and all changes to files directly inside that directory. If svn_depth_immediates, behave as for svn_depth_files, and for subdirectories of any named directory target commit as though for svn_depth_empty.

Unlock paths in the repository, unless keep_locks is TRUE.

changelists is an array of const char * changelist names, used as a restrictive filter on items that are committed; that is, don't commit anything unless it's a member of one of those changelists. After the commit completes successfully, remove changelist associations from the targets, unless keep_changelists is set. If changelists is empty (or altogether NULL), no changelist filtering occurs.

If commit_as_operations is set to FALSE, when a copy is committed all changes below the copy are always committed at the same time (independent of the value of depth). If commit_as_operations is TRUE, changes to descendants are only committed if they are itself included via depth and targets.

If include_file_externals and/or include_dir_externals are TRUE, also commit all file and/or dir externals (respectively) that are reached by recursion, except for those externals which:

  • have a fixed revision, or
  • come from a different repository root URL (dir externals). These flags affect only recursion; externals that directly appear in targets are always included in the commit.

TODO: currently, file externals hidden inside an unversioned dir are

skipped deliberately, because we can't commit those yet. See STMT_SELECT_COMMITTABLE_EXTERNALS_BELOW.

TODO: With depth_immediates, this function acts as if

include_dir_externals was passed FALSE, but caller expects immediate child dir externals to be included depth_empty.

When commit_as_operations is TRUE it is possible to delete a node and all its descendants by selecting just the root of the deletion. If it is set to FALSE this will raise an error.

If commit_callback is non-NULL, then for each successful commit, call commit_callback with commit_baton and a svn_commit_info_t for the commit.

Note
svn_depth_unknown and svn_depth_exclude must not be passed for depth.

Use pool for any temporary allocations.

Since
New in 1.8.