234
234
/** The structure of a revision is being verified. @since New in 1.8. */
235
235
svn_repos_notify_verify_rev_structure,
237
/** A revision is found with corruption/errors. @since New in 1.9. */
238
svn_repos_notify_failure,
240
237
/** A revprop shard got packed. @since New in 1.9. */
241
238
svn_repos_notify_pack_revprops,
348
345
/** For #svn_repos_notify_load_node_start, the path of the node. */
349
346
const char *path;
351
/** For #svn_repos_notify_failure, this error chain indicates what
352
went wrong during verification.
353
@since New in 1.9. */
356
348
/** For #svn_repos_notify_hotcopy_rev_range, the start of the copied
358
350
@since New in 1.9. */
2825
2817
svn_repos_load_uuid_force
2820
/** Callback type for use with svn_repos_verify_fs3(). @a revision
2821
* and @a verify_err are the details of a single verification failure
2822
* that occurred during the svn_repos_verify_fs3() call. @a baton is
2823
* the same baton given to svn_repos_verify_fs3(). @a scratch_pool is
2824
* provided for the convenience of the implementor, who should not
2825
* expect it to live longer than a single callback call.
2827
* @a verify_err will be cleared and becomes invalid after the callback
2828
* returns, use svn_error_dup() to preserve the error. If a callback uses
2829
* @a verify_err as the return value or as a part of the return value, it
2830
* should also call svn_error_dup() for @a verify_err. Implementors of this
2831
* callback are forbidden to call svn_error_clear() for @a verify_err.
2833
* @see svn_repos_verify_fs3
2835
* @since New in 1.9.
2837
typedef svn_error_t *(*svn_repos_verify_callback_t)(void *baton,
2838
svn_revnum_t revision,
2839
svn_error_t *verify_err,
2840
apr_pool_t *scratch_pool);
2829
2843
* Verify the contents of the file system in @a repos.
2835
2849
* range, then also verify "global invariants" of the repository, as
2836
2850
* described in svn_fs_verify().
2838
* When a failure is found, if @a keep_going is @c TRUE then continue
2839
* verification from the next revision, otherwise stop.
2841
2852
* If @a check_normalization is @c TRUE, report any name collisions
2842
2853
* within the same directory or svn:mergeinfo property where the names
2843
2854
* differ only in character representation, but are otherwise
2848
2859
* file context reconstruction and verification. For FSFS format 7+ and
2849
2860
* FSX, this allows for a very fast check against external corruption.
2862
* If @a verify_callback is not @c NULL, call it with @a verify_baton upon
2863
* receiving an FS-specific structure failure or a revision verification
2864
* failure. Set @c revision callback argument to #SVN_INVALID_REVNUM or
2865
* to the revision number respectively. Set @c verify_err to svn_error_t
2866
* describing the reason of the failure. @c verify_err will be cleared
2867
* after the callback returns, use svn_error_dup() to preserve the error.
2868
* If @a verify_callback returns an error different from #SVN_NO_ERROR,
2869
* stop verifying the repository and immediately return the error from
2870
* @a verify_callback.
2872
* If @a verify_callback is @c NULL, this function returns the first
2873
* encountered verification error or #SVN_NO_ERROR if there were no failures
2874
* during the verification. Errors that prevent the verification process
2875
* from continuing, such as #SVN_ERR_CANCELLED, are returned immediately
2876
* and do not trigger an invocation of @a verify_callback.
2851
2878
* If @a notify_func is not null, then call it with @a notify_baton and
2852
2879
* with a notification structure in which the fields are set as follows.
2853
* (For a warning or error notification that does not apply to a specific
2854
* revision, the revision number is #SVN_INVALID_REVNUM.)
2880
* (For a warning that does not apply to a specific revision, the revision
2881
* number is #SVN_INVALID_REVNUM.)
2856
2883
* For each FS-specific structure warning:
2857
2884
* @c action = svn_repos_notify_verify_rev_structure
2858
2885
* @c revision = the revision or #SVN_INVALID_REVNUM
2860
* For a FS-specific structure failure:
2861
* @c action = #svn_repos_notify_failure
2862
* @c revision = #SVN_INVALID_REVNUM
2863
* @c err = the corresponding error chain
2865
* For each revision verification failure:
2866
* @c action = #svn_repos_notify_failure
2867
* @c revision = the revision
2868
* @c err = the corresponding error chain
2870
2887
* For each revision verification warning:
2871
2888
* @c action = #svn_repos_notify_warning
2872
2889
* @c warning and @c warning_str fields set accordingly
2889
2906
* Use @a scratch_pool for temporary allocation.
2891
* Return an error if there were any failures during verification, or
2892
* #SVN_NO_ERROR if there were no failures. A failure means an event that,
2893
* if a notification callback were provided, would send a notification
2894
* with @c action = #svn_repos_notify_failure.
2908
* @see svn_repos_verify_callback_t
2896
2910
* @since New in 1.9.
2899
2913
svn_repos_verify_fs3(svn_repos_t *repos,
2900
2914
svn_revnum_t start_rev,
2901
2915
svn_revnum_t end_rev,
2902
svn_boolean_t keep_going,
2903
2916
svn_boolean_t check_normalization,
2904
2917
svn_boolean_t metadata_only,
2905
2918
svn_repos_notify_func_t notify_func,
2906
2919
void *notify_baton,
2920
svn_repos_verify_callback_t verify_callback,
2907
2922
svn_cancel_func_t cancel,
2908
2923
void *cancel_baton,
2909
2924
apr_pool_t *scratch_pool);
2912
* Like svn_repos_verify_fs3(), but with @a keep_going,
2913
* @a check_normalization and @a metadata_only set to @c FALSE.
2927
* Like svn_repos_verify_fs3(), but with @a verify_callback and
2928
* @a verify_baton set to @c NULL and with @a check_normalization
2929
* and @a metadata_only set to @c FALSE.
2915
2931
* @since New in 1.7.
2916
2932
* @deprecated Provided for backward compatibility with the 1.8 API.