Subversion
Data Structures | Typedefs | Functions
Shelves and checkpoints

Shelving v2, with checkpoints. More...

Data Structures

struct  svn_client__shelf_t
 A shelf. More...
 
struct  svn_client__shelf_version_t
 One version of a shelved change-set. More...
 
struct  svn_client__shelf_info_t
 Information about a shelf. More...
 

Typedefs

typedef struct svn_client__shelf_t svn_client__shelf_t
 A shelf. More...
 
typedef struct svn_client__shelf_version_t svn_client__shelf_version_t
 One version of a shelved change-set. More...
 
typedef struct svn_client__shelf_info_t svn_client__shelf_info_t
 Information about a shelf. More...
 

Functions

svn_error_tsvn_client__shelf_open_or_create (svn_client__shelf_t **shelf_p, const char *name, const char *local_abspath, svn_client_ctx_t *ctx, apr_pool_t *result_pool)
 Open an existing shelf or create a new shelf. More...
 
svn_error_tsvn_client__shelf_open_existing (svn_client__shelf_t **shelf_p, const char *name, const char *local_abspath, svn_client_ctx_t *ctx, apr_pool_t *result_pool)
 Open an existing shelf named name, or error if it doesn't exist. More...
 
svn_error_tsvn_client__shelf_close (svn_client__shelf_t *shelf, apr_pool_t *scratch_pool)
 Close shelf. More...
 
svn_error_tsvn_client__shelf_delete (const char *name, const char *local_abspath, svn_boolean_t dry_run, svn_client_ctx_t *ctx, apr_pool_t *scratch_pool)
 Delete the shelf named name, or error if it doesn't exist. More...
 
svn_error_tsvn_client__shelf_save_new_version3 (svn_client__shelf_version_t **new_version_p, svn_client__shelf_t *shelf, const apr_array_header_t *paths, svn_depth_t depth, const apr_array_header_t *changelists, svn_client_status_func_t shelved_func, void *shelved_baton, svn_client_status_func_t not_shelved_func, void *not_shelved_baton, apr_pool_t *scratch_pool)
 Save the local modifications found by paths, depth, changelists as a new version of shelf. More...
 
svn_error_tsvn_client__shelf_delete_newer_versions (svn_client__shelf_t *shelf, svn_client__shelf_version_t *shelf_version, apr_pool_t *scratch_pool)
 Delete all newer versions of shelf newer than shelf_version. More...
 
svn_error_tsvn_client__shelf_version_open (svn_client__shelf_version_t **shelf_version_p, svn_client__shelf_t *shelf, int version_number, apr_pool_t *result_pool, apr_pool_t *scratch_pool)
 Return in shelf_version an existing version of shelf, given its version_number. More...
 
svn_error_tsvn_client__shelf_get_newest_version (svn_client__shelf_version_t **shelf_version_p, svn_client__shelf_t *shelf, apr_pool_t *result_pool, apr_pool_t *scratch_pool)
 Return in shelf_version the newest version of shelf. More...
 
svn_error_tsvn_client__shelf_get_all_versions (apr_array_header_t **versions_p, svn_client__shelf_t *shelf, apr_pool_t *result_pool, apr_pool_t *scratch_pool)
 Return in versions_p an array of (#svn_client_shelf_version_t *) containing all versions of shelf. More...
 
svn_error_tsvn_client__shelf_apply (svn_client__shelf_version_t *shelf_version, svn_boolean_t dry_run, apr_pool_t *scratch_pool)
 Apply shelf_version to the WC. More...
 
svn_error_tsvn_client__shelf_test_apply_file (svn_boolean_t *conflict_p, svn_client__shelf_version_t *shelf_version, const char *file_relpath, apr_pool_t *scratch_pool)
 Test whether we can successfully apply the changes for file_relpath in shelf_version to the WC. More...
 
svn_error_tsvn_client__shelf_unapply (svn_client__shelf_version_t *shelf_version, svn_boolean_t dry_run, apr_pool_t *scratch_pool)
 Reverse-apply shelf_version to the WC. More...
 
svn_error_tsvn_client__shelf_paths_changed (apr_hash_t **affected_paths, svn_client__shelf_version_t *shelf_version, apr_pool_t *result_pool, apr_pool_t *scratch_pool)
 Set *affected_paths to a hash with one entry for each path affected by the shelf_version. More...
 
svn_error_tsvn_client__shelf_revprop_set (svn_client__shelf_t *shelf, const char *prop_name, const svn_string_t *prop_val, apr_pool_t *scratch_pool)
 Set shelf's revprop prop_name to prop_val. More...
 
svn_error_tsvn_client__shelf_revprop_set_all (svn_client__shelf_t *shelf, apr_hash_t *revprop_table, apr_pool_t *scratch_pool)
 Set shelf's revprops to revprop_table. More...
 
svn_error_tsvn_client__shelf_revprop_get (svn_string_t **prop_val, svn_client__shelf_t *shelf, const char *prop_name, apr_pool_t *result_pool)
 Get shelf's revprop prop_name into *prop_val. More...
 
svn_error_tsvn_client__shelf_revprop_list (apr_hash_t **props, svn_client__shelf_t *shelf, apr_pool_t *result_pool)
 Get shelf's revprops into props. More...
 
svn_error_tsvn_client__shelf_set_log_message (svn_client__shelf_t *shelf, const char *log_message, apr_pool_t *scratch_pool)
 Set the log message in shelf to log_message. More...
 
svn_error_tsvn_client__shelf_get_log_message (char **log_message, svn_client__shelf_t *shelf, apr_pool_t *result_pool)
 Get the log message in shelf into *log_message. More...
 
svn_error_tsvn_client__shelf_list (apr_hash_t **shelf_infos, const char *local_abspath, svn_client_ctx_t *ctx, apr_pool_t *result_pool, apr_pool_t *scratch_pool)
 Set *shelf_infos to a hash, keyed by shelf name, of pointers to svn_client_shelf_info_t structures, one for each shelf in the given WC. More...
 
svn_error_tsvn_client__shelf_version_status_walk (svn_client__shelf_version_t *shelf_version, const char *wc_relpath, svn_wc_status_func4_t walk_func, void *walk_baton, apr_pool_t *scratch_pool)
 

Detailed Description

Shelving v2, with checkpoints.

Typedef Documentation

Information about a shelf.

Warning
EXPERIMENTAL.

A shelf.

Warning
EXPERIMENTAL.

One version of a shelved change-set.

Warning
EXPERIMENTAL.

Function Documentation

svn_error_t* svn_client__shelf_apply ( svn_client__shelf_version_t shelf_version,
svn_boolean_t  dry_run,
apr_pool_t *  scratch_pool 
)

Apply shelf_version to the WC.

If dry_run is true, try applying the shelf-version to the WC and report the full set of notifications about successes and conflicts, but leave the WC untouched.

Warning
EXPERIMENTAL.
svn_error_t* svn_client__shelf_close ( svn_client__shelf_t shelf,
apr_pool_t *  scratch_pool 
)

Close shelf.

If shelf is NULL, do nothing; otherwise shelf must be an open shelf.

Warning
EXPERIMENTAL.
svn_error_t* svn_client__shelf_delete ( const char *  name,
const char *  local_abspath,
svn_boolean_t  dry_run,
svn_client_ctx_t ctx,
apr_pool_t *  scratch_pool 
)

Delete the shelf named name, or error if it doesn't exist.

local_abspath is any path in the WC and is used to find the WC root.

Warning
EXPERIMENTAL.
svn_error_t* svn_client__shelf_delete_newer_versions ( svn_client__shelf_t shelf,
svn_client__shelf_version_t shelf_version,
apr_pool_t *  scratch_pool 
)

Delete all newer versions of shelf newer than shelf_version.

If shelf_version is null, delete all versions of shelf. (The shelf will still exist, with any log message and other revprops, but with no versions in it.)

Leave the shelf's log message and other revprops unchanged.

Any #svn_client_shelf_version_t object that refers to a deleted version will become invalid: attempting to use it will give undefined behaviour. The given shelf_version will remain valid.

Warning
EXPERIMENTAL.
svn_error_t* svn_client__shelf_get_all_versions ( apr_array_header_t **  versions_p,
svn_client__shelf_t shelf,
apr_pool_t *  result_pool,
apr_pool_t *  scratch_pool 
)

Return in versions_p an array of (#svn_client_shelf_version_t *) containing all versions of shelf.

The versions will be in chronological order, oldest to newest.

Warning
EXPERIMENTAL.
svn_error_t* svn_client__shelf_get_log_message ( char **  log_message,
svn_client__shelf_t shelf,
apr_pool_t *  result_pool 
)

Get the log message in shelf into *log_message.

Set *log_message to NULL if there is no log message.

Similar to svn_client_shelf_revprop_get(... SVN_PROP_REVISION_LOG ...).

The result is allocated in result_pool.

Warning
EXPERIMENTAL.
svn_error_t* svn_client__shelf_get_newest_version ( svn_client__shelf_version_t **  shelf_version_p,
svn_client__shelf_t shelf,
apr_pool_t *  result_pool,
apr_pool_t *  scratch_pool 
)

Return in shelf_version the newest version of shelf.

Set shelf_version to null if no versions exist.

Warning
EXPERIMENTAL.
svn_error_t* svn_client__shelf_list ( apr_hash_t **  shelf_infos,
const char *  local_abspath,
svn_client_ctx_t ctx,
apr_pool_t *  result_pool,
apr_pool_t *  scratch_pool 
)

Set *shelf_infos to a hash, keyed by shelf name, of pointers to svn_client_shelf_info_t structures, one for each shelf in the given WC.

local_abspath is any path in the WC and is used to find the WC root.

Warning
EXPERIMENTAL.
svn_error_t* svn_client__shelf_open_existing ( svn_client__shelf_t **  shelf_p,
const char *  name,
const char *  local_abspath,
svn_client_ctx_t ctx,
apr_pool_t *  result_pool 
)

Open an existing shelf named name, or error if it doesn't exist.

The shelf should be closed after use by calling svn_client_shelf_close().

local_abspath is any path in the WC and is used to find the WC root.

Warning
EXPERIMENTAL.
svn_error_t* svn_client__shelf_open_or_create ( svn_client__shelf_t **  shelf_p,
const char *  name,
const char *  local_abspath,
svn_client_ctx_t ctx,
apr_pool_t *  result_pool 
)

Open an existing shelf or create a new shelf.

Create a new shelf (containing no versions) if a shelf named name is not found.

The shelf should be closed after use by calling svn_client_shelf_close().

local_abspath is any path in the WC and is used to find the WC root.

Warning
EXPERIMENTAL.
svn_error_t* svn_client__shelf_paths_changed ( apr_hash_t **  affected_paths,
svn_client__shelf_version_t shelf_version,
apr_pool_t *  result_pool,
apr_pool_t *  scratch_pool 
)

Set *affected_paths to a hash with one entry for each path affected by the shelf_version.

The hash key is the path of the affected file, relative to the WC root.

(Future possibility: When moves and copies are supported, the hash key is the old path and value is the new path.)

Warning
EXPERIMENTAL.
svn_error_t* svn_client__shelf_revprop_get ( svn_string_t **  prop_val,
svn_client__shelf_t shelf,
const char *  prop_name,
apr_pool_t *  result_pool 
)

Get shelf's revprop prop_name into *prop_val.

If the property is not present, set *prop_val to NULL.

This can be used to get the shelf's log message (property name "svn:log" or SVN_PROP_REVISION_LOG).

The lifetime of the result is limited to that of shelf and/or of result_pool.

Warning
EXPERIMENTAL.
svn_error_t* svn_client__shelf_revprop_list ( apr_hash_t **  props,
svn_client__shelf_t shelf,
apr_pool_t *  result_pool 
)

Get shelf's revprops into props.

The lifetime of the result is limited to that of shelf and/or of result_pool.

Warning
EXPERIMENTAL.
svn_error_t* svn_client__shelf_revprop_set ( svn_client__shelf_t shelf,
const char *  prop_name,
const svn_string_t prop_val,
apr_pool_t *  scratch_pool 
)

Set shelf's revprop prop_name to prop_val.

This can be used to set or change the shelf's log message (property name "svn:log" or SVN_PROP_REVISION_LOG).

If prop_val is NULL, delete the property (if present).

Warning
EXPERIMENTAL.
svn_error_t* svn_client__shelf_revprop_set_all ( svn_client__shelf_t shelf,
apr_hash_t *  revprop_table,
apr_pool_t *  scratch_pool 
)

Set shelf's revprops to revprop_table.

This deletes all previous revprops.

Warning
EXPERIMENTAL.
svn_error_t* svn_client__shelf_save_new_version3 ( svn_client__shelf_version_t **  new_version_p,
svn_client__shelf_t shelf,
const apr_array_header_t *  paths,
svn_depth_t  depth,
const apr_array_header_t *  changelists,
svn_client_status_func_t  shelved_func,
void *  shelved_baton,
svn_client_status_func_t  not_shelved_func,
void *  not_shelved_baton,
apr_pool_t *  scratch_pool 
)

Save the local modifications found by paths, depth, changelists as a new version of shelf.

If any paths are shelved, create a new shelf-version and return the new shelf-version in *new_version_p, else set *new_version_p to null. new_version_p may be null if that output is not wanted; a new shelf- version is still saved and may be found through shelf.

paths are relative to the CWD, or absolute.

For each successfully shelved path: call shelved_func (if not null) with shelved_baton.

If any paths cannot be shelved: if not_shelved_func is given, call it with not_shelved_baton for each such path, and still create a new shelf-version if any paths are shelved.

This function does not revert the changes from the WC; use svn_client_shelf_unapply() for that.

Warning
EXPERIMENTAL.
svn_error_t* svn_client__shelf_set_log_message ( svn_client__shelf_t shelf,
const char *  log_message,
apr_pool_t *  scratch_pool 
)

Set the log message in shelf to log_message.

If log_message is null, delete the log message.

Similar to svn_client_shelf_revprop_set(... SVN_PROP_REVISION_LOG ...).

Warning
EXPERIMENTAL.
svn_error_t* svn_client__shelf_test_apply_file ( svn_boolean_t conflict_p,
svn_client__shelf_version_t shelf_version,
const char *  file_relpath,
apr_pool_t *  scratch_pool 
)

Test whether we can successfully apply the changes for file_relpath in shelf_version to the WC.

Set *conflict_p to true if the changes conflict with the WC state, else to false.

If file_relpath is not found in shelf_version, set *conflict_p to FALSE.

file_relpath is relative to the WC root.

A conflict means the shelf cannot be applied successfully to the WC because the change to be applied is not compatible with the current working state of the WC file. Examples are a text conflict, or the file does not exist or is a directory, or the shelf is trying to add the file but it already exists, or trying to delete it but it does not exist.

Return an error only if something is broken, e.g. unable to read data from the specified shelf-version.

Leave the WC untouched.

Warning
EXPERIMENTAL.
svn_error_t* svn_client__shelf_unapply ( svn_client__shelf_version_t shelf_version,
svn_boolean_t  dry_run,
apr_pool_t *  scratch_pool 
)

Reverse-apply shelf_version to the WC.

Warning
EXPERIMENTAL.
svn_error_t* svn_client__shelf_version_open ( svn_client__shelf_version_t **  shelf_version_p,
svn_client__shelf_t shelf,
int  version_number,
apr_pool_t *  result_pool,
apr_pool_t *  scratch_pool 
)

Return in shelf_version an existing version of shelf, given its version_number.

Error if that version doesn't exist.

There is no need to "close" it after use.

Warning
EXPERIMENTAL.