You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by st...@apache.org on 2011/07/20 01:06:07 UTC
svn commit: r1148581 [8/12] - in
/subversion/branches/gpg-agent-password-store: ./ build/ build/ac-macros/
build/generator/ build/generator/templates/ contrib/hook-scripts/
contrib/hook-scripts/enforcer/ contrib/server-side/
contrib/server-side/fsfsfix...
Modified: subversion/branches/gpg-agent-password-store/subversion/libsvn_wc/node.c
URL: http://svn.apache.org/viewvc/subversion/branches/gpg-agent-password-store/subversion/libsvn_wc/node.c?rev=1148581&r1=1148580&r2=1148581&view=diff
==============================================================================
--- subversion/branches/gpg-agent-password-store/subversion/libsvn_wc/node.c (original)
+++ subversion/branches/gpg-agent-password-store/subversion/libsvn_wc/node.c Tue Jul 19 23:05:44 2011
@@ -352,7 +352,7 @@ svn_wc__node_get_url(const char **url,
apr_pool_t *scratch_pool)
{
return svn_error_trace(svn_wc__db_read_url(url, wc_ctx->db, local_abspath,
- result_pool, scratch_pool));
+ result_pool, scratch_pool));
}
/* ### This is essentially a copy-paste of svn_wc__internal_get_url().
@@ -885,7 +885,7 @@ svn_wc__node_get_base_rev(svn_revnum_t *
apr_pool_t *scratch_pool)
{
return svn_error_trace(get_base_rev(base_revision, wc_ctx->db,
- local_abspath, scratch_pool));
+ local_abspath, scratch_pool));
}
svn_error_t *
@@ -1035,8 +1035,8 @@ svn_wc__node_get_commit_base_rev(svn_rev
apr_pool_t *scratch_pool)
{
return svn_error_trace(svn_wc__internal_get_commit_base_rev(
- commit_base_revision, wc_ctx->db, local_abspath,
- scratch_pool));
+ commit_base_revision, wc_ctx->db, local_abspath,
+ scratch_pool));
}
svn_error_t *
@@ -1300,17 +1300,18 @@ svn_wc__node_get_lock_tokens_recursive(a
}
svn_error_t *
-svn_wc__get_absent_subtrees(apr_hash_t **absent_subtrees,
- svn_wc_context_t *wc_ctx,
- const char *local_abspath,
- apr_pool_t *result_pool,
- apr_pool_t *scratch_pool)
+svn_wc__get_server_excluded_subtrees(apr_hash_t **server_excluded_subtrees,
+ svn_wc_context_t *wc_ctx,
+ const char *local_abspath,
+ apr_pool_t *result_pool,
+ apr_pool_t *scratch_pool)
{
- return svn_error_trace(svn_wc__db_get_absent_subtrees(absent_subtrees,
- wc_ctx->db,
- local_abspath,
- result_pool,
- scratch_pool));
+ return svn_error_trace(
+ svn_wc__db_get_server_excluded_subtrees(server_excluded_subtrees,
+ wc_ctx->db,
+ local_abspath,
+ result_pool,
+ scratch_pool));
}
svn_error_t *
@@ -1406,7 +1407,7 @@ svn_wc__internal_get_origin(svn_boolean_
local_abspath),
result_pool);
}
- else /* Deleted, excluded, not-present, absent, ... */
+ else /* Deleted, excluded, not-present, server-excluded, ... */
{
if (is_copy)
*is_copy = FALSE;
@@ -1436,9 +1437,9 @@ svn_wc__node_get_origin(svn_boolean_t *i
apr_pool_t *scratch_pool)
{
return svn_error_trace(svn_wc__internal_get_origin(is_copy, revision,
- repos_relpath, repos_root_url, repos_uuid,
- wc_ctx->db, local_abspath, scan_deleted,
- result_pool, scratch_pool));
+ repos_relpath, repos_root_url, repos_uuid,
+ wc_ctx->db, local_abspath, scan_deleted,
+ result_pool, scratch_pool));
}
svn_error_t *
@@ -1566,11 +1567,11 @@ svn_wc__node_get_md5_from_sha1(const svn
apr_pool_t *scratch_pool)
{
return svn_error_trace(svn_wc__db_pristine_get_md5(md5_checksum,
- wc_ctx->db,
- wri_abspath,
- sha1_checksum,
- result_pool,
- scratch_pool));
+ wc_ctx->db,
+ wri_abspath,
+ sha1_checksum,
+ result_pool,
+ scratch_pool));
}
svn_error_t *
Modified: subversion/branches/gpg-agent-password-store/subversion/libsvn_wc/props.c
URL: http://svn.apache.org/viewvc/subversion/branches/gpg-agent-password-store/subversion/libsvn_wc/props.c?rev=1148581&r1=1148580&r2=1148581&view=diff
==============================================================================
--- subversion/branches/gpg-agent-password-store/subversion/libsvn_wc/props.c (original)
+++ subversion/branches/gpg-agent-password-store/subversion/libsvn_wc/props.c Tue Jul 19 23:05:44 2011
@@ -370,17 +370,17 @@ svn_wc_merge_props3(svn_wc_notify_state_
apr_pool_t *scratch_pool)
{
return svn_error_trace(svn_wc__perform_props_merge(
- state,
- wc_ctx->db,
- local_abspath,
- left_version, right_version,
- baseprops,
- propchanges,
- FALSE /* base_merge */,
- dry_run,
- conflict_func, conflict_baton,
- cancel_func, cancel_baton,
- scratch_pool));
+ state,
+ wc_ctx->db,
+ local_abspath,
+ left_version, right_version,
+ baseprops,
+ propchanges,
+ FALSE /* base_merge */,
+ dry_run,
+ conflict_func, conflict_baton,
+ cancel_func, cancel_baton,
+ scratch_pool));
}
@@ -803,7 +803,6 @@ maybe_generate_propconflict(svn_boolean_
apr_pool_t *scratch_pool)
{
svn_wc_conflict_result_t *result = NULL;
- svn_string_t *mime_propval = NULL;
apr_pool_t *filepool = svn_pool_create(scratch_pool);
svn_wc_conflict_description2_t *cdesc;
const char *dirpath = svn_dirent_dirname(local_abspath, filepool);
@@ -930,12 +929,10 @@ maybe_generate_propconflict(svn_boolean_
}
/* Build the rest of the description object: */
- if (!is_dir && working_props)
- mime_propval = apr_hash_get(working_props, SVN_PROP_MIME_TYPE,
- APR_HASH_KEY_STRING);
- cdesc->mime_type = mime_propval ? mime_propval->data : NULL;
- cdesc->is_binary = mime_propval ?
- svn_mime_type_is_binary(mime_propval->data) : FALSE;
+ cdesc->mime_type = (is_dir ? NULL : svn_prop_get_value(working_props,
+ SVN_PROP_MIME_TYPE));
+ cdesc->is_binary = (cdesc->mime_type
+ && svn_mime_type_is_binary(cdesc->mime_type));
if (!incoming_old_val && incoming_new_val)
cdesc->action = svn_wc_conflict_action_add;
@@ -1396,7 +1393,9 @@ apply_single_generic_prop_change(svn_wc_
if (working_val && new_val
&& svn_string_compare(working_val, new_val))
{
- set_prop_merge_state(state, svn_wc_notify_state_merged);
+ /* All values identical is a trivial, non-notifiable merge */
+ if (! old_val || ! svn_string_compare(old_val, new_val))
+ set_prop_merge_state(state, svn_wc_notify_state_merged);
}
/* If working_val is the same as old_val... */
else if (working_val && old_val
@@ -1766,8 +1765,8 @@ wcprop_set(svn_wc__db_t *db,
apr_hash_set(prophash, name, APR_HASH_KEY_STRING, value);
return svn_error_trace(svn_wc__db_base_set_dav_cache(db, local_abspath,
- prophash,
- scratch_pool));
+ prophash,
+ scratch_pool));
}
@@ -1785,7 +1784,7 @@ svn_wc__get_actual_props(apr_hash_t **pr
### should not have any ACTUAL props. */
return svn_error_trace(svn_wc__db_read_props(props, db, local_abspath,
- result_pool, scratch_pool));
+ result_pool, scratch_pool));
}
@@ -1797,10 +1796,10 @@ svn_wc_prop_list2(apr_hash_t **props,
apr_pool_t *scratch_pool)
{
return svn_error_trace(svn_wc__get_actual_props(props,
- wc_ctx->db,
- local_abspath,
- result_pool,
- scratch_pool));
+ wc_ctx->db,
+ local_abspath,
+ result_pool,
+ scratch_pool));
}
struct propname_filter_baton_t {
@@ -1965,10 +1964,10 @@ svn_wc_get_pristine_props(apr_hash_t **p
apr_pool_t *scratch_pool)
{
return svn_error_trace(svn_wc__get_pristine_props(props,
- wc_ctx->db,
- local_abspath,
- result_pool,
- scratch_pool));
+ wc_ctx->db,
+ local_abspath,
+ result_pool,
+ scratch_pool));
}
@@ -2435,7 +2434,7 @@ svn_wc_prop_set4(svn_wc_context_t *wc_ct
{
SVN_ERR_ASSERT(depth == svn_depth_empty);
return svn_error_trace(wcprop_set(wc_ctx->db, local_abspath,
- name, value, scratch_pool));
+ name, value, scratch_pool));
}
/* We have to do this little DIR_ABSPATH dance for backwards compat.
Modified: subversion/branches/gpg-agent-password-store/subversion/libsvn_wc/questions.c
URL: http://svn.apache.org/viewvc/subversion/branches/gpg-agent-password-store/subversion/libsvn_wc/questions.c?rev=1148581&r1=1148580&r2=1148581&view=diff
==============================================================================
--- subversion/branches/gpg-agent-password-store/subversion/libsvn_wc/questions.c (original)
+++ subversion/branches/gpg-agent-password-store/subversion/libsvn_wc/questions.c Tue Jul 19 23:05:44 2011
@@ -335,12 +335,22 @@ svn_wc__internal_file_modified_p(svn_boo
scratch_pool, scratch_pool));
/* Check all bytes, and verify checksum if requested. */
- SVN_ERR(compare_and_verify(modified_p, db,
+ {
+ svn_error_t *err;
+ err = compare_and_verify(modified_p, db,
local_abspath, dirent->filesize,
pristine_stream, pristine_size,
has_props, props_mod,
exact_comparison,
- scratch_pool));
+ scratch_pool);
+
+ /* At this point we already opened the pristine file, so we know that
+ the access denied applies to the working copy path */
+ if (err && APR_STATUS_IS_EACCES(err->apr_err))
+ return svn_error_create(SVN_ERR_WC_PATH_ACCESS_DENIED, err, NULL);
+ else
+ SVN_ERR(err);
+ }
if (!*modified_p)
{
@@ -496,11 +506,11 @@ svn_wc_conflicted_p3(svn_boolean_t *text
apr_pool_t *scratch_pool)
{
return svn_error_trace(svn_wc__internal_conflicted_p(text_conflicted_p,
- prop_conflicted_p,
- tree_conflicted_p,
- wc_ctx->db,
- local_abspath,
- scratch_pool));
+ prop_conflicted_p,
+ tree_conflicted_p,
+ wc_ctx->db,
+ local_abspath,
+ scratch_pool));
}
svn_error_t *
@@ -512,11 +522,11 @@ svn_wc__min_max_revisions(svn_revnum_t *
apr_pool_t *scratch_pool)
{
return svn_error_trace(svn_wc__db_min_max_revisions(min_revision,
- max_revision,
- wc_ctx->db,
- local_abspath,
- committed,
- scratch_pool));
+ max_revision,
+ wc_ctx->db,
+ local_abspath,
+ committed,
+ scratch_pool));
}
@@ -527,9 +537,9 @@ svn_wc__is_sparse_checkout(svn_boolean_t
apr_pool_t *scratch_pool)
{
return svn_error_trace(svn_wc__db_is_sparse_checkout(is_sparse_checkout,
- wc_ctx->db,
- local_abspath,
- scratch_pool));
+ wc_ctx->db,
+ local_abspath,
+ scratch_pool));
}
@@ -541,10 +551,10 @@ svn_wc__has_switched_subtrees(svn_boolea
apr_pool_t *scratch_pool)
{
return svn_error_trace(svn_wc__db_has_switched_subtrees(is_switched,
- wc_ctx->db,
- local_abspath,
- trail_url,
- scratch_pool));
+ wc_ctx->db,
+ local_abspath,
+ trail_url,
+ scratch_pool));
}
@@ -557,9 +567,9 @@ svn_wc__has_local_mods(svn_boolean_t *is
apr_pool_t *scratch_pool)
{
return svn_error_trace(svn_wc__db_has_local_mods(is_modified,
- wc_ctx->db,
- local_abspath,
- cancel_func,
- cancel_baton,
- scratch_pool));
+ wc_ctx->db,
+ local_abspath,
+ cancel_func,
+ cancel_baton,
+ scratch_pool));
}
Modified: subversion/branches/gpg-agent-password-store/subversion/libsvn_wc/relocate.c
URL: http://svn.apache.org/viewvc/subversion/branches/gpg-agent-password-store/subversion/libsvn_wc/relocate.c?rev=1148581&r1=1148580&r2=1148581&view=diff
==============================================================================
--- subversion/branches/gpg-agent-password-store/subversion/libsvn_wc/relocate.c (original)
+++ subversion/branches/gpg-agent-password-store/subversion/libsvn_wc/relocate.c Tue Jul 19 23:05:44 2011
@@ -165,6 +165,6 @@ svn_wc_relocate4(svn_wc_context_t *wc_ct
scratch_pool));
return svn_error_trace(svn_wc__db_global_relocate(wc_ctx->db, local_abspath,
- new_repos_root,
- scratch_pool));
+ new_repos_root,
+ scratch_pool));
}
Modified: subversion/branches/gpg-agent-password-store/subversion/libsvn_wc/status.c
URL: http://svn.apache.org/viewvc/subversion/branches/gpg-agent-password-store/subversion/libsvn_wc/status.c?rev=1148581&r1=1148580&r2=1148581&view=diff
==============================================================================
--- subversion/branches/gpg-agent-password-store/subversion/libsvn_wc/status.c (original)
+++ subversion/branches/gpg-agent-password-store/subversion/libsvn_wc/status.c Tue Jul 19 23:05:44 2011
@@ -248,9 +248,10 @@ read_info(const struct svn_wc__db_info_t
SVN_ERR(svn_wc__db_read_info(&mtb->status, &mtb->kind,
&mtb->revnum, &mtb->repos_relpath,
- &mtb->repos_root_url, NULL, &mtb->changed_rev,
- &mtb->changed_date, &mtb->changed_author,
- &mtb->depth, &checksum, NULL, NULL, NULL, NULL,
+ &mtb->repos_root_url, &mtb->repos_uuid,
+ &mtb->changed_rev, &mtb->changed_date,
+ &mtb->changed_author, &mtb->depth,
+ &checksum, NULL, NULL, NULL, NULL,
NULL, &mtb->lock, &mtb->recorded_size,
&mtb->recorded_mod_time, &mtb->changelist,
&mtb->conflicted, &mtb->op_root,
@@ -277,7 +278,8 @@ read_info(const struct svn_wc__db_info_t
mtb->has_checksum = (checksum != NULL);
#ifdef HAVE_SYMLINK
- if (mtb->had_props || mtb->props_mod)
+ if (mtb->kind == svn_wc__db_kind_file
+ && (mtb->had_props || mtb->props_mod))
{
apr_hash_t *properties;
@@ -304,9 +306,11 @@ read_info(const struct svn_wc__db_info_t
static svn_error_t *
get_repos_root_url_relpath(const char **repos_relpath,
const char **repos_root_url,
+ const char **repos_uuid,
const struct svn_wc__db_info_t *info,
const char *parent_repos_relpath,
const char *parent_repos_root_url,
+ const char *parent_repos_uuid,
svn_wc__db_t *db,
const char *local_abspath,
apr_pool_t *result_pool,
@@ -316,6 +320,7 @@ get_repos_root_url_relpath(const char **
{
*repos_relpath = info->repos_relpath;
*repos_root_url = info->repos_root_url;
+ *repos_uuid = info->repos_uuid;
}
else if (parent_repos_relpath && parent_repos_root_url)
{
@@ -324,18 +329,20 @@ get_repos_root_url_relpath(const char **
NULL),
result_pool);
*repos_root_url = parent_repos_root_url;
+ *repos_uuid = parent_repos_uuid;
}
else if (info->status == svn_wc__db_status_added)
{
SVN_ERR(svn_wc__db_scan_addition(NULL, NULL,
repos_relpath, repos_root_url,
- NULL, NULL, NULL, NULL, NULL,
+ repos_uuid, NULL, NULL, NULL, NULL,
db, local_abspath,
result_pool, scratch_pool));
}
else if (info->have_base)
{
- SVN_ERR(svn_wc__db_scan_base_repos(repos_relpath, repos_root_url, NULL,
+ SVN_ERR(svn_wc__db_scan_base_repos(repos_relpath, repos_root_url,
+ repos_uuid,
db, local_abspath,
result_pool, scratch_pool));
}
@@ -343,6 +350,7 @@ get_repos_root_url_relpath(const char **
{
*repos_relpath = NULL;
*repos_root_url = NULL;
+ *repos_uuid = NULL;
}
return SVN_NO_ERROR;
}
@@ -378,6 +386,7 @@ assemble_status(svn_wc_status3_t **statu
const char *local_abspath,
const char *parent_repos_root_url,
const char *parent_repos_relpath,
+ const char *parent_repos_uuid,
const struct svn_wc__db_info_t *info,
const svn_io_dirent2_t *dirent,
svn_boolean_t get_all,
@@ -393,6 +402,7 @@ assemble_status(svn_wc_status3_t **statu
svn_error_t *err;
const char *repos_relpath;
const char *repos_root_url;
+ const char *repos_uuid;
svn_filesize_t filesize = (dirent && (dirent->kind == svn_node_file))
? dirent->filesize
: SVN_INVALID_FILESIZE;
@@ -411,8 +421,8 @@ assemble_status(svn_wc_status3_t **statu
else
{
/* A node is switched if it doesn't have the implied repos_relpath */
- const char *name = svn_relpath__is_child(parent_repos_relpath,
- info->repos_relpath, NULL);
+ const char *name = svn_relpath_skip_ancestor(parent_repos_relpath,
+ info->repos_relpath);
switched_p = !name || (strcmp(name, svn_dirent_basename(local_abspath, NULL)) != 0);
}
@@ -528,7 +538,7 @@ assemble_status(svn_wc_status3_t **statu
if (err)
{
- if (!APR_STATUS_IS_EACCES(err->apr_err))
+ if (err->apr_err != SVN_ERR_WC_PATH_ACCESS_DENIED)
return svn_error_trace(err);
/* An access denied is very common on Windows when another
@@ -623,9 +633,11 @@ assemble_status(svn_wc_status3_t **statu
return SVN_NO_ERROR;
}
- SVN_ERR(get_repos_root_url_relpath(&repos_relpath, &repos_root_url, info,
+ SVN_ERR(get_repos_root_url_relpath(&repos_relpath, &repos_root_url,
+ &repos_uuid, info,
parent_repos_relpath,
parent_repos_root_url,
+ parent_repos_uuid,
db, local_abspath,
scratch_pool, scratch_pool));
@@ -686,6 +698,7 @@ assemble_status(svn_wc_status3_t **statu
stat->changelist = info->changelist;
stat->repos_root_url = repos_root_url;
stat->repos_relpath = repos_relpath;
+ stat->repos_uuid = repos_uuid;
*status = stat;
@@ -704,36 +717,23 @@ static svn_error_t *
assemble_unversioned(svn_wc_status3_t **status,
svn_wc__db_t *db,
const char *local_abspath,
- svn_node_kind_t path_kind,
+ const svn_io_dirent2_t *dirent,
+ svn_boolean_t tree_conflicted,
svn_boolean_t is_ignored,
apr_pool_t *result_pool,
apr_pool_t *scratch_pool)
{
svn_wc_status3_t *stat;
- const svn_wc_conflict_description2_t *tree_conflict;
- svn_error_t *err;
-
- /* Find out whether the path is a tree conflict victim.
- This function will set tree_conflict to NULL if the path
- is not a victim. */
- err = svn_wc__db_op_read_tree_conflict(&tree_conflict,
- db, local_abspath,
- scratch_pool, scratch_pool);
-
- if (path_kind == svn_node_dir &&
- err &&
- err->apr_err == SVN_ERR_WC_UPGRADE_REQUIRED)
- svn_error_clear(err);
- else
- SVN_ERR(err);
/* return a fairly blank structure. */
- stat = apr_pcalloc(result_pool, sizeof(**status));
+ stat = apr_pcalloc(result_pool, sizeof(*stat));
/*stat->versioned = FALSE;*/
stat->kind = svn_node_unknown; /* not versioned */
stat->depth = svn_depth_unknown;
- stat->filesize = SVN_INVALID_FILESIZE;
+ stat->filesize = (dirent && dirent->kind == svn_node_file)
+ ? dirent->filesize
+ : SVN_INVALID_FILESIZE;
stat->node_status = svn_wc_status_none;
stat->text_status = svn_wc_status_none;
stat->prop_status = svn_wc_status_none;
@@ -746,18 +746,18 @@ assemble_unversioned(svn_wc_status3_t **
to matching an ignore-pattern), the node_status is set to
svn_wc_status_ignored. Otherwise the node_status is set to
svn_wc_status_unversioned. */
- if (path_kind != svn_node_none)
+ if (dirent && dirent->kind != svn_node_none)
{
if (is_ignored)
stat->node_status = svn_wc_status_ignored;
else
stat->node_status = svn_wc_status_unversioned;
}
- else if (tree_conflict != NULL)
+ else if (tree_conflicted)
{
/* If this path has no entry, is NOT present on disk, and IS a
- tree conflict victim, count it as missing. */
- stat->node_status = svn_wc_status_missing;
+ tree conflict victim, report it as conflicted. */
+ stat->node_status = svn_wc_status_conflicted;
}
stat->revision = SVN_INVALID_REVNUM;
@@ -767,7 +767,7 @@ assemble_unversioned(svn_wc_status3_t **
/* For the case of an incoming delete to a locally deleted path during
an update, we get a tree conflict. */
- stat->conflicted = (tree_conflict != NULL);
+ stat->conflicted = tree_conflicted;
stat->changelist = NULL;
*status = stat;
@@ -783,6 +783,7 @@ send_status_structure(const struct walk_
const char *local_abspath,
const char *parent_repos_root_url,
const char *parent_repos_relpath,
+ const char *parent_repos_uuid,
const struct svn_wc__db_info_t *info,
const svn_io_dirent2_t *dirent,
svn_boolean_t get_all,
@@ -796,11 +797,13 @@ send_status_structure(const struct walk_
/* Check for a repository lock. */
if (wb->repos_locks)
{
- const char *repos_relpath, *repos_root_url;
+ const char *repos_relpath, *repos_root_url, *repos_uuid;
SVN_ERR(get_repos_root_url_relpath(&repos_relpath, &repos_root_url,
+ &repos_uuid,
info, parent_repos_relpath,
parent_repos_root_url,
+ parent_repos_uuid,
wb->db, local_abspath,
scratch_pool, scratch_pool));
if (repos_relpath)
@@ -816,12 +819,13 @@ send_status_structure(const struct walk_
SVN_ERR(assemble_status(&statstruct, wb->db, local_abspath,
parent_repos_root_url, parent_repos_relpath,
+ parent_repos_uuid,
info, dirent, get_all, wb->ignore_text_mods,
repos_lock, scratch_pool, scratch_pool));
if (statstruct && status_func)
return svn_error_trace((*status_func)(status_baton, local_abspath,
- statstruct, scratch_pool));
+ statstruct, scratch_pool));
return SVN_NO_ERROR;
}
@@ -930,7 +934,8 @@ is_external_path(apr_hash_t *externals,
static svn_error_t *
send_unversioned_item(const struct walk_status_baton *wb,
const char *local_abspath,
- svn_node_kind_t path_kind,
+ const svn_io_dirent2_t *dirent,
+ svn_boolean_t tree_conflicted,
const apr_array_header_t *patterns,
svn_boolean_t no_ignore,
svn_wc_status_func4_t status_func,
@@ -947,7 +952,7 @@ send_unversioned_item(const struct walk_
SVN_ERR(assemble_unversioned(&status,
wb->db, local_abspath,
- path_kind, is_ignored,
+ dirent, tree_conflicted, is_ignored,
scratch_pool, scratch_pool));
is_external = is_external_path(wb->externals, local_abspath, scratch_pool);
@@ -964,7 +969,7 @@ send_unversioned_item(const struct walk_
entry to the status func. */
if (no_ignore || (! is_ignored) || is_external)
return svn_error_trace((*status_func)(status_baton, local_abspath,
- status, scratch_pool));
+ status, scratch_pool));
return SVN_NO_ERROR;
}
@@ -995,6 +1000,7 @@ get_dir_status(const struct walk_status_
svn_boolean_t skip_this_dir,
const char *parent_repos_root_url,
const char *parent_repos_relpath,
+ const char *parent_repos_uuid,
const struct svn_wc__db_info_t *dir_info,
const svn_io_dirent2_t *dirent,
const apr_array_header_t *ignore_patterns,
@@ -1010,6 +1016,7 @@ get_dir_status(const struct walk_status_
apr_hash_index_t *hi;
const char *dir_repos_root_url;
const char *dir_repos_relpath;
+ const char *dir_repos_uuid;
apr_hash_t *dirents, *nodes, *conflicts, *all_children;
apr_array_header_t *patterns = NULL;
apr_pool_t *iterpool, *subpool = svn_pool_create(scratch_pool);
@@ -1039,8 +1046,9 @@ get_dir_status(const struct walk_status_
subpool, iterpool));
SVN_ERR(get_repos_root_url_relpath(&dir_repos_relpath, &dir_repos_root_url,
- dir_info, parent_repos_relpath,
- parent_repos_root_url,
+ &dir_repos_uuid, dir_info,
+ parent_repos_relpath,
+ parent_repos_root_url, parent_repos_uuid,
wb->db, local_abspath,
subpool, iterpool));
if (selected == NULL)
@@ -1100,6 +1108,7 @@ get_dir_status(const struct walk_status_
SVN_ERR(send_status_structure(wb, local_abspath,
parent_repos_root_url,
parent_repos_relpath,
+ parent_repos_uuid,
dir_info, dirent, get_all,
status_func, status_baton,
iterpool));
@@ -1142,6 +1151,7 @@ get_dir_status(const struct walk_status_
SVN_ERR(send_status_structure(wb, node_abspath,
dir_repos_root_url,
dir_repos_relpath,
+ dir_repos_uuid,
info, dirent_p, get_all,
status_func, status_baton,
iterpool));
@@ -1152,7 +1162,7 @@ get_dir_status(const struct walk_status_
{
SVN_ERR(get_dir_status(wb, node_abspath, NULL, TRUE,
dir_repos_root_url, dir_repos_relpath,
- info,
+ dir_repos_uuid, info,
dirent_p, ignore_patterns,
svn_depth_infinity, get_all,
no_ignore,
@@ -1176,8 +1186,7 @@ get_dir_status(const struct walk_status_
SVN_ERR(send_unversioned_item(wb,
node_abspath,
- dirent_p ? dirent_p->kind
- : svn_node_none,
+ dirent_p, TRUE,
patterns,
no_ignore,
status_func,
@@ -1204,7 +1213,7 @@ get_dir_status(const struct walk_status_
SVN_ERR(send_unversioned_item(wb,
node_abspath,
- dirent_p->kind,
+ dirent_p, FALSE,
patterns,
no_ignore || selected,
status_func, status_baton,
@@ -1488,6 +1497,7 @@ make_dir_baton(void **dir_baton,
SVN_ERR(get_dir_status(&eb->wb, local_abspath, NULL, TRUE,
status_in_parent->repos_root_url,
NULL /*parent_repos_relpath*/,
+ status_in_parent->repos_uuid,
NULL,
NULL /* dirent */, ignores,
d->depth == svn_depth_files
@@ -1557,6 +1567,9 @@ is_sendable_status(const svn_wc_status3_
if (status->repos_lock)
return TRUE;
+ if (status->conflicted)
+ return TRUE;
+
/* If the item is ignored, and we don't want ignores, skip it. */
if ((status->node_status == svn_wc_status_ignored) && (! no_ignore))
return FALSE;
@@ -1574,8 +1587,6 @@ is_sendable_status(const svn_wc_status3_
if ((status->node_status != svn_wc_status_none
&& (status->node_status != svn_wc_status_normal)))
return TRUE;
- if (status->conflicted)
- return TRUE;
/* If it's switched, send it. */
if (status->switched)
@@ -1629,6 +1640,7 @@ static svn_error_t *
handle_statii(struct edit_baton *eb,
const char *dir_repos_root_url,
const char *dir_repos_relpath,
+ const char *dir_repos_uuid,
apr_hash_t *statii,
svn_boolean_t dir_was_deleted,
svn_depth_t depth,
@@ -1667,6 +1679,7 @@ handle_statii(struct edit_baton *eb,
SVN_ERR(get_dir_status(&eb->wb,
local_abspath, NULL, TRUE,
dir_repos_root_url, dir_repos_relpath,
+ dir_repos_uuid,
NULL,
NULL /* dirent */,
ignores, depth, eb->get_all, eb->no_ignore,
@@ -1912,6 +1925,7 @@ close_directory(void *dir_baton,
SVN_ERR(handle_statii(eb,
dir_status ? dir_status->repos_root_url : NULL,
dir_status ? dir_status->repos_relpath : NULL,
+ dir_status ? dir_status->repos_uuid : NULL,
db->statii, was_deleted, db->depth, pool));
if (dir_status && is_sendable_status(dir_status, eb->no_ignore,
eb->get_all))
@@ -1936,7 +1950,8 @@ close_directory(void *dir_baton,
{
SVN_ERR(get_dir_status(&eb->wb,
eb->target_abspath, NULL, TRUE,
- NULL, NULL, NULL, NULL /* dirent */,
+ NULL, NULL, NULL, NULL,
+ NULL /* dirent */,
eb->ignores,
eb->default_depth,
eb->get_all, eb->no_ignore,
@@ -1957,6 +1972,7 @@ close_directory(void *dir_baton,
SVN_ERR(handle_statii(eb,
eb->anchor_status->repos_root_url,
eb->anchor_status->repos_relpath,
+ eb->anchor_status->repos_uuid,
db->statii, FALSE, eb->default_depth, pool));
if (is_sendable_status(eb->anchor_status, eb->no_ignore,
eb->get_all))
@@ -2163,6 +2179,7 @@ svn_wc_get_status_editor5(const svn_delt
svn_depth_t depth,
svn_boolean_t get_all,
svn_boolean_t no_ignore,
+ svn_boolean_t depth_as_sticky,
svn_boolean_t server_performs_filtering,
const apr_array_header_t *ignore_patterns,
svn_wc_status_func4_t status_func,
@@ -2244,7 +2261,7 @@ svn_wc_get_status_editor5(const svn_delt
inner_baton = eb;
if (!server_performs_filtering
- && depth == svn_depth_unknown)
+ && !depth_as_sticky)
SVN_ERR(svn_wc__ambient_depth_filter_editor(&inner_editor,
&inner_baton,
wc_ctx->db,
@@ -2284,7 +2301,8 @@ svn_wc__internal_walk_status(svn_wc__db_
const svn_io_dirent2_t *dirent;
const char *anchor_abspath, *target_name;
svn_boolean_t skip_root;
- svn_wc__db_kind_t kind;
+ const struct svn_wc__db_info_t *dir_info;
+ svn_error_t *err;
wb.db = db;
wb.target_abspath = local_abspath;
@@ -2305,34 +2323,37 @@ svn_wc__internal_walk_status(svn_wc__db_
ignore_patterns = ignores;
}
- SVN_ERR(svn_wc__db_read_kind(&kind, db, local_abspath, TRUE, scratch_pool));
- SVN_ERR(svn_io_stat_dirent(&dirent, local_abspath, TRUE,
- scratch_pool, scratch_pool));
+ err = read_info(&dir_info, local_abspath, db, scratch_pool, scratch_pool);
- if (kind == svn_wc__db_kind_file && dirent->kind == svn_node_file)
- {
- anchor_abspath = svn_dirent_dirname(local_abspath, scratch_pool);
- target_name = svn_dirent_basename(local_abspath, NULL);
- skip_root = TRUE;
- }
- else if (kind == svn_wc__db_kind_dir && dirent->kind == svn_node_dir)
+ if (!err && dir_info->kind == svn_wc__db_kind_dir)
{
anchor_abspath = local_abspath;
target_name = NULL;
skip_root = FALSE;
}
+ else if (err && err->apr_err != SVN_ERR_WC_PATH_NOT_FOUND)
+ return svn_error_trace(err);
else
{
+ svn_error_clear(err);
+ dir_info = NULL; /* Don't pass information of the child */
+
+ /* Walk the status of the parent of LOCAL_ABSPATH, but only report
+ status on its child LOCAL_ABSPATH. */
anchor_abspath = svn_dirent_dirname(local_abspath, scratch_pool);
target_name = svn_dirent_basename(local_abspath, NULL);
- skip_root = FALSE;
+ skip_root = TRUE;
}
+ SVN_ERR(svn_io_stat_dirent(&dirent, local_abspath, TRUE,
+ scratch_pool, scratch_pool));
+
SVN_ERR(get_dir_status(&wb,
anchor_abspath,
target_name,
skip_root,
- NULL, NULL, NULL, /* parent info */
+ NULL, NULL, NULL,
+ dir_info,
dirent,
ignore_patterns,
depth,
@@ -2425,7 +2446,9 @@ internal_status(svn_wc_status3_t **statu
svn_wc__db_kind_t node_kind;
const char *parent_repos_relpath;
const char *parent_repos_root_url;
+ const char *parent_repos_uuid;
svn_wc__db_status_t node_status;
+ svn_boolean_t conflicted;
svn_boolean_t is_root = FALSE;
svn_error_t *err;
@@ -2436,8 +2459,8 @@ internal_status(svn_wc_status3_t **statu
err = svn_wc__db_read_info(&node_status, &node_kind, NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
- NULL, NULL, NULL, NULL, NULL,
+ NULL, NULL, NULL, NULL, NULL, NULL, &conflicted,
+ NULL, NULL, NULL, NULL, NULL, NULL,
db, local_abspath,
scratch_pool, scratch_pool);
@@ -2448,16 +2471,21 @@ internal_status(svn_wc_status3_t **statu
{
svn_error_clear(err);
node_kind = svn_wc__db_kind_unknown;
+
+ /* Ensure conflicted is always set, but don't hide tree conflicts
+ on 'hidden' nodes. */
+ if (err)
+ conflicted = FALSE;
}
else
SVN_ERR(err);
if (node_kind == svn_wc__db_kind_unknown)
return svn_error_trace(assemble_unversioned(status,
- db, local_abspath,
- dirent->kind,
- FALSE /* is_ignored */,
- result_pool, scratch_pool));
+ db, local_abspath,
+ dirent, conflicted,
+ FALSE /* is_ignored */,
+ result_pool, scratch_pool));
if (svn_dirent_is_root(local_abspath, strlen(local_abspath)))
is_root = TRUE;
@@ -2472,7 +2500,7 @@ internal_status(svn_wc_status3_t **statu
err = svn_wc__db_read_info(&parent_status, NULL, NULL,
&parent_repos_relpath, &parent_repos_root_url,
- NULL, NULL, NULL, NULL,
+ &parent_repos_uuid, NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL,
@@ -2485,34 +2513,27 @@ internal_status(svn_wc_status3_t **statu
svn_error_clear(err);
parent_repos_root_url = NULL;
parent_repos_relpath = NULL;
+ parent_repos_uuid = NULL;
}
- else if (err)
- return svn_error_trace(err);
-
- if (!err
- && parent_repos_relpath == NULL
- && parent_status != svn_wc__db_status_added
- && parent_status != svn_wc__db_status_deleted)
- SVN_ERR(svn_wc__db_scan_base_repos(&parent_repos_relpath,
- &parent_repos_root_url, NULL,
- db, local_abspath,
- result_pool, scratch_pool));
+ else SVN_ERR(err);
}
else
{
parent_repos_root_url = NULL;
parent_repos_relpath = NULL;
+ parent_repos_uuid = NULL;
}
return svn_error_trace(assemble_status(status, db, local_abspath,
- parent_repos_root_url,
- parent_repos_relpath,
- NULL,
- dirent,
- TRUE /* get_all */,
- FALSE,
- NULL /* repos_lock */,
- result_pool, scratch_pool));
+ parent_repos_root_url,
+ parent_repos_relpath,
+ parent_repos_uuid,
+ NULL,
+ dirent,
+ TRUE /* get_all */,
+ FALSE,
+ NULL /* repos_lock */,
+ result_pool, scratch_pool));
}
@@ -2563,6 +2584,10 @@ svn_wc_dup_status3(const svn_wc_status3_
new_stat->repos_relpath
= apr_pstrdup(pool, orig_stat->repos_relpath);
+ if (orig_stat->repos_uuid)
+ new_stat->repos_uuid
+ = apr_pstrdup(pool, orig_stat->repos_uuid);
+
/* Return the new hotness. */
return new_stat;
}
@@ -2579,7 +2604,7 @@ svn_wc_get_ignores2(apr_array_header_t *
SVN_ERR(svn_wc_get_default_ignores(&default_ignores, config, scratch_pool));
return svn_error_trace(collect_ignore_patterns(patterns, wc_ctx->db,
- local_abspath,
- default_ignores,
- result_pool, scratch_pool));
+ local_abspath,
+ default_ignores,
+ result_pool, scratch_pool));
}
Modified: subversion/branches/gpg-agent-password-store/subversion/libsvn_wc/translate.c
URL: http://svn.apache.org/viewvc/subversion/branches/gpg-agent-password-store/subversion/libsvn_wc/translate.c?rev=1148581&r1=1148580&r2=1148581&view=diff
==============================================================================
--- subversion/branches/gpg-agent-password-store/subversion/libsvn_wc/translate.c (original)
+++ subversion/branches/gpg-agent-password-store/subversion/libsvn_wc/translate.c Tue Jul 19 23:05:44 2011
@@ -263,7 +263,7 @@ svn_wc__get_translate_info(svn_subst_eol
apr_pool_t *result_pool,
apr_pool_t *scratch_pool)
{
- svn_string_t *propval;
+ const char *propval;
SVN_ERR_ASSERT(svn_dirent_is_absolute(local_abspath));
if (props == NULL)
@@ -272,29 +272,26 @@ svn_wc__get_translate_info(svn_subst_eol
if (eol)
{
- propval = props ? apr_hash_get(props, SVN_PROP_EOL_STYLE,
- APR_HASH_KEY_STRING) : NULL;
+ propval = svn_prop_get_value(props, SVN_PROP_EOL_STYLE);
- svn_subst_eol_style_from_value(style, eol, propval ? propval->data : NULL);
+ svn_subst_eol_style_from_value(style, eol, propval);
}
if (keywords)
{
- propval = props ? apr_hash_get(props, SVN_PROP_KEYWORDS,
- APR_HASH_KEY_STRING) : NULL;
+ propval = svn_prop_get_value(props, SVN_PROP_KEYWORDS);
- if (!propval || propval->len == 0)
+ if (!propval || *propval == '\0')
*keywords = NULL;
else
SVN_ERR(svn_wc__expand_keywords(keywords,
db, local_abspath, NULL,
- propval->data, for_normalization,
+ propval, for_normalization,
result_pool, scratch_pool));
}
if (special)
{
- propval = props ? apr_hash_get(props, SVN_PROP_SPECIAL,
- APR_HASH_KEY_STRING) : NULL;
+ propval = svn_prop_get_value(props, SVN_PROP_SPECIAL);
*special = (propval != NULL);
}
Modified: subversion/branches/gpg-agent-password-store/subversion/libsvn_wc/update_editor.c
URL: http://svn.apache.org/viewvc/subversion/branches/gpg-agent-password-store/subversion/libsvn_wc/update_editor.c?rev=1148581&r1=1148580&r2=1148581&view=diff
==============================================================================
--- subversion/branches/gpg-agent-password-store/subversion/libsvn_wc/update_editor.c (original)
+++ subversion/branches/gpg-agent-password-store/subversion/libsvn_wc/update_editor.c Tue Jul 19 23:05:44 2011
@@ -773,6 +773,7 @@ make_file_baton(struct file_baton **f_p,
svn_boolean_t adding,
apr_pool_t *scratch_pool)
{
+ struct edit_baton *eb = pb->edit_baton;
apr_pool_t *file_pool = svn_pool_create(pb->pool);
struct file_baton *f = apr_pcalloc(file_pool, sizeof(*f));
@@ -785,17 +786,35 @@ make_file_baton(struct file_baton **f_p,
SVN_ERR(path_join_under_root(&f->local_abspath,
pb->local_abspath, f->name, file_pool));
- /* Figure out the new_URL for this file. */
- if (adding || pb->edit_baton->switch_relpath)
- f->new_relpath = svn_relpath_join(pb->new_relpath, f->name, file_pool);
- else
+ /* Figure out the new URL for this file. */
+ if (eb->switch_relpath)
{
- SVN_ERR(svn_wc__db_scan_base_repos(&f->new_relpath, NULL, NULL,
- pb->edit_baton->db,
- f->local_abspath,
- file_pool, scratch_pool));
+ /* Handle switches... */
- SVN_ERR_ASSERT(f->new_relpath);
+ /* This file has a parent directory. If there is
+ no grandparent, then we may have anchored at the parent,
+ and self is the target. If we match the target, then set
+ NEW_RELPATH to the SWITCH_RELPATH.
+
+ Otherwise, we simply extend NEW_RELPATH from the parent. */
+ if (pb->parent_baton == NULL
+ && strcmp(eb->target_basename, f->name) == 0)
+ f->new_relpath = eb->switch_relpath;
+ else
+ f->new_relpath = svn_relpath_join(pb->new_relpath, f->name,
+ file_pool);
+ }
+ else /* must be an update */
+ {
+ if (adding)
+ f->new_relpath = svn_relpath_join(pb->new_relpath, f->name, file_pool);
+ else
+ {
+ SVN_ERR(svn_wc__db_scan_base_repos(&f->new_relpath, NULL, NULL,
+ eb->db, f->local_abspath,
+ file_pool, scratch_pool));
+ SVN_ERR_ASSERT(f->new_relpath);
+ }
}
f->pool = file_pool;
@@ -1046,7 +1065,6 @@ set_target_revision(void *edit_baton,
{
struct edit_baton *eb = edit_baton;
- /* Stashing a target_revision in the baton */
*(eb->target_revision) = target_revision;
return SVN_NO_ERROR;
}
@@ -1089,7 +1107,7 @@ open_root(void *edit_baton,
/* Notify that we skipped the target, while we actually skipped
the anchor */
do_notification(eb, eb->target_abspath, svn_node_unknown,
- svn_wc_notify_skip, pool);
+ svn_wc_notify_skip_conflicted, pool);
return SVN_NO_ERROR;
}
@@ -1144,6 +1162,7 @@ modcheck_callback(void *baton,
case svn_wc_status_ignored:
case svn_wc_status_none:
case svn_wc_status_unversioned:
+ case svn_wc_status_external:
break;
case svn_wc_status_deleted:
@@ -1570,9 +1589,9 @@ check_tree_conflict(svn_wc_conflict_desc
/* A conflict was detected. Append log commands to the log accumulator
* to record it. */
return svn_error_trace(create_tree_conflict(pconflict, eb, local_abspath,
- reason, action, their_node_kind,
- their_relpath,
- result_pool, scratch_pool));
+ reason, action, their_node_kind,
+ their_relpath,
+ result_pool, scratch_pool));
}
@@ -1739,7 +1758,8 @@ delete_entry(const char *path,
{
SVN_ERR(remember_skipped_tree(eb, local_abspath, scratch_pool));
- do_notification(eb, local_abspath, svn_node_unknown, svn_wc_notify_skip,
+ do_notification(eb, local_abspath, svn_node_unknown,
+ svn_wc_notify_skip_conflicted,
scratch_pool);
svn_pool_destroy(scratch_pool);
@@ -2081,7 +2101,7 @@ add_directory(const char *path,
/* ### TODO: Also print victim_path in the skip msg. */
do_notification(eb, db->local_abspath, svn_node_dir,
- svn_wc_notify_skip, pool);
+ svn_wc_notify_skip_conflicted, pool);
return SVN_NO_ERROR;
}
@@ -2312,7 +2332,7 @@ open_directory(const char *path,
db->already_notified = TRUE;
do_notification(eb, db->local_abspath, svn_node_unknown,
- svn_wc_notify_skip, pool);
+ svn_wc_notify_skip_conflicted, pool);
return SVN_NO_ERROR;
}
@@ -2495,85 +2515,89 @@ close_directory(void *dir_baton,
/* If this directory has property changes stored up, now is the time
to deal with them. */
- if (regular_prop_changes->nelts || entry_prop_changes->nelts
- || dav_prop_changes->nelts)
+ if (regular_prop_changes->nelts)
{
- if (regular_prop_changes->nelts)
+ svn_skel_t *work_item;
+
+ /* If recording traversal info, then see if the
+ SVN_PROP_EXTERNALS property on this directory changed,
+ and record before and after for the change. */
+ if (eb->external_func)
{
- svn_skel_t *work_item;
+ const svn_prop_t *change
+ = externals_prop_changed(regular_prop_changes);
- /* If recording traversal info, then see if the
- SVN_PROP_EXTERNALS property on this directory changed,
- and record before and after for the change. */
- if (eb->external_func)
+ if (change)
{
- const svn_prop_t *change
- = externals_prop_changed(regular_prop_changes);
+ const svn_string_t *new_val_s = change->value;
+ const svn_string_t *old_val_s;
- if (change)
- {
- const svn_string_t *new_val_s = change->value;
- const svn_string_t *old_val_s;
+ old_val_s = apr_hash_get(base_props, SVN_PROP_EXTERNALS,
+ APR_HASH_KEY_STRING);
- old_val_s = apr_hash_get(base_props, SVN_PROP_EXTERNALS,
- APR_HASH_KEY_STRING);
-
- if ((new_val_s == NULL) && (old_val_s == NULL))
- ; /* No value before, no value after... so do nothing. */
- else if (new_val_s && old_val_s
- && (svn_string_compare(old_val_s, new_val_s)))
- ; /* Value did not change... so do nothing. */
- else if (old_val_s || new_val_s)
- /* something changed, record the change */
- {
- SVN_ERR((eb->external_func)(
- eb->external_baton,
- db->local_abspath,
- old_val_s,
- new_val_s,
- db->ambient_depth,
- db->pool));
- }
+ if ((new_val_s == NULL) && (old_val_s == NULL))
+ ; /* No value before, no value after... so do nothing. */
+ else if (new_val_s && old_val_s
+ && (svn_string_compare(old_val_s, new_val_s)))
+ ; /* Value did not change... so do nothing. */
+ else if (old_val_s || new_val_s)
+ /* something changed, record the change */
+ {
+ SVN_ERR((eb->external_func)(
+ eb->external_baton,
+ db->local_abspath,
+ old_val_s,
+ new_val_s,
+ db->ambient_depth,
+ db->pool));
}
}
+ }
- /* Merge pending properties into temporary files (ignoring
- conflicts). */
- SVN_ERR_W(svn_wc__merge_props(&work_item,
- &prop_state,
- &new_base_props,
- &new_actual_props,
- eb->db,
- db->local_abspath,
- svn_wc__db_kind_dir,
- NULL, /* left_version */
- NULL, /* right_version */
- NULL /* use baseprops */,
- base_props,
- actual_props,
- regular_prop_changes,
- TRUE /* base_merge */,
- FALSE /* dry_run */,
- eb->conflict_func,
- eb->conflict_baton,
- eb->cancel_func,
- eb->cancel_baton,
- db->pool,
- scratch_pool),
- _("Couldn't do property merge"));
- /* After a (not-dry-run) merge, we ALWAYS have props to save. */
- SVN_ERR_ASSERT(new_base_props != NULL && new_actual_props != NULL);
- all_work_items = svn_wc__wq_merge(all_work_items, work_item,
- scratch_pool);
+ if (db->shadowed)
+ {
+ /* We don't have a relevant actual row, but we need actual properties
+ to allow property merging without conflicts. */
+ if (db->adding_dir)
+ actual_props = apr_hash_make(scratch_pool);
+ else
+ actual_props = base_props;
}
- SVN_ERR(accumulate_last_change(&new_changed_rev,
- &new_changed_date,
- &new_changed_author,
- entry_prop_changes,
- scratch_pool, scratch_pool));
+ /* Merge pending properties into temporary files (ignoring
+ conflicts). */
+ SVN_ERR_W(svn_wc__merge_props(&work_item,
+ &prop_state,
+ &new_base_props,
+ &new_actual_props,
+ eb->db,
+ db->local_abspath,
+ svn_wc__db_kind_dir,
+ NULL, /* left_version */
+ NULL, /* right_version */
+ NULL /* use baseprops */,
+ base_props,
+ actual_props,
+ regular_prop_changes,
+ TRUE /* base_merge */,
+ FALSE /* dry_run */,
+ eb->conflict_func,
+ eb->conflict_baton,
+ eb->cancel_func,
+ eb->cancel_baton,
+ db->pool,
+ scratch_pool),
+ _("Couldn't do property merge"));
+ /* After a (not-dry-run) merge, we ALWAYS have props to save. */
+ SVN_ERR_ASSERT(new_base_props != NULL && new_actual_props != NULL);
+ all_work_items = svn_wc__wq_merge(all_work_items, work_item,
+ scratch_pool);
}
+ SVN_ERR(accumulate_last_change(&new_changed_rev, &new_changed_date,
+ &new_changed_author, entry_prop_changes,
+ scratch_pool, scratch_pool));
+
/* Check if we should add some not-present markers before marking the
directory complete (Issue #3569) */
{
@@ -2884,16 +2908,16 @@ absent_node(const char *path,
const char *repos_relpath;
repos_relpath = svn_relpath_join(pb->new_relpath, name, scratch_pool);
- /* Insert an absent node below the parent node to note that this child
+ /* Insert an excluded node below the parent node to note that this child
is absent. (This puts it in the parent db if the child is obstructed) */
- SVN_ERR(svn_wc__db_base_add_absent_node(eb->db, local_abspath,
- repos_relpath, eb->repos_root,
- eb->repos_uuid,
- *(eb->target_revision),
- absent_kind,
- svn_wc__db_status_server_excluded,
- NULL, NULL,
- scratch_pool));
+ SVN_ERR(svn_wc__db_base_add_excluded_node(eb->db, local_abspath,
+ repos_relpath, eb->repos_root,
+ eb->repos_uuid,
+ *(eb->target_revision),
+ absent_kind,
+ svn_wc__db_status_server_excluded,
+ NULL, NULL,
+ scratch_pool));
}
svn_pool_destroy(scratch_pool);
@@ -3099,7 +3123,7 @@ add_file(const char *path,
APR_HASH_KEY_STRING, (void*)1);
do_notification(eb, fb->local_abspath, svn_node_unknown,
- svn_wc_notify_skip, scratch_pool);
+ svn_wc_notify_skip_conflicted, scratch_pool);
svn_pool_destroy(scratch_pool);
@@ -3300,7 +3324,7 @@ open_file(const char *path,
fb->already_notified = TRUE;
do_notification(eb, fb->local_abspath, svn_node_unknown,
- svn_wc_notify_skip, scratch_pool);
+ svn_wc_notify_skip_conflicted, scratch_pool);
svn_pool_destroy(scratch_pool);
@@ -4113,9 +4137,37 @@ close_file(void *file_baton,
/* Merge the text. This will queue some additional work. */
if (!fb->obstruction_found)
{
- SVN_ERR(merge_file(&work_item, &install_pristine, &install_from,
- &content_state, fb, current_actual_props,
- fb->changed_date, scratch_pool, scratch_pool));
+ svn_error_t *err;
+ err = merge_file(&work_item, &install_pristine, &install_from,
+ &content_state, fb, current_actual_props,
+ fb->changed_date, scratch_pool, scratch_pool);
+
+ if (err && err->apr_err == SVN_ERR_WC_PATH_ACCESS_DENIED)
+ {
+ if (eb->notify_func)
+ {
+ svn_wc_notify_t *notify =svn_wc_create_notify(
+ fb->local_abspath,
+ svn_wc_notify_update_skip_access_denied,
+ scratch_pool);
+
+ notify->kind = svn_node_file;
+ notify->err = err;
+
+ eb->notify_func(eb->notify_baton, notify, scratch_pool);
+ }
+ svn_error_clear(err);
+
+ SVN_ERR(remember_skipped_tree(eb, fb->local_abspath,
+ scratch_pool));
+ fb->skip_this = TRUE;
+
+ SVN_ERR(maybe_release_dir_info(fb->bump_info));
+ svn_pool_destroy(fb->pool);
+ return SVN_NO_ERROR;
+ }
+ else
+ SVN_ERR(err);
all_work_items = svn_wc__wq_merge(all_work_items, work_item,
scratch_pool);
@@ -4280,7 +4332,6 @@ close_file(void *file_baton,
about files which were already notified for another reason.) */
if (eb->notify_func && !fb->already_notified && fb->edited)
{
- const svn_string_t *mime_type;
svn_wc_notify_t *notify;
svn_wc_notify_action_t action = svn_wc_notify_update_update;
@@ -4307,12 +4358,8 @@ close_file(void *file_baton,
notify->old_revision = fb->old_revision;
/* Fetch the mimetype from the actual properties */
- mime_type = (new_actual_props != NULL)
- ? apr_hash_get(new_actual_props, SVN_PROP_MIME_TYPE,
- APR_HASH_KEY_STRING)
- : NULL;
-
- notify->mime_type = mime_type == NULL ? NULL : mime_type->data;
+ notify->mime_type = svn_prop_get_value(new_actual_props,
+ SVN_PROP_MIME_TYPE);
eb->notify_func(eb->notify_baton, notify, scratch_pool);
}
@@ -5047,9 +5094,9 @@ svn_wc__strictly_is_wc_root(svn_boolean_
apr_pool_t *scratch_pool)
{
return svn_error_trace(svn_wc__db_is_wcroot(wc_root,
- wc_ctx->db,
- local_abspath,
- scratch_pool));
+ wc_ctx->db,
+ local_abspath,
+ scratch_pool));
}
@@ -5391,6 +5438,6 @@ svn_wc_add_repos_file4(svn_wc_context_t
pool));
return svn_error_trace(svn_wc__wq_run(db, dir_abspath,
- cancel_func, cancel_baton,
- pool));
+ cancel_func, cancel_baton,
+ pool));
}
Modified: subversion/branches/gpg-agent-password-store/subversion/libsvn_wc/upgrade.c
URL: http://svn.apache.org/viewvc/subversion/branches/gpg-agent-password-store/subversion/libsvn_wc/upgrade.c?rev=1148581&r1=1148580&r2=1148581&view=diff
==============================================================================
--- subversion/branches/gpg-agent-password-store/subversion/libsvn_wc/upgrade.c (original)
+++ subversion/branches/gpg-agent-password-store/subversion/libsvn_wc/upgrade.c Tue Jul 19 23:05:44 2011
@@ -265,40 +265,20 @@ read_wcprops(apr_hash_t **all_wcprops,
return svn_error_trace(svn_stream_close(stream));
}
-
-/* If the versioned child (which should be a directory) exists on disk as
- an actual directory, then add it to the array of subdirs. */
-static svn_error_t *
-maybe_add_subdir(apr_array_header_t *subdirs,
- const char *dir_abspath,
- const char *child_name,
- apr_pool_t *result_pool,
- apr_pool_t *scratch_pool)
-{
- const char *child_abspath = svn_dirent_join(dir_abspath, child_name,
- scratch_pool);
- svn_node_kind_t kind;
-
- SVN_ERR(svn_io_check_path(child_abspath, &kind, scratch_pool));
- if (kind == svn_node_dir)
- {
- APR_ARRAY_PUSH(subdirs, const char *) = apr_pstrdup(result_pool,
- child_abspath);
- }
-
- return SVN_NO_ERROR;
-}
-
-
/* Return in CHILDREN, the list of all 1.6 versioned subdirectories
which also exist on disk as directories.
If DELETE_DIR is not NULL set *DELETE_DIR to TRUE if the directory
- should be deleted after migrating to WC-NG, otherwise to FALSE. */
+ should be deleted after migrating to WC-NG, otherwise to FALSE.
+
+ If SKIP_MISSING is TRUE, don't add missing or obstructed subdirectories
+ to the list of children.
+ */
static svn_error_t *
get_versioned_subdirs(apr_array_header_t **children,
svn_boolean_t *delete_dir,
const char *dir_abspath,
+ svn_boolean_t skip_missing,
apr_pool_t *result_pool,
apr_pool_t *scratch_pool)
{
@@ -316,6 +296,9 @@ get_versioned_subdirs(apr_array_header_t
hi = apr_hash_next(hi))
{
const char *name = svn__apr_hash_index_key(hi);
+ const svn_wc_entry_t *entry = svn__apr_hash_index_val(hi);
+ const char *child_abspath;
+ svn_boolean_t hidden;
/* skip "this dir" */
if (*name == '\0')
@@ -323,11 +306,29 @@ get_versioned_subdirs(apr_array_header_t
this_dir = svn__apr_hash_index_val(hi);
continue;
}
+ else if (entry->kind != svn_node_dir)
+ continue;
svn_pool_clear(iterpool);
- SVN_ERR(maybe_add_subdir(*children, dir_abspath, name,
- result_pool, iterpool));
+ /* If a directory is 'hidden' skip it as subdir */
+ SVN_ERR(svn_wc__entry_is_hidden(&hidden, entry));
+ if (hidden)
+ continue;
+
+ child_abspath = svn_dirent_join(dir_abspath, name, scratch_pool);
+
+ if (skip_missing)
+ {
+ svn_node_kind_t kind;
+ SVN_ERR(svn_io_check_path(child_abspath, &kind, scratch_pool));
+
+ if (kind != svn_node_dir)
+ continue;
+ }
+
+ APR_ARRAY_PUSH(*children, const char *) = apr_pstrdup(result_pool,
+ child_abspath);
}
svn_pool_destroy(iterpool);
@@ -356,6 +357,7 @@ static svn_error_t *
get_versioned_files(const apr_array_header_t **children,
const char *parent_relpath,
svn_sqlite__db_t *sdb,
+ apr_int64_t wc_id,
apr_pool_t *result_pool,
apr_pool_t *scratch_pool)
{
@@ -365,7 +367,7 @@ get_versioned_files(const apr_array_head
/* ### just select 'file' children. do we need 'symlink' in the future? */
SVN_ERR(svn_sqlite__get_statement(&stmt, sdb, STMT_SELECT_ALL_FILES));
- SVN_ERR(svn_sqlite__bindf(stmt, "s", parent_relpath));
+ SVN_ERR(svn_sqlite__bindf(stmt, "is", wc_id, parent_relpath));
/* ### 10 is based on Subversion's average of 8.5 files per versioned
### directory in its repository. maybe use a different value? or
@@ -536,7 +538,7 @@ svn_wc__wipe_postupgrade(const char *dir
if (cancel_func)
SVN_ERR((*cancel_func)(cancel_baton));
- err = get_versioned_subdirs(&subdirs, &delete_dir, dir_abspath,
+ err = get_versioned_subdirs(&subdirs, &delete_dir, dir_abspath, TRUE,
scratch_pool, iterpool);
if (err)
{
@@ -647,9 +649,9 @@ ensure_repos_info(svn_wc_entry_t *entry,
svn_dirent_local_style(local_abspath, scratch_pool));
return svn_error_trace((*repos_info_func)(&entry->repos, &entry->uuid,
- repos_info_baton,
- entry->url,
- result_pool, scratch_pool));
+ repos_info_baton,
+ entry->url,
+ result_pool, scratch_pool));
}
@@ -837,6 +839,7 @@ migrate_node_props(const char *dir_abspa
const char *name,
svn_sqlite__db_t *sdb,
int original_format,
+ apr_int64_t wc_id,
apr_pool_t *scratch_pool)
{
const char *base_abspath; /* old name. nowadays: "pristine" */
@@ -903,7 +906,7 @@ migrate_node_props(const char *dir_abspa
sdb, new_wcroot_abspath,
svn_relpath_join(dir_relpath, name, scratch_pool),
base_props, revert_props, working_props,
- original_format,
+ original_format, wc_id,
scratch_pool));
}
@@ -914,6 +917,7 @@ migrate_props(const char *dir_abspath,
const char *new_wcroot_abspath,
svn_sqlite__db_t *sdb,
int original_format,
+ apr_int64_t wc_id,
apr_pool_t *scratch_pool)
{
/* General logic here: iterate over all the immediate children of the root
@@ -947,10 +951,10 @@ migrate_props(const char *dir_abspath,
/* Migrate the props for "this dir". */
SVN_ERR(migrate_node_props(dir_abspath, new_wcroot_abspath, "", sdb,
- original_format, iterpool));
+ original_format, wc_id, iterpool));
/* Iterate over all the files in this SDB. */
- SVN_ERR(get_versioned_files(&children, dir_relpath, sdb, scratch_pool,
+ SVN_ERR(get_versioned_files(&children, dir_relpath, sdb, wc_id, scratch_pool,
iterpool));
for (i = 0; i < children->nelts; i++)
{
@@ -959,7 +963,7 @@ migrate_props(const char *dir_abspath,
svn_pool_clear(iterpool);
SVN_ERR(migrate_node_props(dir_abspath, new_wcroot_abspath,
- name, sdb, original_format, iterpool));
+ name, sdb, original_format, wc_id, iterpool));
}
svn_pool_destroy(iterpool);
@@ -1269,16 +1273,14 @@ upgrade_externals(struct bump_baton *bb,
while (have_row)
{
apr_hash_t *props;
- const svn_string_t *externals = NULL;
+ const char *externals;
svn_pool_clear(iterpool);
SVN_ERR(svn_sqlite__column_properties(&props, stmt, 0,
iterpool, iterpool));
- if (props)
- externals = apr_hash_get(props, SVN_PROP_EXTERNALS,
- APR_HASH_KEY_STRING);
+ externals = svn_prop_get_value(props, SVN_PROP_EXTERNALS);
if (externals)
{
@@ -1292,7 +1294,7 @@ upgrade_externals(struct bump_baton *bb,
iterpool);
SVN_ERR(svn_wc_parse_externals_description3(&ext, local_abspath,
- externals->data, FALSE,
+ externals, FALSE,
iterpool));
for (i = 0; i < ext->nelts; i++)
@@ -1375,10 +1377,11 @@ upgrade_to_wcng(void **dir_baton,
svn_wc__db_t *db,
const char *dir_abspath,
int old_format,
+ apr_int64_t wc_id,
svn_wc_upgrade_get_repos_info_t repos_info_func,
void *repos_info_baton,
apr_hash_t *repos_cache,
- struct upgrade_data_t *data,
+ const struct upgrade_data_t *data,
apr_pool_t *result_pool,
apr_pool_t *scratch_pool)
{
@@ -1489,7 +1492,7 @@ upgrade_to_wcng(void **dir_baton,
database. The upgrade process needs the children in BASE_NODE and
WORKING_NODE, and to examine the resultant WORKING state. */
SVN_ERR(migrate_props(dir_abspath, data->root_abspath, data->sdb, old_format,
- scratch_pool));
+ wc_id, scratch_pool));
return SVN_NO_ERROR;
}
@@ -1649,7 +1652,7 @@ upgrade_working_copy(void *parent_baton,
svn_wc_upgrade_get_repos_info_t repos_info_func,
void *repos_info_baton,
apr_hash_t *repos_cache,
- struct upgrade_data_t *data,
+ const struct upgrade_data_t *data,
svn_cancel_func_t cancel_func,
void *cancel_baton,
svn_wc_notify_func2_t notify_func,
@@ -1681,11 +1684,12 @@ upgrade_working_copy(void *parent_baton,
return SVN_NO_ERROR;
}
- err = get_versioned_subdirs(&subdirs, NULL, dir_abspath,
+ err = get_versioned_subdirs(&subdirs, NULL, dir_abspath, FALSE,
scratch_pool, iterpool);
if (err)
{
- if (APR_STATUS_IS_ENOENT(err->apr_err))
+ if (APR_STATUS_IS_ENOENT(err->apr_err)
+ || SVN__APR_STATUS_IS_ENOTDIR(err->apr_err))
{
/* An unversioned dir is obstructing a versioned dir */
svn_error_clear(err);
@@ -1701,7 +1705,8 @@ upgrade_working_copy(void *parent_baton,
}
- SVN_ERR(upgrade_to_wcng(&dir_baton, parent_baton, db, dir_abspath, old_format,
+ SVN_ERR(upgrade_to_wcng(&dir_baton, parent_baton, db, dir_abspath,
+ old_format, data->wc_id,
repos_info_func, repos_info_baton,
repos_cache, data, scratch_pool, iterpool));
@@ -1749,6 +1754,8 @@ is_old_wcroot(const char *local_abspath,
_("Can't upgrade '%s' as it is not a pre-1.7 working copy directory"),
svn_dirent_local_style(local_abspath, scratch_pool));
}
+ else if (svn_dirent_is_root(local_abspath, strlen(local_abspath)))
+ return SVN_NO_ERROR;
svn_dirent_split(&parent_abspath, &name, local_abspath, scratch_pool);
@@ -1763,14 +1770,15 @@ is_old_wcroot(const char *local_abspath,
entry = apr_hash_get(entries, name, APR_HASH_KEY_STRING);
if (!entry
|| entry->absent
- || (entry->deleted && entry->schedule != svn_wc_schedule_add))
+ || (entry->deleted && entry->schedule != svn_wc_schedule_add)
+ || entry->depth == svn_depth_exclude)
{
return SVN_NO_ERROR;
}
- svn_dirent_split(&parent_abspath, &name, parent_abspath, scratch_pool);
while (!svn_dirent_is_root(parent_abspath, strlen(parent_abspath)))
{
+ svn_dirent_split(&parent_abspath, &name, parent_abspath, scratch_pool);
err = svn_wc__read_entries_old(&entries, parent_abspath,
scratch_pool, scratch_pool);
if (err)
@@ -1782,12 +1790,12 @@ is_old_wcroot(const char *local_abspath,
entry = apr_hash_get(entries, name, APR_HASH_KEY_STRING);
if (!entry
|| entry->absent
- || (entry->deleted && entry->schedule != svn_wc_schedule_add))
+ || (entry->deleted && entry->schedule != svn_wc_schedule_add)
+ || entry->depth == svn_depth_exclude)
{
parent_abspath = svn_dirent_join(parent_abspath, name, scratch_pool);
break;
}
- svn_dirent_split(&parent_abspath, &name, parent_abspath, scratch_pool);
}
return svn_error_createf(
@@ -1806,7 +1814,7 @@ typedef struct upgrade_working_copy_bato
svn_wc_upgrade_get_repos_info_t repos_info_func;
void *repos_info_baton;
apr_hash_t *repos_cache;
- struct upgrade_data_t *data;
+ const struct upgrade_data_t *data;
svn_cancel_func_t cancel_func;
void *cancel_baton;
svn_wc_notify_func2_t notify_func;
Modified: subversion/branches/gpg-agent-password-store/subversion/libsvn_wc/wc-metadata.sql
URL: http://svn.apache.org/viewvc/subversion/branches/gpg-agent-password-store/subversion/libsvn_wc/wc-metadata.sql?rev=1148581&r1=1148580&r2=1148581&view=diff
==============================================================================
--- subversion/branches/gpg-agent-password-store/subversion/libsvn_wc/wc-metadata.sql (original)
+++ subversion/branches/gpg-agent-password-store/subversion/libsvn_wc/wc-metadata.sql Tue Jul 19 23:05:44 2011
@@ -763,6 +763,10 @@ PRAGMA user_version = 29;
number will be, however, so we're just marking it as 99 for now. */
-- format: 99
+/* TODO: Rename the "absent" presence value to "server-excluded" before
+ the 1.7 release. wc_db.c and this file have references to "absent" which
+ still need to be changed to "server-excluded". */
+
/* Now "drop" the tree_conflict_data column from actual_node. */
CREATE TABLE ACTUAL_NODE_BACKUP (
wc_id INTEGER NOT NULL,