FreeBSD/contrib/subversion/subversion/libsvn_client/info.c
/* Set *SAME_P to TRUE if URL exists in the head of the repository and
   refers to the same resource as it does in REV, using POOL for
   temporary allocations.  RA_SESSION is an open RA session for URL.  */
Set *SAME_P to TRUE if URL exists in the head of the repository and
refers to the same resource as it does in REV, using POOL for
temporary allocations.  RA_SESSION is an open RA session for URL.
Set * SAME_P to TRUE if URL exists in the head of the repository and refers to the same resource as it does in REV using POOL for temporary allocations . RA_SESSION is an open RA session for URL .
static svn_error_t *
same_resource_in_head(svn_boolean_t *same_p,
                      const char *url,
                      svn_revnum_t rev,
                      svn_ra_session_t *ra_session,
                      svn_client_ctx_t *ctx,
                      apr_pool_t *pool)
{
  svn_error_t *err;
  svn_opt_revision_t start_rev, peg_rev;
  const char *head_url;
  start_rev.kind = svn_opt_revision_head;
  peg_rev.kind = svn_opt_revision_number;
  peg_rev.value.number = rev;
  err = svn_client__repos_locations(&head_url, NULL, NULL, NULL,
                                    ra_session,
                                    url, &peg_rev,
                                    &start_rev, NULL,
                                    ctx, pool);
  if (err &&
      ((err->apr_err == SVN_ERR_CLIENT_UNRELATED_RESOURCES) ||
       (err->apr_err == SVN_ERR_FS_NOT_FOUND)))
    {
      svn_error_clear(err);
      *same_p = FALSE;
      return SVN_NO_ERROR;
    }
  else
    SVN_ERR(err);
  *same_p = (strcmp(url, head_url) == 0);
  return SVN_NO_ERROR;
}
static svn_error_t * same_resource_in_head ( svn_boolean_t * same_p , const char * url , svn_revnum_t rev , svn_ra_session_t * ra_session , svn_client_ctx_t * ctx , apr_pool_t * pool ) { svn_error_t * err ; svn_opt_revision_t start_rev , peg_rev ; const char * head_url ; start_rev . kind = svn_opt_revision_head ; peg_rev . kind = svn_opt_revision_number ; peg_rev . value . number = rev ; err = svn_client__repos_locations ( & head_url , NULL , NULL , NULL , ra_session , url , & peg_rev , & start_rev , NULL , ctx , pool ) ; if ( err && ( ( err -> apr_err == SVN_ERR_CLIENT_UNRELATED_RESOURCES ) || ( err -> apr_err == SVN_ERR_FS_NOT_FOUND ) ) ) { svn_error_clear ( err ) ; * same_p = FALSE ; return SVN_NO_ERROR ; } else SVN_ERR ( err ) ; * same_p = ( strcmp ( url , head_url ) == 0 ) ; return SVN_NO_ERROR ; }
Set *SAME_P to TRUE if URL exists in the head of the repository and
refers to the same resource as it does in REV, using POOL for
temporary allocations.
Set * SAME_P to TRUE if URL exists in the head of the repository and refers to the same resource as it does in REV using POOL for temporary allocations .
/* ### Currently, the URLs should always be equal, since we can't
     ### walk forwards in history. */