GME  13
Typedefs | Functions
List / ls
Client working copy management
Collaboration diagram for List / ls:

Typedefs

typedef svn_error_t *(* svn_client_list_func2_t )(void *baton, const char *path, const svn_dirent_t *dirent, const svn_lock_t *lock, const char *abs_path, const char *external_parent_url, const char *external_target, apr_pool_t *scratch_pool)
typedef svn_error_t *(* svn_client_list_func_t )(void *baton, const char *path, const svn_dirent_t *dirent, const svn_lock_t *lock, const char *abs_path, apr_pool_t *pool)

Functions

svn_error_tsvn_client_list3 (const char *path_or_url, const svn_opt_revision_t *peg_revision, const svn_opt_revision_t *revision, svn_depth_t depth, apr_uint32_t dirent_fields, svn_boolean_t fetch_locks, svn_boolean_t include_externals, svn_client_list_func2_t list_func, void *baton, svn_client_ctx_t *ctx, apr_pool_t *pool)
SVN_DEPRECATED svn_error_tsvn_client_list2 (const char *path_or_url, const svn_opt_revision_t *peg_revision, const svn_opt_revision_t *revision, svn_depth_t depth, apr_uint32_t dirent_fields, svn_boolean_t fetch_locks, svn_client_list_func_t list_func, void *baton, svn_client_ctx_t *ctx, apr_pool_t *pool)
SVN_DEPRECATED svn_error_tsvn_client_list (const char *path_or_url, const svn_opt_revision_t *peg_revision, const svn_opt_revision_t *revision, svn_boolean_t recurse, apr_uint32_t dirent_fields, svn_boolean_t fetch_locks, svn_client_list_func_t list_func, void *baton, svn_client_ctx_t *ctx, apr_pool_t *pool)
SVN_DEPRECATED svn_error_tsvn_client_ls3 (apr_hash_t **dirents, apr_hash_t **locks, const char *path_or_url, const svn_opt_revision_t *peg_revision, const svn_opt_revision_t *revision, svn_boolean_t recurse, svn_client_ctx_t *ctx, apr_pool_t *pool)
SVN_DEPRECATED svn_error_tsvn_client_ls2 (apr_hash_t **dirents, const char *path_or_url, const svn_opt_revision_t *peg_revision, const svn_opt_revision_t *revision, svn_boolean_t recurse, svn_client_ctx_t *ctx, apr_pool_t *pool)
SVN_DEPRECATED svn_error_tsvn_client_ls (apr_hash_t **dirents, const char *path_or_url, svn_opt_revision_t *revision, svn_boolean_t recurse, svn_client_ctx_t *ctx, apr_pool_t *pool)

Typedef Documentation

typedef svn_error_t*(* svn_client_list_func2_t)(void *baton, const char *path, const svn_dirent_t *dirent, const svn_lock_t *lock, const char *abs_path, const char *external_parent_url, const char *external_target, apr_pool_t *scratch_pool)

The type of function invoked by svn_client_list3() to report the details of each directory entry being listed.

baton is the baton that was passed to the caller. path is the entry's path relative to abs_path; it is the empty path when reporting the top node of the list operation. dirent contains some or all of the directory entry's details, as determined by the caller. lock is the entry's lock, if it is locked and if lock information is being reported by the caller; otherwise lock is NULL. abs_path is the repository path of the top node of the list operation; it is relative to the repository root and begins with "/".

If svn_client_list3() was called with include_externals set to TRUE, external_parent_url and external_target will be set. external_parent_url is url of the directory which has the externals definitions. external_target is the target subdirectory of externals definitions which is relative to the parent directory that holds the external item.

If external_parent_url and external_target are defined, the item being listed is part of the external described by external_parent_url and external_target. Else, the item is not part of any external. Moreover, we will never mix items which are part of separate externals, and will always finish listing an external before listing the next one.

scratch_pool may be used for temporary allocations.

Since:
New in 1.8.

Definition at line 5417 of file svn_client.h.

typedef svn_error_t*(* svn_client_list_func_t)(void *baton, const char *path, const svn_dirent_t *dirent, const svn_lock_t *lock, const char *abs_path, apr_pool_t *pool)

Similar to svn_client_list_func2_t, but without any information about externals definitions.

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

Definition at line 5436 of file svn_client.h.


Function Documentation

SVN_DEPRECATED svn_error_t* svn_client_list ( const char *  path_or_url,
const svn_opt_revision_t peg_revision,
const svn_opt_revision_t revision,
svn_boolean_t  recurse,
apr_uint32_t  dirent_fields,
svn_boolean_t  fetch_locks,
svn_client_list_func_t  list_func,
void *  baton,
svn_client_ctx_t ctx,
apr_pool_t pool 
)

Similar to svn_client_list2(), but with recurse instead of depth. If recurse is TRUE, pass svn_depth_files for depth; else pass svn_depth_infinity.

Since:
New in 1.4.
Deprecated:
Provided for backward compatibility with the 1.4 API.
SVN_DEPRECATED svn_error_t* svn_client_list2 ( const char *  path_or_url,
const svn_opt_revision_t peg_revision,
const svn_opt_revision_t revision,
svn_depth_t  depth,
apr_uint32_t  dirent_fields,
svn_boolean_t  fetch_locks,
svn_client_list_func_t  list_func,
void *  baton,
svn_client_ctx_t ctx,
apr_pool_t pool 
)

Similar to svn_client_list3(), but with include_externals set to FALSE, and using a svn_client_list_func_t as callback.

Deprecated:
Provided for backwards compatibility with the 1.7 API.
Since:
New in 1.5.
svn_error_t* svn_client_list3 ( const char *  path_or_url,
const svn_opt_revision_t peg_revision,
const svn_opt_revision_t revision,
svn_depth_t  depth,
apr_uint32_t  dirent_fields,
svn_boolean_t  fetch_locks,
svn_boolean_t  include_externals,
svn_client_list_func2_t  list_func,
void *  baton,
svn_client_ctx_t ctx,
apr_pool_t pool 
)

Report the directory entry, and possibly children, for path_or_url at revision. The actual node revision selected is determined by the path as it exists in peg_revision. If peg_revision->kind is svn_opt_revision_unspecified, then it defaults to svn_opt_revision_head for URLs or svn_opt_revision_working for WC targets.

Report directory entries by invoking list_func/baton with path relative to path_or_url. The dirent for path_or_url is reported using an empty path. If path_or_url is a directory, also report its children. If path_or_url is non-existent, return SVN_ERR_FS_NOT_FOUND.

If fetch_locks is TRUE, include locks when reporting directory entries.

If include_externals is TRUE, also list all external items reached by recursion. depth value passed to the original list target applies for the externals also.

Use pool for temporary allocations.

Use authentication baton cached in ctx to authenticate against the repository.

If depth is svn_depth_empty, list just path_or_url itself. If depth is svn_depth_files, list path_or_url and its file entries. If svn_depth_immediates, list its immediate file and directory entries. If svn_depth_infinity, list file entries and recurse (with svn_depth_infinity) on directory entries.

dirent_fields controls which fields in the svn_dirent_t's are filled in. To have them totally filled in use SVN_DIRENT_ALL, otherwise simply bitwise OR together the combination of SVN_DIRENT_ fields you care about.

Since:
New in 1.8.
SVN_DEPRECATED svn_error_t* svn_client_ls ( apr_hash_t **  dirents,
const char *  path_or_url,
svn_opt_revision_t revision,
svn_boolean_t  recurse,
svn_client_ctx_t ctx,
apr_pool_t pool 
)

Similar to svn_client_ls2() except that peg_revision is always the same as revision.

Deprecated:
Provided for backward compatibility with the 1.1 API. Use svn_client_list2() instead.
SVN_DEPRECATED svn_error_t* svn_client_ls2 ( apr_hash_t **  dirents,
const char *  path_or_url,
const svn_opt_revision_t peg_revision,
const svn_opt_revision_t revision,
svn_boolean_t  recurse,
svn_client_ctx_t ctx,
apr_pool_t pool 
)

Same as svn_client_ls3(), but without the ability to get locks.

Since:
New in 1.2.
Deprecated:
Provided for backward compatibility with the 1.2 API. Use svn_client_list2() instead.
SVN_DEPRECATED svn_error_t* svn_client_ls3 ( apr_hash_t **  dirents,
apr_hash_t **  locks,
const char *  path_or_url,
const svn_opt_revision_t peg_revision,
const svn_opt_revision_t revision,
svn_boolean_t  recurse,
svn_client_ctx_t ctx,
apr_pool_t pool 
)

Same as svn_client_list(), but always passes SVN_DIRENT_ALL for the dirent_fields argument and returns all information in two hash tables instead of invoking a callback.

Set *dirents to a newly allocated hash of directory entries. The dirents hash maps entry names (const char *) to svn_dirent_t *'s.

If locks is not NULL, set *locks to a hash table mapping entry names (const char *) to svn_lock_t *'s.

Since:
New in 1.3.
Deprecated:
Provided for backward compatibility with the 1.3 API. Use svn_client_list2() instead.