Loading...
Searching...
No Matches
Show repository information about a working copy.
Client working copy management

## Data Structures

struct | svn_info_t
| A structure which describes various system-generated metadata about a working-copy path or URL. More...
struct | svn_client_info2_t
| A structure which describes various system-generated metadata about a working-copy path or URL. More...

## Macros

#define | SVN_INFO_SIZE_UNKNOWN ((apr_size_t) -1)
| The size of the file is unknown.

## Typedefs

typedef struct svn_info_t | svn_info_t
| A structure which describes various system-generated metadata about a working-copy path or URL.
typedef svn_error_t *(* | svn_info_receiver_t) (void *baton, const char *path, const svn_info_t *info, apr_pool_t *pool)
| The callback invoked by svn_client_info2().
typedef struct svn_client_info2_t | svn_client_info2_t
| A structure which describes various system-generated metadata about a working-copy path or URL.
typedef svn_error_t *(* | svn_client_info_receiver2_t) (void *baton, const char *abspath_or_url, const svn_client_info2_t *info, apr_pool_t *scratch_pool)
| The callback invoked by info retrievers.

## Functions

svn_info_t * | svn_info_dup (const svn_info_t *info, apr_pool_t *pool)
| Return a duplicate of info, allocated in pool.
svn_client_info2_t * | svn_client_info2_dup (const svn_client_info2_t *info, apr_pool_t *pool)
| Return a duplicate of info, allocated in pool.
svn_error_t * | svn_client_info4 (const char *abspath_or_url, const svn_opt_revision_t *peg_revision, const svn_opt_revision_t *revision, svn_depth_t depth, svn_boolean_t fetch_excluded, svn_boolean_t fetch_actual_only, svn_boolean_t include_externals, const apr_array_header_t *changelists, svn_client_info_receiver2_t receiver, void *receiver_baton, svn_client_ctx_t *ctx, apr_pool_t *scratch_pool)
| Invoke receiver with receiver_baton to return information about abspath_or_url in revision.
svn_error_t * | svn_client_info3 (const char *abspath_or_url, const svn_opt_revision_t *peg_revision, const svn_opt_revision_t *revision, svn_depth_t depth, svn_boolean_t fetch_excluded, svn_boolean_t fetch_actual_only, const apr_array_header_t *changelists, svn_client_info_receiver2_t receiver, void *receiver_baton, svn_client_ctx_t *ctx, apr_pool_t *scratch_pool)
| Similar to svn_client_info4, but doesn't support walking externals.
svn_error_t * | svn_client_info2 (const char *path_or_url, const svn_opt_revision_t *peg_revision, const svn_opt_revision_t *revision, svn_info_receiver_t receiver, void *receiver_baton, svn_depth_t depth, const apr_array_header_t *changelists, svn_client_ctx_t *ctx, apr_pool_t *pool)
| Similar to svn_client_info3, but uses an svn_info_receiver_t instead of a svn_client_info_receiver2_t, and path_or_url may be a relative path.
svn_error_t * | svn_client_info (const char *path_or_url, const svn_opt_revision_t *peg_revision, const svn_opt_revision_t *revision, svn_info_receiver_t receiver, void *receiver_baton, svn_boolean_t recurse, svn_client_ctx_t *ctx, apr_pool_t *pool)
| Similar to svn_client_info2() but with changelists passed as `NULL`, and depth set according to recurse: if recurse is TRUE, depth is svn_depth_infinity, else svn_depth_empty.
svn_error_t * | svn_client_get_wc_root (const char **wcroot_abspath, const char *local_abspath, svn_client_ctx_t *ctx, apr_pool_t *result_pool, apr_pool_t *scratch_pool)
| Set *wcroot_abspath to the local abspath of the root of the working copy in which local_abspath resides.
svn_error_t * | svn_client_min_max_revisions (svn_revnum_t *min_revision, svn_revnum_t *max_revision, const char *local_abspath, svn_boolean_t committed, svn_client_ctx_t *ctx, apr_pool_t *scratch_pool)
| Set *min_revision and *max_revision to the lowest and highest revision numbers found within local_abspath.

## Detailed Description

## Macro Definition Documentation

## SVN_INFO_SIZE_UNKNOWN

#define SVN_INFO_SIZE_UNKNOWN ((apr_size_t) -1)

The size of the file is unknown.

Used as value in fields of type `apr_size_t` in svn_info_t.

Since
  New in 1.5

Deprecated
  Provided for backward compatibility with the 1.6 API.

Definition at line 7181 of file svn_client.h.

## Typedef Documentation

## svn_client_info2_t

typedef struct svn_client_info2_t svn_client_info2_t

A structure which describes various system-generated metadata about a working-copy path or URL.

Note
  Fields may be added to the end of this structure in future versions. Therefore, users shouldn't allocate structures of this type, to preserve binary compatibility.

Since
  New in 1.7.

## svn_client_info_receiver2_t

typedef svn_error_t *(* svn_client_info_receiver2_t) (void *baton, const char *abspath_or_url, const svn_client_info2_t *info, apr_pool_t *scratch_pool)

The callback invoked by info retrievers.

Each invocation describes abspath_or_url with the information present in info. Use scratch_pool for all temporary allocation.

Since
  New in 1.7.

Definition at line 7396 of file svn_client.h.

## svn_info_receiver_t

typedef svn_error_t *(* svn_info_receiver_t) (void *baton, const char *path, const svn_info_t *info, apr_pool_t *pool)

The callback invoked by svn_client_info2().

Each invocation describes path with the information present in info. Note that any fields within info may be NULL if information is unavailable. Use pool for all temporary allocation.

Since
  New in 1.2.

Deprecated
  Provided for backward compatibility with the 1.6 API. The new API is svn_client_info_receiver2_t.

Definition at line 7308 of file svn_client.h.

## svn_info_t

typedef struct svn_info_t svn_info_t

A structure which describes various system-generated metadata about a working-copy path or URL.

Note
  Fields may be added to the end of this structure in future versions. Therefore, users shouldn't allocate structures of this type, to preserve binary compatibility.

Since
  New in 1.2.

Deprecated
  Provided for backward compatibility with the 1.6 API. The new API is svn_client_info2_t.

## Function Documentation

## svn_client_get_wc_root()

svn_error_t * svn_client_get_wc_root | ( | const char ** | wcroot_abspath,
|  | const char * | local_abspath,
|  | svn_client_ctx_t * | ctx,
|  | apr_pool_t * | result_pool,
|  | apr_pool_t * | scratch_pool )

Set *wcroot_abspath to the local abspath of the root of the working copy in which local_abspath resides.

Since
  New in 1.7.

## svn_client_info()

svn_error_t * svn_client_info | ( | const char * | path_or_url,
|  | const svn_opt_revision_t * | peg_revision,
|  | const svn_opt_revision_t * | revision,
|  | svn_info_receiver_t | receiver,
|  | void * | receiver_baton,
|  | svn_boolean_t | recurse,
|  | svn_client_ctx_t * | ctx,
|  | apr_pool_t * | pool )

Similar to svn_client_info2() but with changelists passed as `NULL`, and depth set according to recurse: if recurse is TRUE, depth is svn_depth_infinity, else svn_depth_empty.

Deprecated
  Provided for backward compatibility with the 1.4 API.

References revision.

## svn_client_info2()

svn_error_t * svn_client_info2 | ( | const char * | path_or_url,
|  | const svn_opt_revision_t * | peg_revision,
|  | const svn_opt_revision_t * | revision,
|  | svn_info_receiver_t | receiver,
|  | void * | receiver_baton,
|  | svn_depth_t | depth,
|  | const apr_array_header_t * | changelists,
|  | svn_client_ctx_t * | ctx,
|  | apr_pool_t * | pool )

Similar to svn_client_info3, but uses an svn_info_receiver_t instead of a svn_client_info_receiver2_t, and path_or_url may be a relative path.

Since
  New in 1.5.

Deprecated
  Provided for backward compatibility with the 1.6 API.

References revision, and SVN_DEPRECATED.

## svn_client_info2_dup()

svn_client_info2_t * svn_client_info2_dup | ( | const svn_client_info2_t * | info,
|  | apr_pool_t * | pool )

Return a duplicate of info, allocated in pool.

No part of the new structure will be shared with info.

Since
  New in 1.7.

## svn_client_info3()

svn_error_t * svn_client_info3 | ( | const char * | abspath_or_url,
|  | const svn_opt_revision_t * | peg_revision,
|  | const svn_opt_revision_t * | revision,
|  | svn_depth_t | depth,
|  | svn_boolean_t | fetch_excluded,
|  | svn_boolean_t | fetch_actual_only,
|  | const apr_array_header_t * | changelists,
|  | svn_client_info_receiver2_t | receiver,
|  | void * | receiver_baton,
|  | svn_client_ctx_t * | ctx,
|  | apr_pool_t * | scratch_pool )

Similar to svn_client_info4, but doesn't support walking externals.

Since
  New in 1.7.

Deprecated
  Provided for backward compatibility with the 1.8 API.

References revision, and SVN_DEPRECATED.

## svn_client_info4()

svn_error_t * svn_client_info4 | ( | const char * | abspath_or_url,
|  | const svn_opt_revision_t * | peg_revision,
|  | const svn_opt_revision_t * | revision,
|  | svn_depth_t | depth,
|  | svn_boolean_t | fetch_excluded,
|  | svn_boolean_t | fetch_actual_only,
|  | svn_boolean_t | include_externals,
|  | const apr_array_header_t * | changelists,
|  | svn_client_info_receiver2_t | receiver,
|  | void * | receiver_baton,
|  | svn_client_ctx_t * | ctx,
|  | apr_pool_t * | scratch_pool )

Invoke receiver with receiver_baton to return information about abspath_or_url in revision.

The information returned is system-generated metadata, not the sort of "property" metadata created by users. See svn_client_info2_t.

If both revision arguments are either svn_opt_revision_unspecified or `NULL`, then information will be pulled solely from the working copy; no network connections will be made.

Otherwise, information will be pulled from a repository. The actual node revision selected is determined by the abspath_or_url 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.

If abspath_or_url is not a local path, then if revision is of kind svn_opt_revision_previous (or some other kind that requires a local path), an error will be returned, because the desired revision cannot be determined.

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

If abspath_or_url is a file, just invoke receiver on it. If it is a directory, then descend according to depth. If depth is svn_depth_empty, invoke receiver on abspath_or_url and nothing else; if svn_depth_files, on abspath_or_url and its immediate file children; if svn_depth_immediates, the preceding plus on each immediate subdirectory; if svn_depth_infinity, then recurse fully, invoking receiver on abspath_or_url and everything beneath it.

If fetch_excluded is TRUE, also also send excluded nodes in the working copy to receiver, otherwise these are skipped. If fetch_actual_only is TRUE also send nodes that don't exist as versioned but are still tree conflicted.

If include_externals is `TRUE`, recurse into externals and report about them as well.

changelists is an array of const char * changelist names, used as a restrictive filter on items whose info is reported; that is, don't report info about any item unless it's a member of one of those changelists. If changelists is empty (or altogether `NULL`), no changelist filtering occurs.

Since
  New in 1.9.

References revision, and SVN_DEPRECATED.

## svn_client_min_max_revisions()

svn_error_t * svn_client_min_max_revisions | ( | svn_revnum_t * | min_revision,
|  | svn_revnum_t * | max_revision,
|  | const char * | local_abspath,
|  | svn_boolean_t | committed,
|  | svn_client_ctx_t * | ctx,
|  | apr_pool_t * | scratch_pool )

Set *min_revision and *max_revision to the lowest and highest revision numbers found within local_abspath.

If committed is TRUE, set *min_revision and *max_revision to the lowest and highest comitted (i.e. "last changed") revision numbers, respectively. NULL may be passed for either of min_revision and max_revision to indicate the caller's lack of interest in the value. Use scratch_pool for temporary allocations.

Since
  New in 1.7.

## svn_info_dup()

svn_info_t * svn_info_dup | ( | const svn_info_t * | info,
|  | apr_pool_t * | pool )

Return a duplicate of info, allocated in pool.

No part of the new structure will be shared with info.

Since
  New in 1.3.

Deprecated
  Provided for backward compatibility with the 1.6 API. The new API is svn_client_info2_dup().