FreeBSD/contrib/subversion/subversion/libsvn_ra_serf/property.c
/*
 * Contact the server (using CONN) to calculate baseline
 * information for BASELINE_URL at REVISION (which may be
 * SVN_INVALID_REVNUM to query the HEAD revision).
 *
 * If ACTUAL_REVISION is non-NULL, set *ACTUAL_REVISION to revision
 * retrieved from the server as part of this process (which should
 * match REVISION when REVISION is valid).  Set *BASECOLL_URL_P to the
 * baseline collection URL.
 */
Contact the server (using CONN) to calculate baseline
information for BASELINE_URL at REVISION (which may be
SVN_INVALID_REVNUM to query the HEAD revision).

If ACTUAL_REVISION is non-NULL, set *ACTUAL_REVISION to revision
retrieved from the server as part of this process (which should
match REVISION when REVISION is valid).  Set *BASECOLL_URL_P to the
baseline collection URL.
Contact the server ( using CONN ) to calculate baseline information for BASELINE_URL at REVISION ( which may be SVN_INVALID_REVNUM to query the HEAD revision ) . If ACTUAL_REVISION is non - NULL set * ACTUAL_REVISION to revision retrieved from the server as part of this process ( which should match REVISION when REVISION is valid ) . Set * BASECOLL_URL_P to the baseline collection URL .
static svn_error_t *
retrieve_baseline_info(svn_revnum_t *actual_revision,
                       const char **basecoll_url_p,
                       svn_ra_serf__session_t *session,
                       const char *baseline_url,
                       svn_revnum_t revision,
                       apr_pool_t *result_pool,
                       apr_pool_t *scratch_pool)
{
  apr_hash_t *props;
  apr_hash_t *dav_props;
  const char *basecoll_url;
  SVN_ERR(svn_ra_serf__fetch_node_props(&props, session,
                                        baseline_url, revision,
                                        baseline_props,
                                        scratch_pool, scratch_pool));
  dav_props = apr_hash_get(props, "DAV:", 4);
  basecoll_url = svn_prop_get_value(dav_props, "baseline-collection");
  if (!basecoll_url)
    {
      return svn_error_create(SVN_ERR_RA_DAV_PROPS_NOT_FOUND, NULL,
                              _("The PROPFIND response did not include "
                                "the requested baseline-collection value"));
    }
  *basecoll_url_p = svn_urlpath__canonicalize(basecoll_url, result_pool);
  if (actual_revision)
    {
      const char *version_name;
      version_name = svn_prop_get_value(dav_props, SVN_DAV__VERSION_NAME);
      if (version_name)
        {
          apr_int64_t rev;
          SVN_ERR(svn_cstring_atoi64(&rev, version_name));
          *actual_revision = (svn_revnum_t)rev;
        }
      if (!version_name || !SVN_IS_VALID_REVNUM(*actual_revision))
        return svn_error_create(SVN_ERR_RA_DAV_PROPS_NOT_FOUND, NULL,
                                _("The PROPFIND response did not include "
                                  "the requested version-name value"));
    }
  return SVN_NO_ERROR;
}
static svn_error_t * retrieve_baseline_info ( svn_revnum_t * actual_revision , const char * * basecoll_url_p , svn_ra_serf__session_t * session , const char * baseline_url , svn_revnum_t revision , apr_pool_t * result_pool , apr_pool_t * scratch_pool ) { apr_hash_t * props ; apr_hash_t * dav_props ; const char * basecoll_url ; SVN_ERR ( svn_ra_serf__fetch_node_props ( & props , session , baseline_url , revision , baseline_props , scratch_pool , scratch_pool ) ) ; dav_props = apr_hash_get ( props , " " , 4 ) ; basecoll_url = svn_prop_get_value ( dav_props , " " ) ; if ( ! basecoll_url ) { return svn_error_create ( SVN_ERR_RA_DAV_PROPS_NOT_FOUND , NULL , _ ( " " " " ) ) ; } * basecoll_url_p = svn_urlpath__canonicalize ( basecoll_url , result_pool ) ; if ( actual_revision ) { const char * version_name ; version_name = svn_prop_get_value ( dav_props , SVN_DAV__VERSION_NAME ) ; if ( version_name ) { apr_int64_t rev ; SVN_ERR ( svn_cstring_atoi64 ( & rev , version_name ) ) ; * actual_revision = ( svn_revnum_t ) rev ; } if ( ! version_name || ! SVN_IS_VALID_REVNUM ( * actual_revision ) ) return svn_error_create ( SVN_ERR_RA_DAV_PROPS_NOT_FOUND , NULL , _ ( " " " " ) ) ; } return SVN_NO_ERROR ; }
Contact the server (using CONN) to calculate baseline
 information for BASELINE_URL at REVISION (which may be
 SVN_INVALID_REVNUM to query the HEAD revision).
Contact the server ( using CONN ) to calculate baseline information for BASELINE_URL at REVISION ( which may be SVN_INVALID_REVNUM to query the HEAD revision ) .
/* If DAV_PROPS is NULL, then svn_prop_get_value() will return NULL.  */