svn_repos_get_file_revs2

Function svn_repos_get_file_revs2 

Source
pub unsafe extern "C" fn svn_repos_get_file_revs2(
    repos: *mut svn_repos_t,
    path: *const c_char,
    start: svn_revnum_t,
    end: svn_revnum_t,
    include_merged_revisions: svn_boolean_t,
    authz_read_func: svn_repos_authz_func_t,
    authz_read_baton: *mut c_void,
    handler: svn_file_rev_handler_t,
    handler_baton: *mut c_void,
    pool: *mut apr_pool_t,
) -> *mut svn_error_t
Expand description

Retrieve a subset of the interesting revisions of a file @a path in @a repos as seen in revision @a end. Invoke @a handler with @a handler_baton as its first argument for each such revision. @a pool is used for all allocations. See svn_fs_history_prev() for a discussion of interesting revisions.

If optional @a authz_read_func is non-NULL, then use this function (along with optional @a authz_read_baton) to check the readability of the rev-path in each interesting revision encountered.

Revision discovery happens from @a end to @a start, and if an unreadable revision is encountered before @a start is reached, then revision discovery stops and only the revisions from @a end to the oldest readable revision are returned (So it will appear that @a path was added without history in the latter revision).

If there is an interesting revision of the file that is less than or equal to start, the iteration will start at that revision. Else, the iteration will start at the first revision of the file in the repository, which has to be less than or equal to end. Note that if the function succeeds, @a handler will have been called at least once.

In a series of calls, the file contents for the first interesting revision will be provided as a text delta against the empty file. In the following calls, the delta will be against the contents for the previous call.

If @a include_merged_revisions is TRUE, revisions which a included as a result of a merge between @a start and @a end will be included.

Since Subversion 1.8 this function has been enabled to support reversion the revision range for @a include_merged_revision @c FALSE reporting by switching @a start with @a end.

@note Prior to Subversion 1.9, this function may request delta handlers from @a handler even for empty text deltas. Starting with 1.9, the delta handler / baton return arguments passed to @a handler will be NULL unless there is an actual difference in the file contents between the current and the previous call.

@since New in 1.5.