FreeBSD/contrib/subversion/subversion/libsvn_ra_serf/serf.c
/* TODO: to fetch the uuid from the repository, we need:
   1. a path that exists in HEAD
   2. a path that's readable

   get_uuid handles the case where a path doesn't exist in HEAD and also the
   case where the root of the repository is not readable.
   However, it does not handle the case where we're fetching path not existing
   in HEAD of a repository with unreadable root directory.

   Implements svn_ra__vtable_t.get_uuid().
 */
to fetch the uuid from the repository, we need:
1. a path that exists in HEAD
2. a path that's readable

get_uuid handles the case where a path doesn't exist in HEAD and also the
case where the root of the repository is not readable.
However, it does not handle the case where we're fetching path not existing
in HEAD of a repository with unreadable root directory.


to fetch the uuid from the repository we need : 1 . a path that exists in HEAD 2 . a path that ' s readable get_uuid handles the case where a path doesn ' t exist in HEAD and also the case where the root of the repository is not readable . However it does not handle the case where we ' re fetching path not existing in HEAD of a repository with unreadable root directory .
static svn_error_t *
svn_ra_serf__get_uuid(svn_ra_session_t *ra_session,
                      const char **uuid,
                      apr_pool_t *pool)
{
  svn_ra_serf__session_t *session = ra_session->priv;
  if (!session->uuid)
    {
      const char *vcc_url;
      SVN_ERR_ASSERT(! SVN_RA_SERF__HAVE_HTTPV2_SUPPORT(session));
      SVN_ERR(svn_ra_serf__discover_vcc(&vcc_url, session, pool));
      if (!session->uuid)
        {
          return svn_error_create(SVN_ERR_RA_DAV_RESPONSE_HEADER_BADNESS, NULL,
                                  _("The UUID property was not found on the "
                                    "resource or any of its parents"));
        }
    }
  *uuid = session->uuid;
  return SVN_NO_ERROR;
}
static svn_error_t * svn_ra_serf__get_uuid ( svn_ra_session_t * ra_session , const char * * uuid , apr_pool_t * pool ) { svn_ra_serf__session_t * session = ra_session -> priv ; if ( ! session -> uuid ) { const char * vcc_url ; SVN_ERR_ASSERT ( ! SVN_RA_SERF__HAVE_HTTPV2_SUPPORT ( session ) ) ; SVN_ERR ( svn_ra_serf__discover_vcc ( & vcc_url , session , pool ) ) ; if ( ! session -> uuid ) { return svn_error_create ( SVN_ERR_RA_DAV_RESPONSE_HEADER_BADNESS , NULL , _ ( " " " " ) ) ; } } * uuid = session -> uuid ; return SVN_NO_ERROR ; }
TODO: to fetch the uuid from the repository, we need:
1. a path that exists in HEAD
2. a path that's readable
TODO : to fetch the uuid from the repository we need : 1 . a path that exists in HEAD 2 . a path that ' s readable
/* We should never get here if we have HTTP v2 support, because
         any server with that support should be transmitting the
         UUID in the initial OPTIONS response.  */ /* We're not interested in vcc_url and relative_url, but this call also
         stores the repository's uuid in the session. */