FreeBSD/contrib/subversion/subversion/libsvn_repos/repos.c
/* Verify that REPOS's format is suitable.
   Use POOL for temporary allocation. */
Verify that REPOS's format is suitable.
Use POOL for temporary allocation.
Verify that REPOS ' s format is suitable . Use POOL for temporary allocation .
static svn_error_t *
check_repos_format(svn_repos_t *repos,
                   apr_pool_t *pool)
{
  int format;
  const char *format_path;
  format_path = svn_dirent_join(repos->path, SVN_REPOS__FORMAT, pool);
  SVN_ERR(svn_io_read_version_file(&format, format_path, pool));
  if (format != SVN_REPOS__FORMAT_NUMBER &&
      format != SVN_REPOS__FORMAT_NUMBER_LEGACY)
    {
      return svn_error_createf
        (SVN_ERR_REPOS_UNSUPPORTED_VERSION, NULL,
         _("Expected repository format '%d' or '%d'; found format '%d'"),
         SVN_REPOS__FORMAT_NUMBER_LEGACY, SVN_REPOS__FORMAT_NUMBER,
         format);
    }
  repos->format = format;
  return SVN_NO_ERROR;
}
static svn_error_t * check_repos_format ( svn_repos_t * repos , apr_pool_t * pool ) { int format ; const char * format_path ; format_path = svn_dirent_join ( repos -> path , SVN_REPOS__FORMAT , pool ) ; SVN_ERR ( svn_io_read_version_file ( & format , format_path , pool ) ) ; if ( format != SVN_REPOS__FORMAT_NUMBER && format != SVN_REPOS__FORMAT_NUMBER_LEGACY ) { return svn_error_createf ( SVN_ERR_REPOS_UNSUPPORTED_VERSION , NULL , _ ( " " ) , SVN_REPOS__FORMAT_NUMBER_LEGACY , SVN_REPOS__FORMAT_NUMBER , format ) ; } repos -> format = format ; return SVN_NO_ERROR ; }
Verify that REPOS's format is suitable.
Verify that REPOS ' s format is suitable .