Alien-SVN
view release on metacpan or search on metacpan
src/subversion/subversion/libsvn_client/prop_commands.c view on Meta::CPAN
_("'%s' is not under version control"),
svn_dirent_local_style(target,
scratch_pool));
}
err = svn_client__get_revision_number(&revnum, NULL, ctx->wc_ctx,
target, NULL, revision,
scratch_pool);
if (err && err->apr_err == SVN_ERR_CLIENT_BAD_REVISION)
{
svn_error_clear(err);
revnum = SVN_INVALID_REVNUM;
}
else if (err)
return svn_error_trace(err);
if (inherited_props && local_iprops)
{
const char *repos_root_url;
SVN_ERR(svn_wc__get_iprops(inherited_props, ctx->wc_ctx,
target, propname,
result_pool, scratch_pool));
SVN_ERR(svn_client_get_repos_root(&repos_root_url, NULL,
target, ctx, scratch_pool,
scratch_pool));
SVN_ERR(svn_client__iprop_relpaths_to_urls(*inherited_props,
repos_root_url,
result_pool,
scratch_pool));
}
SVN_ERR(get_prop_from_wc(props, propname, target,
pristine, kind,
depth, changelists, ctx, result_pool,
scratch_pool));
}
if ((inherited_props && !local_iprops)
|| !local_explicit_props)
{
svn_ra_session_t *ra_session;
svn_node_kind_t kind;
svn_opt_revision_t new_operative_rev;
svn_opt_revision_t new_peg_rev;
/* Peg or operative revisions may be WC specific for
TARGET's explicit props, but still require us to
contact the repository for the inherited properties. */
if (SVN_CLIENT__REVKIND_NEEDS_WC(peg_revision->kind)
|| SVN_CLIENT__REVKIND_NEEDS_WC(revision->kind))
{
svn_revnum_t origin_rev;
const char *repos_relpath;
const char *repos_root_url;
const char *repos_uuid;
const char *local_abspath;
const char *copy_root_abspath;
svn_boolean_t is_copy;
/* Avoid assertion on the next line when somebody accidentally asks for
a working copy revision on a URL */
if (svn_path_is_url(target))
return svn_error_create(SVN_ERR_CLIENT_VERSIONED_PATH_REQUIRED,
NULL, NULL);
SVN_ERR_ASSERT(svn_dirent_is_absolute(target));
local_abspath = target;
if (SVN_CLIENT__REVKIND_NEEDS_WC(peg_revision->kind))
{
SVN_ERR(svn_wc__node_get_origin(&is_copy,
&origin_rev,
&repos_relpath,
&repos_root_url,
&repos_uuid,
©_root_abspath,
ctx->wc_ctx,
local_abspath,
FALSE, /* scan_deleted */
result_pool,
scratch_pool));
if (repos_relpath)
{
target = svn_path_url_add_component2(repos_root_url,
repos_relpath,
scratch_pool);
if (SVN_CLIENT__REVKIND_NEEDS_WC(peg_revision->kind))
{
svn_revnum_t resolved_peg_rev;
SVN_ERR(svn_client__get_revision_number(
&resolved_peg_rev, NULL, ctx->wc_ctx,
local_abspath, NULL, peg_revision, scratch_pool));
new_peg_rev.kind = svn_opt_revision_number;
new_peg_rev.value.number = resolved_peg_rev;
peg_revision = &new_peg_rev;
}
if (SVN_CLIENT__REVKIND_NEEDS_WC(revision->kind))
{
svn_revnum_t resolved_operative_rev;
SVN_ERR(svn_client__get_revision_number(
&resolved_operative_rev, NULL, ctx->wc_ctx,
local_abspath, NULL, revision, scratch_pool));
new_operative_rev.kind = svn_opt_revision_number;
new_operative_rev.value.number = resolved_operative_rev;
revision = &new_operative_rev;
}
}
else
{
/* TARGET doesn't exist in the repository, so there are
obviously not inherited props to be found there. */
local_iprops = TRUE;
*inherited_props = apr_array_make(
result_pool, 0, sizeof(svn_prop_inherited_item_t *));
}
}
}
src/subversion/subversion/libsvn_client/prop_commands.c view on Meta::CPAN
NULL /* prop_hash */,
b->iprops,
scratch_pool));
b->iprops = NULL;
}
/* Attempt to convert absolute paths to relative paths for
* presentation purposes, if needed. */
if (b->anchor && b->anchor_abspath)
{
path = svn_dirent_join(b->anchor,
svn_dirent_skip_ancestor(b->anchor_abspath,
local_abspath),
scratch_pool);
}
else
path = local_abspath;
return svn_error_trace(b->wrapped_receiver(b->wrapped_receiver_baton,
path, props, iprops,
scratch_pool));
}
/* Helper for svn_client_proplist4 when retrieving properties and/or
inherited properties from the repository. Except as noted below,
all arguments are as per svn_client_proplist4.
GET_EXPLICIT_PROPS controls if explicit props are retrieved. */
static svn_error_t *
get_remote_props(const char *path_or_url,
const svn_opt_revision_t *peg_revision,
const svn_opt_revision_t *revision,
svn_depth_t depth,
svn_boolean_t get_explicit_props,
svn_boolean_t get_target_inherited_props,
svn_proplist_receiver2_t receiver,
void *receiver_baton,
svn_client_ctx_t *ctx,
apr_pool_t *scratch_pool)
{
svn_ra_session_t *ra_session;
svn_node_kind_t kind;
svn_opt_revision_t new_operative_rev;
svn_opt_revision_t new_peg_rev;
svn_client__pathrev_t *loc;
/* Peg or operative revisions may be WC specific for
PATH_OR_URL's explicit props, but still require us to
contact the repository for the inherited properties. */
if (SVN_CLIENT__REVKIND_NEEDS_WC(peg_revision->kind)
|| SVN_CLIENT__REVKIND_NEEDS_WC(revision->kind))
{
svn_revnum_t origin_rev;
const char *repos_relpath;
const char *repos_root_url;
const char *repos_uuid;
const char *local_abspath;
const char *copy_root_abspath;
svn_boolean_t is_copy;
/* Avoid assertion on the next line when somebody accidentally asks for
a working copy revision on a URL */
if (svn_path_is_url(path_or_url))
return svn_error_create(SVN_ERR_CLIENT_VERSIONED_PATH_REQUIRED,
NULL, NULL);
SVN_ERR(svn_dirent_get_absolute(&local_abspath, path_or_url,
scratch_pool));
if (SVN_CLIENT__REVKIND_NEEDS_WC(peg_revision->kind))
{
SVN_ERR(svn_wc__node_get_origin(&is_copy,
&origin_rev,
&repos_relpath,
&repos_root_url,
&repos_uuid,
©_root_abspath,
ctx->wc_ctx,
local_abspath,
FALSE, /* scan_deleted */
scratch_pool,
scratch_pool));
if (repos_relpath)
{
path_or_url =
svn_path_url_add_component2(repos_root_url,
repos_relpath,
scratch_pool);
if (SVN_CLIENT__REVKIND_NEEDS_WC(peg_revision->kind))
{
svn_revnum_t resolved_peg_rev;
SVN_ERR(svn_client__get_revision_number(&resolved_peg_rev,
NULL, ctx->wc_ctx,
local_abspath, NULL,
peg_revision,
scratch_pool));
new_peg_rev.kind = svn_opt_revision_number;
new_peg_rev.value.number = resolved_peg_rev;
peg_revision = &new_peg_rev;
}
if (SVN_CLIENT__REVKIND_NEEDS_WC(revision->kind))
{
svn_revnum_t resolved_operative_rev;
SVN_ERR(svn_client__get_revision_number(
&resolved_operative_rev,
NULL, ctx->wc_ctx,
local_abspath, NULL,
revision,
scratch_pool));
new_operative_rev.kind = svn_opt_revision_number;
new_operative_rev.value.number = resolved_operative_rev;
revision = &new_operative_rev;
}
}
else
{
/* PATH_OR_URL doesn't exist in the repository, so there are
obviously not inherited props to be found there. If we
( run in 0.437 second using v1.01-cache-2.11-cpan-524268b4103 )