Subversion
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
Data Structures | Typedefs | Enumerations | Functions
Working copy status.

We have three functions for getting working copy status: one function for getting the status of exactly one thing, another for getting the statuses of (potentially) multiple things and a third for getting the working copy out-of-dateness with respect to the repository. More...

Data Structures

struct  svn_wc_status3_t
 Structure for holding the "status" of a working copy item. More...
 
struct  svn_wc_status2_t
 

All diffs are not yet known.

More...
 
struct  svn_wc_status_t
 Same as svn_wc_status2_t, but without the svn_lock_t 'repos_lock', const char 'url', svn_revnum_t 'ood_last_cmt_rev', apr_time_t 'ood_last_cmt_date', svn_node_kind_t 'ood_kind', const char 'ood_last_cmt_author', svn_wc_conflict_description_t 'tree_conflict', svn_boolean_t 'file_external', svn_wc_status_kind 'pristine_text_status', and svn_wc_status_kind 'pristine_prop_status' fields. More...
 

Typedefs

typedef struct svn_wc_status3_t svn_wc_status3_t
 Structure for holding the "status" of a working copy item. More...
 
typedef struct svn_wc_status2_t svn_wc_status2_t
 

All diffs are not yet known.

More...
 
typedef struct svn_wc_status_t svn_wc_status_t
 Same as svn_wc_status2_t, but without the svn_lock_t 'repos_lock', const char 'url', svn_revnum_t 'ood_last_cmt_rev', apr_time_t 'ood_last_cmt_date', svn_node_kind_t 'ood_kind', const char 'ood_last_cmt_author', svn_wc_conflict_description_t 'tree_conflict', svn_boolean_t 'file_external', svn_wc_status_kind 'pristine_text_status', and svn_wc_status_kind 'pristine_prop_status' fields. More...
 
typedef svn_error_t *(* svn_wc_status_func4_t )(void *baton, const char *local_abspath, const svn_wc_status3_t *status, apr_pool_t *scratch_pool)
 A callback for reporting a status about local_abspath. More...
 
typedef svn_error_t *(* svn_wc_status_func3_t )(void *baton, const char *path, svn_wc_status2_t *status, apr_pool_t *pool)
 Same as svn_wc_status_func4_t, but with a non-const status and a relative path. More...
 
typedef void(* svn_wc_status_func2_t )(void *baton, const char *path, svn_wc_status2_t *status)
 Same as svn_wc_status_func3_t, but without a provided pool or the ability to propagate errors. More...
 
typedef void(* svn_wc_status_func_t )(void *baton, const char *path, svn_wc_status_t *status)
 Same as svn_wc_status_func2_t, but for older svn_wc_status_t structures. More...
 

Enumerations

enum  svn_wc_status_kind {
  svn_wc_status_none = 1,
  svn_wc_status_unversioned,
  svn_wc_status_normal,
  svn_wc_status_added,
  svn_wc_status_missing,
  svn_wc_status_deleted,
  svn_wc_status_replaced,
  svn_wc_status_modified,
  svn_wc_status_merged,
  svn_wc_status_conflicted,
  svn_wc_status_ignored,
  svn_wc_status_obstructed,
  svn_wc_status_external,
  svn_wc_status_incomplete
}
 The type of status for the working copy. More...
 

Functions

svn_wc_status3_tsvn_wc_dup_status3 (const svn_wc_status3_t *orig_stat, apr_pool_t *pool)
 Return a deep copy of the orig_stat status structure, allocated in pool. More...
 
svn_wc_status2_tsvn_wc_dup_status2 (const svn_wc_status2_t *orig_stat, apr_pool_t *pool)
 Same as svn_wc_dup_status3(), but for older svn_wc_status_t structures. More...
 
svn_wc_status_tsvn_wc_dup_status (const svn_wc_status_t *orig_stat, apr_pool_t *pool)
 Same as svn_wc_dup_status2(), but for older svn_wc_status_t structures. More...
 
svn_error_tsvn_wc_status3 (svn_wc_status3_t **status, svn_wc_context_t *wc_ctx, const char *local_abspath, apr_pool_t *result_pool, apr_pool_t *scratch_pool)
 Fill *status for local_abspath, allocating in result_pool. More...
 
svn_error_tsvn_wc_status2 (svn_wc_status2_t **status, const char *path, svn_wc_adm_access_t *adm_access, apr_pool_t *pool)
 Similar to svn_wc_status3(), but with a adm_access baton and absolute path. More...
 
svn_error_tsvn_wc_status (svn_wc_status_t **status, const char *path, svn_wc_adm_access_t *adm_access, apr_pool_t *pool)
 Same as svn_wc_status2(), but for older svn_wc_status_t structures. More...
 
svn_error_tsvn_wc_walk_status (svn_wc_context_t *wc_ctx, const char *local_abspath, svn_depth_t depth, svn_boolean_t get_all, svn_boolean_t no_ignore, svn_boolean_t ignore_text_mods, const apr_array_header_t *ignore_patterns, svn_wc_status_func4_t status_func, void *status_baton, svn_cancel_func_t cancel_func, void *cancel_baton, apr_pool_t *scratch_pool)
 Walk the working copy status of local_abspath using wc_ctx, by creating svn_wc_status3_t structures and sending these through status_func / status_baton. More...
 
svn_error_tsvn_wc_get_status_editor5 (const svn_delta_editor_t **editor, void **edit_baton, void **set_locks_baton, svn_revnum_t *edit_revision, svn_wc_context_t *wc_ctx, const char *anchor_abspath, const char *target_basename, svn_depth_t depth, svn_boolean_t get_all, svn_boolean_t no_ignore, svn_boolean_t depth_as_sticky, svn_boolean_t server_performs_filtering, const apr_array_header_t *ignore_patterns, svn_wc_status_func4_t status_func, void *status_baton, svn_cancel_func_t cancel_func, void *cancel_baton, apr_pool_t *result_pool, apr_pool_t *scratch_pool)
 DEPRECATED – please use APIs from svn_client.h. More...
 
svn_error_tsvn_wc_get_status_editor4 (const svn_delta_editor_t **editor, void **edit_baton, void **set_locks_baton, svn_revnum_t *edit_revision, svn_wc_adm_access_t *anchor, const char *target, svn_depth_t depth, svn_boolean_t get_all, svn_boolean_t no_ignore, const apr_array_header_t *ignore_patterns, svn_wc_status_func3_t status_func, void *status_baton, svn_cancel_func_t cancel_func, void *cancel_baton, svn_wc_traversal_info_t *traversal_info, apr_pool_t *pool)
 Same as svn_wc_get_status_editor5, but using svn_wc_status_func3_t instead of svn_wc_status_func4_t. More...
 
svn_error_tsvn_wc_get_status_editor3 (const svn_delta_editor_t **editor, void **edit_baton, void **set_locks_baton, svn_revnum_t *edit_revision, svn_wc_adm_access_t *anchor, const char *target, svn_depth_t depth, svn_boolean_t get_all, svn_boolean_t no_ignore, const apr_array_header_t *ignore_patterns, svn_wc_status_func2_t status_func, void *status_baton, svn_cancel_func_t cancel_func, void *cancel_baton, svn_wc_traversal_info_t *traversal_info, apr_pool_t *pool)
 Same as svn_wc_get_status_editor4(), but using svn_wc_status_func2_t instead of svn_wc_status_func3_t. More...
 
svn_error_tsvn_wc_get_status_editor2 (const svn_delta_editor_t **editor, void **edit_baton, void **set_locks_baton, svn_revnum_t *edit_revision, svn_wc_adm_access_t *anchor, const char *target, apr_hash_t *config, svn_boolean_t recurse, svn_boolean_t get_all, svn_boolean_t no_ignore, svn_wc_status_func2_t status_func, void *status_baton, svn_cancel_func_t cancel_func, void *cancel_baton, svn_wc_traversal_info_t *traversal_info, apr_pool_t *pool)
 Like svn_wc_get_status_editor3(), but with ignore_patterns provided from the corresponding value in config, and recurse instead of depth. More...
 
svn_error_tsvn_wc_get_status_editor (const svn_delta_editor_t **editor, void **edit_baton, svn_revnum_t *edit_revision, svn_wc_adm_access_t *anchor, const char *target, apr_hash_t *config, svn_boolean_t recurse, svn_boolean_t get_all, svn_boolean_t no_ignore, svn_wc_status_func_t status_func, void *status_baton, svn_cancel_func_t cancel_func, void *cancel_baton, svn_wc_traversal_info_t *traversal_info, apr_pool_t *pool)
 Same as svn_wc_get_status_editor2(), but with set_locks_baton set to NULL, and taking a deprecated svn_wc_status_func_t argument. More...
 
svn_error_tsvn_wc_status_set_repos_locks (void *set_locks_baton, apr_hash_t *locks, const char *repos_root, apr_pool_t *pool)
 Associate locks, a hash table mapping const char* absolute repository paths to svn_lock_t objects, with a set_locks_baton returned by an earlier call to svn_wc_get_status_editor3(). More...
 

Detailed Description

We have three functions for getting working copy status: one function for getting the status of exactly one thing, another for getting the statuses of (potentially) multiple things and a third for getting the working copy out-of-dateness with respect to the repository.

Why do we have two different functions for getting working copy status? The concept of depth, as explained in the documentation for svn_depth_t, may be useful in understanding this. Suppose we're getting the status of directory D:

To offer all three levels, we could have one unified function, taking a `depth' parameter. Unfortunately, because this function would have to handle multiple return values as well as the single return value case, getting the status of just one entity would become cumbersome: you'd have to roll through a hash to find one lone status.

So we have svn_wc_status3() for depth-empty (just D itself), and svn_wc_walk_status() for depth-immediates and depth-infinity, since the latter two involve multiple return values. And for out-of-dateness information we have svn_wc_get_status_editor5().

Typedef Documentation

All diffs are not yet known.

Same as svn_wc_status3_t, but without the svn_boolean_t 'versioned' field. Instead an item that is not versioned has the 'entry' field set to NULL.

Since
New in 1.2.
Deprecated:
Provided for backward compatibility with the 1.6 API.

Structure for holding the "status" of a working copy item.

Note
Fields may be added to the end of this structure in future versions. Therefore, to preserve binary compatibility, users should not directly allocate structures of this type.
Since
New in 1.7.
typedef void(* svn_wc_status_func2_t)(void *baton, const char *path, svn_wc_status2_t *status)

Same as svn_wc_status_func3_t, but without a provided pool or the ability to propagate errors.

Since
New in 1.2.
Deprecated:
Provided for backward compatibility with the 1.5 API.

Definition at line 4032 of file svn_wc.h.

typedef svn_error_t*(* svn_wc_status_func3_t)(void *baton, const char *path, svn_wc_status2_t *status, apr_pool_t *pool)

Same as svn_wc_status_func4_t, but with a non-const status and a relative path.

Since
New in 1.6.
Deprecated:
Provided for backward compatibility with the 1.6 API.

Definition at line 4020 of file svn_wc.h.

typedef svn_error_t*(* svn_wc_status_func4_t)(void *baton, const char *local_abspath, const svn_wc_status3_t *status, apr_pool_t *scratch_pool)

A callback for reporting a status about local_abspath.

baton is a closure object; it should be provided by the implementation, and passed by the caller.

scratch_pool will be cleared between invocations to the callback.

Since
New in 1.7.

Definition at line 4008 of file svn_wc.h.

typedef void(* svn_wc_status_func_t)(void *baton, const char *path, svn_wc_status_t *status)

Same as svn_wc_status_func2_t, but for older svn_wc_status_t structures.

Deprecated:
Provided for backward compatibility with the 1.1 API.

Definition at line 4041 of file svn_wc.h.

Same as svn_wc_status2_t, but without the svn_lock_t 'repos_lock', const char 'url', svn_revnum_t 'ood_last_cmt_rev', apr_time_t 'ood_last_cmt_date', svn_node_kind_t 'ood_kind', const char 'ood_last_cmt_author', svn_wc_conflict_description_t 'tree_conflict', svn_boolean_t 'file_external', svn_wc_status_kind 'pristine_text_status', and svn_wc_status_kind 'pristine_prop_status' fields.

Deprecated:
Provided for backward compatibility with the 1.1 API.

Enumeration Type Documentation

The type of status for the working copy.

Enumerator
svn_wc_status_none 

does not exist

svn_wc_status_unversioned 

is not a versioned thing in this wc

svn_wc_status_normal 

exists, but uninteresting

svn_wc_status_added 

is scheduled for addition

svn_wc_status_missing 

under v.c., but is missing

svn_wc_status_deleted 

scheduled for deletion

svn_wc_status_replaced 

was deleted and then re-added

svn_wc_status_modified 

text or props have been modified

svn_wc_status_merged 

local mods received repos mods (### unused)

svn_wc_status_conflicted 

local mods received conflicting repos mods

svn_wc_status_ignored 

is unversioned but configured to be ignored

svn_wc_status_obstructed 

an unversioned resource is in the way of the versioned resource

svn_wc_status_external 

an unversioned directory path populated by an svn:externals property; this status is not used for file externals

svn_wc_status_incomplete 

a directory doesn't contain a complete entries list

Definition at line 3539 of file svn_wc.h.

Function Documentation

svn_wc_status_t* svn_wc_dup_status ( const svn_wc_status_t orig_stat,
apr_pool_t *  pool 
)

Same as svn_wc_dup_status2(), but for older svn_wc_status_t structures.

Deprecated:
Provided for backward compatibility with the 1.1 API.
svn_wc_status2_t* svn_wc_dup_status2 ( const svn_wc_status2_t orig_stat,
apr_pool_t *  pool 
)

Same as svn_wc_dup_status3(), but for older svn_wc_status_t structures.

Since
New in 1.2
Deprecated:
Provided for backward compatibility with the 1.6 API.
svn_wc_status3_t* svn_wc_dup_status3 ( const svn_wc_status3_t orig_stat,
apr_pool_t *  pool 
)

Return a deep copy of the orig_stat status structure, allocated in pool.

Since
New in 1.7.
svn_error_t* svn_wc_get_status_editor ( const svn_delta_editor_t **  editor,
void **  edit_baton,
svn_revnum_t edit_revision,
svn_wc_adm_access_t anchor,
const char *  target,
apr_hash_t *  config,
svn_boolean_t  recurse,
svn_boolean_t  get_all,
svn_boolean_t  no_ignore,
svn_wc_status_func_t  status_func,
void *  status_baton,
svn_cancel_func_t  cancel_func,
void *  cancel_baton,
svn_wc_traversal_info_t traversal_info,
apr_pool_t *  pool 
)

Same as svn_wc_get_status_editor2(), but with set_locks_baton set to NULL, and taking a deprecated svn_wc_status_func_t argument.

Deprecated:
Provided for backward compatibility with the 1.1 API.
svn_error_t* svn_wc_get_status_editor2 ( const svn_delta_editor_t **  editor,
void **  edit_baton,