FreeBSD/contrib/subversion/subversion/libsvn_fs_fs/verify.c
/* Verify the rep cache DB's consistency with our rev / pack data.
 * The function signature is similar to svn_fs_fs__verify.
 * The values of START and END have already been auto-selected and
 * verified.
 */
Verify the rep cache DB's consistency with our rev / pack data.
The function signature is similar to svn_fs_fs__verify.
The values of START and END have already been auto-selected and
verified.
Verify the rep cache DB ' s consistency with our rev / pack data . The function signature is similar to svn_fs_fs__verify . The values of START and END have already been auto - selected and verified .
static svn_error_t *
verify_rep_cache(svn_fs_t *fs,
                 svn_revnum_t start,
                 svn_revnum_t end,
                 svn_fs_progress_notify_func_t notify_func,
                 void *notify_baton,
                 svn_cancel_func_t cancel_func,
                 void *cancel_baton,
                 apr_pool_t *pool)
{
  svn_boolean_t exists;
  SVN_ERR(svn_fs_fs__exists_rep_cache(&exists, fs, pool));
  if (exists)
    {
      verify_walker_baton_t *baton = apr_pcalloc(pool, sizeof(*baton));
      baton->pool = svn_pool_create(pool);
      baton->last_notified_revision = SVN_INVALID_REVNUM;
      baton->notify_func = notify_func;
      baton->notify_baton = notify_baton;
      if (notify_func)
        notify_func(SVN_INVALID_REVNUM, notify_baton, baton->pool);
      SVN_ERR(svn_fs_fs__walk_rep_reference(fs, start, end,
                                            verify_walker, baton,
                                            cancel_func, cancel_baton,
                                            pool));
      svn_pool_destroy(baton->pool);
    }
  return SVN_NO_ERROR;
}
static svn_error_t * verify_rep_cache ( svn_fs_t * fs , svn_revnum_t start , svn_revnum_t end , svn_fs_progress_notify_func_t notify_func , void * notify_baton , svn_cancel_func_t cancel_func , void * cancel_baton , apr_pool_t * pool ) { svn_boolean_t exists ; SVN_ERR ( svn_fs_fs__exists_rep_cache ( & exists , fs , pool ) ) ; if ( exists ) { verify_walker_baton_t * baton = apr_pcalloc ( pool , sizeof ( * baton ) ) ; baton -> pool = svn_pool_create ( pool ) ; baton -> last_notified_revision = SVN_INVALID_REVNUM ; baton -> notify_func = notify_func ; baton -> notify_baton = notify_baton ; if ( notify_func ) notify_func ( SVN_INVALID_REVNUM , notify_baton , baton -> pool ) ; SVN_ERR ( svn_fs_fs__walk_rep_reference ( fs , start , end , verify_walker , baton , cancel_func , cancel_baton , pool ) ) ; svn_pool_destroy ( baton -> pool ) ; } return SVN_NO_ERROR ; }
Verify the rep cache DB's consistency with our rev / pack data.
Verify the rep cache DB ' s consistency with our rev / pack data .
/* rep-cache verification. */ /* provide a baton to allow the reuse of open file handles between
         iterations (saves 2/3 of OS level file operations). */ /* tell the user that we are now ready to do *something* */ /* Do not attempt to walk the rep-cache database if its file does
         not exist,  since doing so would create it --- which may confuse
         the administrator.   Don't take any lock. */ /* walker resource cleanup */