diff options
author | Peter Wemm <peter@FreeBSD.org> | 2018-05-08 03:44:38 +0000 |
---|---|---|
committer | Peter Wemm <peter@FreeBSD.org> | 2018-05-08 03:44:38 +0000 |
commit | 3faf8d6bffc5d0fb2525ba37bb504c53366caf9d (patch) | |
tree | 7e47911263e75034b767fe34b2f8d3d17e91f66d /subversion/include/svn_ra.h | |
parent | a55fb3c0d5eca7d887798125d5b95942b1f01d4b (diff) |
Diffstat (limited to 'subversion/include/svn_ra.h')
-rw-r--r-- | subversion/include/svn_ra.h | 77 |
1 files changed, 71 insertions, 6 deletions
diff --git a/subversion/include/svn_ra.h b/subversion/include/svn_ra.h index a3ab672dda92f..030458d0e16ad 100644 --- a/subversion/include/svn_ra.h +++ b/subversion/include/svn_ra.h @@ -1089,7 +1089,7 @@ svn_ra_get_file(svn_ra_session_t *session, * @a path is interpreted relative to the URL in @a session. * * If @a revision is @c SVN_INVALID_REVNUM (meaning 'head') and - * @a *fetched_rev is not @c NULL, then this function will set + * @a fetched_rev is not @c NULL, then this function will set * @a *fetched_rev to the actual revision that was retrieved. (Some * callers want to know, and some don't.) * @@ -1130,6 +1130,63 @@ svn_ra_get_dir(svn_ra_session_t *session, apr_pool_t *pool); /** + * Callback type to be used with svn_ra_list(). It will be invoked for + * every directory entry found. + * + * The full path of the entry is given in @a rel_path and @a dirent contains + * various additional information. Only the elements of @a dirent specified + * by the @a dirent_fields argument to svn_ra_list() will be valid. + * + * @a baton is the user-provided receiver baton. @a scratch_pool may be + * used for temporary allocations. + * + * @since New in 1.10. + */ +typedef svn_error_t *(* svn_ra_dirent_receiver_t)(const char *rel_path, + svn_dirent_t *dirent, + void *baton, + apr_pool_t *scratch_pool); + +/** + * Efficiently list everything within a sub-tree. Specify a glob pattern + * to search for specific files and folders. + * + * In @a session, walk the sub-tree starting at @a path at @a revision down + * to the given @a depth. For each directory entry found, @a receiver will + * be called with @a receiver_baton. The starting @a path will be reported + * as well. Because retrieving elements of a #svn_dirent_t can be + * expensive, you need to select them individually via flags set in + * @a dirent_fields. + * + * @a patterns is an optional array of <tt>const char *</tt>. If it is + * not @c NULL, only those directory entries will be reported whose last + * path segment matches at least one of these patterns. This feature uses + * apr_fnmatch() for glob matching and requiring '.' to matched by dots + * in the path. + * + * @a path must point to a directory and @a depth must be at least + * #svn_depth_empty. + * + * If the server doesn't support the 'list' command, return + * #SVN_ERR_UNSUPPORTED_FEATURE in preference to any other error that + * might otherwise be returned. + * + * Use @a scratch_pool for temporary memory allocation. + * + * @since New in 1.10. + */ +svn_error_t * +svn_ra_list(svn_ra_session_t *session, + const char *path, + svn_revnum_t revision, + const apr_array_header_t *patterns, + svn_depth_t depth, + apr_uint32_t dirent_fields, + svn_ra_dirent_receiver_t receiver, + void *receiver_baton, + apr_pool_t *scratch_pool); + +/** * Set @a *catalog to a mergeinfo catalog for the paths in @a paths. * If no mergeinfo is available, set @a *catalog to @c NULL. The * requested mergeinfo hashes are for @a paths (which are relative to @@ -1550,7 +1607,7 @@ svn_ra_do_diff(svn_ra_session_t *session, * revisions in which at least one of @a paths was changed (i.e., if * file, text or props changed; if dir, props changed or an entry * was added or deleted). Each path is an <tt>const char *</tt>, relative - * to the @a session's common parent. + * to the repository root of @a session. * * If @a limit is greater than zero only invoke @a receiver on the first * @a limit logs. @@ -1717,9 +1774,10 @@ svn_ra_get_repos_root(svn_ra_session_t *session, /** * Set @a *locations to the locations (at the repository revisions * @a location_revisions) of the file identified by @a path in - * @a peg_revision. @a path is relative to the URL to which - * @a session was opened. @a location_revisions is an array of - * @c svn_revnum_t's. @a *locations will be a mapping from the revisions to + * @a peg_revision (passing @c SVN_INVALID_REVNUM is an error). + * @a path is relative to the URL to which @a session was opened. + * @a location_revisions is an array of @c svn_revnum_t's. + * @a *locations will be a mapping from the revisions to * their appropriate absolute paths. If the file doesn't exist in a * location_revision, that revision will be ignored. * @@ -1966,7 +2024,7 @@ svn_ra_get_locks(svn_ra_session_t *session, /** * Replay the changes from a range of revisions between @a start_revision - * and @a end_revision. + * and @a end_revision (inclusive). * * When receiving information for one revision, a callback @a revstart_func is * called; this callback will provide an editor and baton through which the @@ -2174,6 +2232,13 @@ svn_ra_has_capability(svn_ra_session_t *session, */ #define SVN_RA_CAPABILITY_GET_FILE_REVS_REVERSE "get-file-revs-reversed" +/** + * The capability of a server to understand the list command. + * + * @since New in 1.10. + */ +#define SVN_RA_CAPABILITY_LIST "list" + /* *** PLEASE READ THIS IF YOU ADD A NEW CAPABILITY *** * |