FreeBSD/contrib/subversion/subversion/svnbench/null-info-cmd.c
/* Stripped-down version of svn_client_info3 */
Stripped-down version of svn_client_info3
Stripped - down version of svn_client_info3
static svn_error_t *
client_info(const char *abspath_or_url,
            const svn_opt_revision_t *peg_revision,
            const svn_opt_revision_t *revision,
            svn_depth_t depth,
            svn_boolean_t fetch_excluded,
            svn_boolean_t fetch_actual_only,
            const apr_array_header_t *changelists,
            int *counter,
            svn_client_ctx_t *ctx,
            apr_pool_t *pool)
{
  svn_ra_session_t *ra_session;
  svn_client__pathrev_t *pathrev;
  svn_lock_t *lock;
  const char *base_name;
  svn_dirent_t *the_ent;
  svn_error_t *err;
  if (depth == svn_depth_unknown)
    depth = svn_depth_empty;
  SVN_ERR(svn_client__ra_session_from_path2(&ra_session, &pathrev,
                                            abspath_or_url, NULL, peg_revision,
                                            revision, ctx, pool));
  svn_uri_split(NULL, &base_name, pathrev->url, pool);
  SVN_ERR(svn_ra_stat(ra_session, "", pathrev->rev, &the_ent, pool));
  if (! the_ent)
    return svn_error_createf(SVN_ERR_RA_ILLEGAL_URL, NULL,
                             _("URL '%s' non-existent in revision %ld"),
                             pathrev->url, pathrev->rev);
  err = svn_ra_get_lock(ra_session, &lock, "", pool);
  if (err && err->apr_err == SVN_ERR_RA_NOT_IMPLEMENTED)
    {
      svn_error_clear(err);
      lock = NULL;
    }
  else if (err)
    return svn_error_trace(err);
  ++(*counter);
  if (depth > svn_depth_empty && (the_ent->kind == svn_node_dir))
    {
      apr_hash_t *locks;
      if (peg_revision->kind == svn_opt_revision_head)
        {
          err = svn_ra_get_locks2(ra_session, &locks, "", depth, pool);
          if (err &&
              (err->apr_err == SVN_ERR_RA_NOT_IMPLEMENTED
               || err->apr_err == SVN_ERR_UNSUPPORTED_FEATURE))
            svn_error_clear(err);
          else if (err)
            return svn_error_trace(err);
        }
      SVN_ERR(push_dir_info(ra_session, pathrev, "",
                            counter, depth, ctx, pool));
    }
  return SVN_NO_ERROR;
}
static svn_error_t * client_info ( const char * abspath_or_url , const svn_opt_revision_t * peg_revision , const svn_opt_revision_t * revision , svn_depth_t depth , svn_boolean_t fetch_excluded , svn_boolean_t fetch_actual_only , const apr_array_header_t * changelists , int * counter , svn_client_ctx_t * ctx , apr_pool_t * pool ) { svn_ra_session_t * ra_session ; svn_client__pathrev_t * pathrev ; svn_lock_t * lock ; const char * base_name ; svn_dirent_t * the_ent ; svn_error_t * err ; if ( depth == svn_depth_unknown ) depth = svn_depth_empty ; SVN_ERR ( svn_client__ra_session_from_path2 ( & ra_session , & pathrev , abspath_or_url , NULL , peg_revision , revision , ctx , pool ) ) ; svn_uri_split ( NULL , & base_name , pathrev -> url , pool ) ; SVN_ERR ( svn_ra_stat ( ra_session , " " , pathrev -> rev , & the_ent , pool ) ) ; if ( ! the_ent ) return svn_error_createf ( SVN_ERR_RA_ILLEGAL_URL , NULL , _ ( " " ) , pathrev -> url , pathrev -> rev ) ; err = svn_ra_get_lock ( ra_session , & lock , " " , pool ) ; if ( err && err -> apr_err == SVN_ERR_RA_NOT_IMPLEMENTED ) { svn_error_clear ( err ) ; lock = NULL ; } else if ( err ) return svn_error_trace ( err ) ; ++ ( * counter ) ; if ( depth > svn_depth_empty && ( the_ent -> kind == svn_node_dir ) ) { apr_hash_t * locks ; if ( peg_revision -> kind == svn_opt_revision_head ) { err = svn_ra_get_locks2 ( ra_session , & locks , " " , depth , pool ) ; if ( err && ( err -> apr_err == SVN_ERR_RA_NOT_IMPLEMENTED || err -> apr_err == SVN_ERR_UNSUPPORTED_FEATURE ) ) svn_error_clear ( err ) ; else if ( err ) return svn_error_trace ( err ) ; } SVN_ERR ( push_dir_info ( ra_session , pathrev , " " , counter , depth , ctx , pool ) ) ; } return SVN_NO_ERROR ; }
Stripped-down version of svn_client_info3
Stripped - down version of svn_client_info3
/* Go repository digging instead. */ /* Trace rename history (starting at path_or_url@peg_revision) and
     return RA session to the possibly-renamed URL as it exists in REVISION.
     The ra_session returned will be anchored on this "final" URL. */ /* Get the dirent for the URL itself. */ /* check for locks */ /* An old mod_dav_svn will always work; there's nothing wrong with
      doing a PROPFIND for a property named "DAV:supportedlock". But
      an old svnserve will error. */ /* Push the URL's dirent (and lock) at the callback.*/ /* Possibly recurse, using the original RA session. */ /* Catch specific errors thrown by old mod_dav_svn or svnserve. */