You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by hw...@apache.org on 2012/05/16 22:32:54 UTC
svn commit: r1339349 [23/37] - in /subversion/branches/fix-rdump-editor: ./
build/ build/ac-macros/ build/generator/ build/generator/templates/
build/win32/ contrib/client-side/emacs/ contrib/client-side/vim/
contrib/server-side/ notes/ notes/api-errat...
Modified: subversion/branches/fix-rdump-editor/subversion/libsvn_wc/props.c
URL: http://svn.apache.org/viewvc/subversion/branches/fix-rdump-editor/subversion/libsvn_wc/props.c?rev=1339349&r1=1339348&r2=1339349&view=diff
==============================================================================
--- subversion/branches/fix-rdump-editor/subversion/libsvn_wc/props.c (original)
+++ subversion/branches/fix-rdump-editor/subversion/libsvn_wc/props.c Wed May 16 20:32:43 2012
@@ -79,14 +79,12 @@ append_prop_conflict(svn_stream_t *strea
/* TODO: someday, perhaps prefix each conflict_description with a
timestamp or something? */
const svn_string_t *conflict_desc;
- apr_size_t len;
const char *native_text;
SVN_ERR(prop_conflict_from_skel(&conflict_desc, prop_skel, pool, pool));
native_text = svn_utf_cstring_from_utf8_fuzzy(conflict_desc->data, pool);
- len = strlen(native_text);
- return svn_stream_write(stream, native_text, &len);
+ return svn_stream_puts(stream, native_text);
}
@@ -788,7 +786,7 @@ set_prop_merge_state(svn_wc_notify_state
* 'choose_postpone', then set *CONFLICT_REMAINS to TRUE and return.
*
* If the callback responds with a choice of 'base', 'theirs', 'mine',
- * or 'merged', then install the proper value into WORKING_PROPS and
+ * or 'merged', then install the proper value into ACTUAL_PROPS and
* set *CONFLICT_REMAINS to FALSE.
*/
static svn_error_t *
@@ -799,7 +797,7 @@ maybe_generate_propconflict(svn_boolean_
const svn_wc_conflict_version_t *right_version,
svn_boolean_t is_dir,
const char *propname,
- apr_hash_t *working_props,
+ apr_hash_t *actual_props,
const svn_string_t *incoming_old_val,
const svn_string_t *incoming_new_val,
const svn_string_t *base_val,
@@ -936,7 +934,7 @@ maybe_generate_propconflict(svn_boolean_
}
/* Build the rest of the description object: */
- cdesc->mime_type = (is_dir ? NULL : svn_prop_get_value(working_props,
+ cdesc->mime_type = (is_dir ? NULL : svn_prop_get_value(actual_props,
SVN_PROP_MIME_TYPE));
cdesc->is_binary = (cdesc->mime_type
&& svn_mime_type_is_binary(cdesc->mime_type));
@@ -978,7 +976,7 @@ maybe_generate_propconflict(svn_boolean_
}
case svn_wc_conflict_choose_mine_full:
{
- /* No need to change working_props; it already contains working_val */
+ /* No need to change actual_props; it already contains working_val */
*conflict_remains = FALSE;
break;
}
@@ -989,14 +987,14 @@ maybe_generate_propconflict(svn_boolean_
then choose _mine side or _theirs side for conflicting ones. */
case svn_wc_conflict_choose_theirs_full:
{
- apr_hash_set(working_props, propname, APR_HASH_KEY_STRING,
+ apr_hash_set(actual_props, propname, APR_HASH_KEY_STRING,
incoming_new_val);
*conflict_remains = FALSE;
break;
}
case svn_wc_conflict_choose_base:
{
- apr_hash_set(working_props, propname, APR_HASH_KEY_STRING, base_val);
+ apr_hash_set(actual_props, propname, APR_HASH_KEY_STRING, base_val);
*conflict_remains = FALSE;
break;
}
@@ -1018,7 +1016,7 @@ maybe_generate_propconflict(svn_boolean_
cdesc->merged_file,
scratch_pool));
merged_string = svn_stringbuf__morph_into_string(merged_stringbuf);
- apr_hash_set(working_props, propname,
+ apr_hash_set(actual_props, propname,
APR_HASH_KEY_STRING, merged_string);
*conflict_remains = FALSE;
}
@@ -1033,7 +1031,7 @@ maybe_generate_propconflict(svn_boolean_
}
-/* Add the property with name PROPNAME to the set of WORKING_PROPS on
+/* Add the property with name PROPNAME to the set of ACTUAL_PROPS on
* PATH, setting *STATE or *CONFLICT_REMAINS according to merge outcomes.
*
* *STATE is an input and output parameter, its value is to be
@@ -1055,7 +1053,7 @@ apply_single_prop_add(svn_wc_notify_stat
const svn_wc_conflict_version_t *left_version,
const svn_wc_conflict_version_t *right_version,
svn_boolean_t is_dir,
- apr_hash_t *working_props,
+ apr_hash_t *actual_props,
const char *propname,
const svn_string_t *base_val,
const svn_string_t *new_val,
@@ -1067,13 +1065,13 @@ apply_single_prop_add(svn_wc_notify_stat
{
svn_string_t *working_val
- = apr_hash_get(working_props, propname, APR_HASH_KEY_STRING);
+ = apr_hash_get(actual_props, propname, APR_HASH_KEY_STRING);
*conflict_remains = FALSE;
if (working_val)
{
- /* the property already exists in working_props... */
+ /* the property already exists in actual_props... */
if (svn_string_compare(working_val, new_val))
/* The value we want is already there, so it's a merge. */
@@ -1107,7 +1105,7 @@ apply_single_prop_add(svn_wc_notify_stat
else
{
merged_prop = TRUE;
- apr_hash_set(working_props, propname,
+ apr_hash_set(actual_props, propname,
APR_HASH_KEY_STRING, merged_val);
set_prop_merge_state(state, svn_wc_notify_state_merged);
}
@@ -1119,7 +1117,7 @@ apply_single_prop_add(svn_wc_notify_stat
db, local_abspath,
left_version, right_version,
is_dir,
- propname, working_props,
+ propname, actual_props,
NULL, new_val,
base_val, working_val,
conflict_func,
@@ -1134,21 +1132,21 @@ apply_single_prop_add(svn_wc_notify_stat
db, local_abspath,
left_version, right_version,
is_dir, propname,
- working_props, NULL, new_val,
+ actual_props, NULL, new_val,
base_val, NULL,
conflict_func, conflict_baton,
dry_run, scratch_pool));
}
- else /* property doesn't yet exist in working_props... */
+ else /* property doesn't yet exist in actual_props... */
/* so just set it */
- apr_hash_set(working_props, propname, APR_HASH_KEY_STRING, new_val);
+ apr_hash_set(actual_props, propname, APR_HASH_KEY_STRING, new_val);
return SVN_NO_ERROR;
}
/* Delete the property with name PROPNAME from the set of
- * WORKING_PROPS on PATH, setting *STATE or *CONFLICT_REMAINS according to
+ * ACTUAL_PROPS on PATH, setting *STATE or *CONFLICT_REMAINS according to
* merge outcomes.
*
* *STATE is an input and output parameter, its value is to be
@@ -1171,7 +1169,7 @@ apply_single_prop_delete(svn_wc_notify_s
const svn_wc_conflict_version_t *left_version,
const svn_wc_conflict_version_t *right_version,
svn_boolean_t is_dir,
- apr_hash_t *working_props,
+ apr_hash_t *actual_props,
const char *propname,
const svn_string_t *base_val,
const svn_string_t *old_val,
@@ -1182,7 +1180,7 @@ apply_single_prop_delete(svn_wc_notify_s
apr_pool_t *scratch_pool)
{
svn_string_t *working_val
- = apr_hash_get(working_props, propname, APR_HASH_KEY_STRING);
+ = apr_hash_get(actual_props, propname, APR_HASH_KEY_STRING);
*conflict_remains = FALSE;
@@ -1196,14 +1194,14 @@ apply_single_prop_delete(svn_wc_notify_s
db, local_abspath,
left_version, right_version,
is_dir, propname,
- working_props, old_val, NULL,
+ actual_props, old_val, NULL,
base_val, working_val,
conflict_func, conflict_baton,
dry_run, scratch_pool));
}
else
{
- apr_hash_set(working_props, propname, APR_HASH_KEY_STRING, NULL);
+ apr_hash_set(actual_props, propname, APR_HASH_KEY_STRING, NULL);
if (old_val)
/* This is a merge, merging a delete into non-existent
property or a local addition of same prop value. */
@@ -1217,14 +1215,14 @@ apply_single_prop_delete(svn_wc_notify_s
{
if (svn_string_compare(working_val, old_val))
/* they have the same values, so it's an update */
- apr_hash_set(working_props, propname, APR_HASH_KEY_STRING, NULL);
+ apr_hash_set(actual_props, propname, APR_HASH_KEY_STRING, NULL);
else
{
SVN_ERR(maybe_generate_propconflict(conflict_remains,
db, local_abspath,
left_version, right_version,
is_dir,
- propname, working_props,
+ propname, actual_props,
old_val, NULL,
base_val, working_val,
conflict_func,
@@ -1244,7 +1242,7 @@ apply_single_prop_delete(svn_wc_notify_s
db, local_abspath,
left_version, right_version,
is_dir, propname,
- working_props, old_val, NULL,
+ actual_props, old_val, NULL,
base_val, working_val,
conflict_func, conflict_baton,
dry_run, scratch_pool));
@@ -1269,7 +1267,7 @@ apply_single_mergeinfo_prop_change(svn_w
const svn_wc_conflict_version_t *left_version,
const svn_wc_conflict_version_t *right_version,
svn_boolean_t is_dir,
- apr_hash_t *working_props,
+ apr_hash_t *actual_props,
const char *propname,
const svn_string_t *base_val,
const svn_string_t *old_val,
@@ -1281,7 +1279,7 @@ apply_single_mergeinfo_prop_change(svn_w
apr_pool_t *scratch_pool)
{
svn_string_t *working_val
- = apr_hash_get(working_props, propname, APR_HASH_KEY_STRING);
+ = apr_hash_get(actual_props, propname, APR_HASH_KEY_STRING);
if ((working_val && ! base_val)
|| (! working_val && base_val)
@@ -1305,7 +1303,7 @@ apply_single_mergeinfo_prop_change(svn_w
new_val,
result_pool,
scratch_pool));
- apr_hash_set(working_props, propname,
+ apr_hash_set(actual_props, propname,
APR_HASH_KEY_STRING, new_val);
set_prop_merge_state(state, svn_wc_notify_state_merged);
}
@@ -1317,7 +1315,7 @@ apply_single_mergeinfo_prop_change(svn_w
SVN_ERR(maybe_generate_propconflict(conflict_remains,
db, local_abspath,
left_version, right_version,
- is_dir, propname, working_props,
+ is_dir, propname, actual_props,
old_val, new_val,
base_val, working_val,
conflict_func, conflict_baton,
@@ -1339,14 +1337,14 @@ apply_single_mergeinfo_prop_change(svn_w
old_val, new_val, scratch_pool));
SVN_ERR(svn_mergeinfo_to_string(&mergeinfo_string,
added_mergeinfo, result_pool));
- apr_hash_set(working_props, propname, APR_HASH_KEY_STRING,
+ apr_hash_set(actual_props, propname, APR_HASH_KEY_STRING,
mergeinfo_string);
}
else /* means working && base && svn_string_compare(working, base) */
{
if (svn_string_compare(old_val, base_val))
- apr_hash_set(working_props, propname, APR_HASH_KEY_STRING, new_val);
+ apr_hash_set(actual_props, propname, APR_HASH_KEY_STRING, new_val);
else
{
@@ -1358,7 +1356,7 @@ apply_single_mergeinfo_prop_change(svn_w
working_val,
new_val, result_pool,
scratch_pool));
- apr_hash_set(working_props, propname,
+ apr_hash_set(actual_props, propname,
APR_HASH_KEY_STRING, new_val);
set_prop_merge_state(state, svn_wc_notify_state_merged);
}
@@ -1381,7 +1379,7 @@ apply_single_generic_prop_change(svn_wc_
const svn_wc_conflict_version_t *left_version,
const svn_wc_conflict_version_t *right_version,
svn_boolean_t is_dir,
- apr_hash_t *working_props,
+ apr_hash_t *actual_props,
const char *propname,
const svn_string_t *base_val,
const svn_string_t *old_val,
@@ -1393,7 +1391,7 @@ apply_single_generic_prop_change(svn_wc_
apr_pool_t *scratch_pool)
{
svn_string_t *working_val
- = apr_hash_get(working_props, propname, APR_HASH_KEY_STRING);
+ = apr_hash_get(actual_props, propname, APR_HASH_KEY_STRING);
SVN_ERR_ASSERT(old_val != NULL);
@@ -1411,7 +1409,7 @@ apply_single_generic_prop_change(svn_wc_
&& svn_string_compare(working_val, old_val))
{
/* A trivial update: change it to new_val. */
- apr_hash_set(working_props, propname, APR_HASH_KEY_STRING, new_val);
+ apr_hash_set(actual_props, propname, APR_HASH_KEY_STRING, new_val);
}
else
{
@@ -1419,7 +1417,7 @@ apply_single_generic_prop_change(svn_wc_
SVN_ERR(maybe_generate_propconflict(conflict_remains,
db, local_abspath,
left_version, right_version,
- is_dir, propname, working_props,
+ is_dir, propname, actual_props,
old_val, new_val,
base_val, working_val,
conflict_func, conflict_baton,
@@ -1429,7 +1427,7 @@ apply_single_generic_prop_change(svn_wc_
return SVN_NO_ERROR;
}
-/* Change the property with name PROPNAME in the set of WORKING_PROPS
+/* Change the property with name PROPNAME in the set of ACTUAL_PROPS
* on PATH, setting *STATE or *CONFLICT_REMAINS according to the merge outcome.
*
* *STATE is an input and output parameter, its value is to be
@@ -1454,7 +1452,7 @@ apply_single_prop_change(svn_wc_notify_s
const svn_wc_conflict_version_t *left_version,
const svn_wc_conflict_version_t *right_version,
svn_boolean_t is_dir,
- apr_hash_t *working_props,
+ apr_hash_t *actual_props,
const char *propname,
const svn_string_t *base_val,
const svn_string_t *old_val,
@@ -1490,7 +1488,7 @@ apply_single_prop_change(svn_wc_notify_s
left_version,
right_version,
is_dir,
- working_props,
+ actual_props,
propname,
base_val,
old_val,
@@ -1522,7 +1520,7 @@ apply_single_prop_change(svn_wc_notify_s
db, local_abspath,
left_version, right_version,
is_dir,
- working_props,
+ actual_props,
propname, base_val, old_val,
new_val,
conflict_func, conflict_baton,
@@ -1988,7 +1986,7 @@ svn_wc_prop_get2(const svn_string_t **va
apr_pool_t *result_pool,
apr_pool_t *scratch_pool)
{
- enum svn_prop_kind kind = svn_property_kind(NULL, name);
+ enum svn_prop_kind kind = svn_property_kind2(name);
SVN_ERR_ASSERT(svn_dirent_is_absolute(local_abspath));
@@ -2014,7 +2012,7 @@ svn_wc__internal_propget(const svn_strin
apr_pool_t *scratch_pool)
{
apr_hash_t *prophash = NULL;
- enum svn_prop_kind kind = svn_property_kind(NULL, name);
+ enum svn_prop_kind kind = svn_property_kind2(name);
svn_boolean_t hidden;
SVN_ERR_ASSERT(svn_dirent_is_absolute(local_abspath));
@@ -2429,7 +2427,7 @@ svn_wc_prop_set4(svn_wc_context_t *wc_ct
void *notify_baton,
apr_pool_t *scratch_pool)
{
- enum svn_prop_kind prop_kind = svn_property_kind(NULL, name);
+ enum svn_prop_kind prop_kind = svn_property_kind2(name);
svn_kind_t kind;
const char *dir_abspath;
@@ -2609,7 +2607,7 @@ svn_wc_canonicalize_svn_prop(const svn_s
svn_boolean_t
svn_wc_is_normal_prop(const char *name)
{
- enum svn_prop_kind kind = svn_property_kind(NULL, name);
+ enum svn_prop_kind kind = svn_property_kind2(name);
return (kind == svn_prop_regular_kind);
}
@@ -2617,7 +2615,7 @@ svn_wc_is_normal_prop(const char *name)
svn_boolean_t
svn_wc_is_wc_prop(const char *name)
{
- enum svn_prop_kind kind = svn_property_kind(NULL, name);
+ enum svn_prop_kind kind = svn_property_kind2(name);
return (kind == svn_prop_wc_kind);
}
@@ -2625,7 +2623,7 @@ svn_wc_is_wc_prop(const char *name)
svn_boolean_t
svn_wc_is_entry_prop(const char *name)
{
- enum svn_prop_kind kind = svn_property_kind(NULL, name);
+ enum svn_prop_kind kind = svn_property_kind2(name);
return (kind == svn_prop_entry_kind);
}
Modified: subversion/branches/fix-rdump-editor/subversion/libsvn_wc/questions.c
URL: http://svn.apache.org/viewvc/subversion/branches/fix-rdump-editor/subversion/libsvn_wc/questions.c?rev=1339349&r1=1339348&r2=1339349&view=diff
==============================================================================
--- subversion/branches/fix-rdump-editor/subversion/libsvn_wc/questions.c (original)
+++ subversion/branches/fix-rdump-editor/subversion/libsvn_wc/questions.c Wed May 16 20:32:43 2012
@@ -374,11 +374,9 @@ svn_error_t *
svn_wc_text_modified_p2(svn_boolean_t *modified_p,
svn_wc_context_t *wc_ctx,
const char *local_abspath,
- svn_boolean_t force_comparison,
+ svn_boolean_t unused,
apr_pool_t *scratch_pool)
{
- /* ### We ignore FORCE_COMPARISON, but we also fixed its only
- remaining use-case */
return svn_wc__internal_file_modified_p(modified_p, wc_ctx->db,
local_abspath, FALSE, scratch_pool);
}
@@ -398,6 +396,8 @@ svn_wc__internal_conflicted_p(svn_boolea
const apr_array_header_t *conflicts;
int i;
svn_boolean_t conflicted;
+ svn_boolean_t resolved_text = FALSE;
+ svn_boolean_t resolved_props = FALSE;
if (text_conflicted_p)
*text_conflicted_p = FALSE;
@@ -466,7 +466,12 @@ svn_wc__internal_conflicted_p(svn_boolea
scratch_pool));
*text_conflicted_p = (kind == svn_node_file);
+
+ if (*text_conflicted_p)
+ break;
}
+
+ resolved_text = TRUE; /* Remove in-db conflict marker */
break;
case svn_wc_conflict_kind_property:
@@ -479,8 +484,11 @@ svn_wc__internal_conflicted_p(svn_boolea
scratch_pool));
*prop_conflicted_p = (kind == svn_node_file);
- }
+ if (*prop_conflicted_p)
+ break;
+ }
+ resolved_props = TRUE; /* Remove in-db conflict marker */
break;
case svn_wc_conflict_kind_tree:
@@ -494,6 +502,23 @@ svn_wc__internal_conflicted_p(svn_boolea
break;
}
}
+
+ if (resolved_text || resolved_props)
+ {
+ svn_boolean_t own_lock;
+
+ /* The marker files are missing, so "repair" wc.db if we can */
+ SVN_ERR(svn_wc__db_wclock_owns_lock(&own_lock, db, local_abspath, FALSE,
+ scratch_pool));
+ if (own_lock)
+ SVN_ERR(svn_wc__db_op_mark_resolved(db, local_abspath,
+ resolved_text,
+ resolved_props,
+ FALSE /* resolved_tree */,
+ NULL /* work_items */,
+ scratch_pool));
+ }
+
return SVN_NO_ERROR;
}
Modified: subversion/branches/fix-rdump-editor/subversion/libsvn_wc/status.c
URL: http://svn.apache.org/viewvc/subversion/branches/fix-rdump-editor/subversion/libsvn_wc/status.c?rev=1339349&r1=1339348&r2=1339349&view=diff
==============================================================================
--- subversion/branches/fix-rdump-editor/subversion/libsvn_wc/status.c (original)
+++ subversion/branches/fix-rdump-editor/subversion/libsvn_wc/status.c Wed May 16 20:32:43 2012
@@ -949,6 +949,9 @@ send_status_structure(const struct walk_
IGNORES is a list of patterns to include; typically this will
be the default ignores as, for example, specified in a config file.
+ If MAY_HAVE_PROPS is false, local_abspath is assumed to have no
+ properties.
+
LOCAL_ABSPATH and DB control how to access the ignore information.
Allocate results in RESULT_POOL, temporary stuffs in SCRATCH_POOL.
@@ -960,11 +963,13 @@ collect_ignore_patterns(apr_array_header
svn_wc__db_t *db,
const char *local_abspath,
const apr_array_header_t *ignores,
+ svn_boolean_t may_have_props,
apr_pool_t *result_pool,
apr_pool_t *scratch_pool)
{
int i;
const svn_string_t *value;
+ apr_hash_t *props;
/* ### assert we are passed a directory? */
@@ -978,9 +983,18 @@ collect_ignore_patterns(apr_array_header
ignore);
}
+ if (!may_have_props)
+ return SVN_NO_ERROR;
+
/* Then add any svn:ignore globs to the PATTERNS array. */
- SVN_ERR(svn_wc__internal_propget(&value, db, local_abspath, SVN_PROP_IGNORE,
- scratch_pool, scratch_pool));
+ SVN_ERR(svn_wc__db_read_props(&props, db, local_abspath,
+ scratch_pool, scratch_pool));
+
+ if (!props)
+ return SVN_NO_ERROR;
+
+ value = apr_hash_get(props, SVN_PROP_IGNORE, APR_HASH_KEY_STRING);
+
if (value != NULL)
svn_cstring_split_append(*patterns, value->data, "\n\r", FALSE,
result_pool);
@@ -1120,6 +1134,8 @@ get_dir_status(const struct walk_status_
* DIR_REPOS_* should reflect LOCAL_ABSPATH's parent URL, i.e. LOCAL_ABSPATH's
* URL treated with svn_uri_dirname(). ### TODO verify this (externals)
*
+ * DIR_HAS_PROPS is a boolean indicating whether PARENT_ABSPATH has properties.
+ *
* If *COLLECTED_IGNORE_PATTERNS is NULL and ignore patterns are needed in
* this call, *COLLECTED_IGNORE_PATTERNS will be set to an apr_array_header_t*
* containing all ignore patterns, as returned by collect_ignore_patterns() on
@@ -1140,6 +1156,7 @@ one_child_status(const struct walk_statu
const char *dir_repos_root_url,
const char *dir_repos_relpath,
const char *dir_repos_uuid,
+ svn_boolean_t dir_has_props,
svn_boolean_t unversioned_tree_conflicted,
apr_array_header_t **collected_ignore_patterns,
const apr_array_header_t *ignore_patterns,
@@ -1227,6 +1244,7 @@ one_child_status(const struct walk_statu
if (ignore_patterns && ! *collected_ignore_patterns)
SVN_ERR(collect_ignore_patterns(collected_ignore_patterns, wb->db,
parent_abspath, ignore_patterns,
+ dir_has_props,
result_pool, scratch_pool));
SVN_ERR(send_unversioned_item(wb,
@@ -1284,6 +1302,7 @@ get_dir_status(const struct walk_status_
const char *dir_repos_root_url;
const char *dir_repos_relpath;
const char *dir_repos_uuid;
+ svn_boolean_t dir_has_props;
apr_hash_t *dirents, *nodes, *conflicts, *all_children;
apr_array_header_t *collected_ignore_patterns = NULL;
apr_pool_t *iterpool, *subpool = svn_pool_create(scratch_pool);
@@ -1368,6 +1387,8 @@ get_dir_status(const struct walk_status_
if (depth == svn_depth_empty)
return SVN_NO_ERROR;
+ dir_has_props = (dir_info->had_props || dir_info->props_mod);
+
/* Walk all the children of this directory. */
for (hi = apr_hash_first(subpool, all_children); hi; hi = apr_hash_next(hi))
{
@@ -1394,6 +1415,7 @@ get_dir_status(const struct walk_status_
dir_repos_root_url,
dir_repos_relpath,
dir_repos_uuid,
+ dir_has_props,
apr_hash_get(conflicts, key, klen) != NULL,
&collected_ignore_patterns,
ignore_patterns,
@@ -1480,6 +1502,7 @@ get_child_status(const struct walk_statu
dir_repos_root_url,
dir_repos_relpath,
dir_repos_uuid,
+ (dir_info->had_props || dir_info->props_mod),
FALSE, /* unversioned_tree_conflicted */
&collected_ignore_patterns,
ignore_patterns,
@@ -2588,7 +2611,7 @@ svn_wc__get_status_editor(const svn_delt
shim_callbacks->fetch_baton = sfb;
SVN_ERR(svn_editor__insert_shims(editor, edit_baton, *editor, *edit_baton,
- shim_callbacks,
+ NULL, NULL, shim_callbacks,
result_pool, scratch_pool));
return SVN_NO_ERROR;
@@ -2937,6 +2960,6 @@ 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,
+ default_ignores, TRUE,
result_pool, scratch_pool));
}
Modified: subversion/branches/fix-rdump-editor/subversion/libsvn_wc/update_editor.c
URL: http://svn.apache.org/viewvc/subversion/branches/fix-rdump-editor/subversion/libsvn_wc/update_editor.c?rev=1339349&r1=1339348&r2=1339349&view=diff
==============================================================================
--- subversion/branches/fix-rdump-editor/subversion/libsvn_wc/update_editor.c (original)
+++ subversion/branches/fix-rdump-editor/subversion/libsvn_wc/update_editor.c Wed May 16 20:32:43 2012
@@ -50,6 +50,7 @@
#include "translate.h"
#include "workqueue.h"
+#include "private/svn_subr_private.h"
#include "private/svn_wc_private.h"
/* Checks whether a svn_wc__db_status_t indicates whether a node is
present in a working copy. Used by the editor implementation */
@@ -961,8 +962,7 @@ window_handler(svn_txdelta_window_t *win
{
/* Tell the file baton about the new text base's checksums. */
fb->new_text_base_md5_checksum =
- svn_checksum__from_digest(hb->new_text_base_md5_digest,
- svn_checksum_md5, fb->pool);
+ svn_checksum__from_digest_md5(hb->new_text_base_md5_digest, fb->pool);
fb->new_text_base_sha1_checksum =
svn_checksum_dup(hb->new_text_base_sha1_checksum, fb->pool);
@@ -2541,7 +2541,7 @@ change_dir_prop(void *dir_baton,
propchange->name = apr_pstrdup(db->pool, name);
propchange->value = value ? svn_string_dup(value, db->pool) : NULL;
- if (!db->edited && svn_property_kind(NULL, name) == svn_prop_regular_kind)
+ if (!db->edited && svn_property_kind2(name) == svn_prop_regular_kind)
SVN_ERR(mark_directory_edited(db, pool));
return SVN_NO_ERROR;
@@ -3724,7 +3724,7 @@ change_file_prop(void *file_baton,
propchange->name = apr_pstrdup(fb->pool, name);
propchange->value = value ? svn_string_dup(value, fb->pool) : NULL;
- if (!fb->edited && svn_property_kind(NULL, name) == svn_prop_regular_kind)
+ if (!fb->edited && svn_property_kind2(name) == svn_prop_regular_kind)
SVN_ERR(mark_file_edited(fb, scratch_pool));
return SVN_NO_ERROR;
@@ -4470,8 +4470,8 @@ close_file(void *file_baton,
NULL /* left_version */,
NULL /* right_version */,
NULL /* server_baseprops (not merging) */,
- current_base_props /* base_props */,
- fake_actual_props /* working_props */,
+ current_base_props /* pristine_props */,
+ fake_actual_props /* actual_props */,
regular_prop_changes, /* propchanges */
TRUE /* base_merge */,
FALSE /* dry_run */,
@@ -4560,23 +4560,32 @@ close_file(void *file_baton,
/* Send a notification to the callback function. (Skip notifications
about files which were already notified for another reason.) */
- if (eb->notify_func && !fb->already_notified && fb->edited)
+ if (eb->notify_func && !fb->already_notified
+ && (fb->edited || lock_state == svn_wc_notify_lock_state_unlocked))
{
svn_wc_notify_t *notify;
svn_wc_notify_action_t action = svn_wc_notify_update_update;
- if (fb->shadowed)
- action = fb->adding_file
- ? svn_wc_notify_update_shadowed_add
- : svn_wc_notify_update_shadowed_update;
- else if (fb->obstruction_found || fb->add_existed)
+ if (fb->edited)
{
- if (content_state != svn_wc_notify_state_conflicted)
- action = svn_wc_notify_exists;
+ if (fb->shadowed)
+ action = fb->adding_file
+ ? svn_wc_notify_update_shadowed_add
+ : svn_wc_notify_update_shadowed_update;
+ else if (fb->obstruction_found || fb->add_existed)
+ {
+ if (content_state != svn_wc_notify_state_conflicted)
+ action = svn_wc_notify_exists;
+ }
+ else if (fb->adding_file)
+ {
+ action = svn_wc_notify_update_add;
+ }
}
- else if (fb->adding_file)
+ else
{
- action = svn_wc_notify_update_add;
+ SVN_ERR_ASSERT(lock_state == svn_wc_notify_lock_state_unlocked);
+ action = svn_wc_notify_update_broken_lock;
}
/* If the file was moved-away, notify for the moved-away node.
@@ -4996,7 +5005,8 @@ make_editor(svn_revnum_t *target_revisio
shim_callbacks->fetch_baton = sfb;
SVN_ERR(svn_editor__insert_shims(editor, edit_baton, *editor, *edit_baton,
- shim_callbacks, result_pool, scratch_pool));
+ NULL, NULL, shim_callbacks,
+ result_pool, scratch_pool));
return SVN_NO_ERROR;
}
Modified: subversion/branches/fix-rdump-editor/subversion/libsvn_wc/wc-metadata.sql
URL: http://svn.apache.org/viewvc/subversion/branches/fix-rdump-editor/subversion/libsvn_wc/wc-metadata.sql?rev=1339349&r1=1339348&r2=1339349&view=diff
==============================================================================
--- subversion/branches/fix-rdump-editor/subversion/libsvn_wc/wc-metadata.sql (original)
+++ subversion/branches/fix-rdump-editor/subversion/libsvn_wc/wc-metadata.sql Wed May 16 20:32:43 2012
@@ -389,12 +389,13 @@ CREATE TABLE NODES (
moved_here INTEGER,
/* If the underlying node was moved away (rather than just deleted), this
- specifies the local_relpath of where the BASE node was moved to.
+ specifies the local_relpath of where the node was moved to.
This is set only on the root of a move, and is NULL for all children.
- Note that moved_to never refers to *this* node. It always refers
- to the "underlying" node in the BASE tree. A non-NULL moved_to column
- is only valid in rows where op_depth == 0. */
+ The op-depth of the moved-to node is not recorded. A moved_to path
+ always points at a node within the highest op-depth layer at the
+ destination. This invariant must be maintained by operations which
+ change existing move information. */
moved_to TEXT,
Modified: subversion/branches/fix-rdump-editor/subversion/libsvn_wc/wc-queries.sql
URL: http://svn.apache.org/viewvc/subversion/branches/fix-rdump-editor/subversion/libsvn_wc/wc-queries.sql?rev=1339349&r1=1339348&r2=1339349&view=diff
==============================================================================
--- subversion/branches/fix-rdump-editor/subversion/libsvn_wc/wc-queries.sql (original)
+++ subversion/branches/fix-rdump-editor/subversion/libsvn_wc/wc-queries.sql Wed May 16 20:32:43 2012
@@ -51,8 +51,7 @@ ORDER BY op_depth DESC
-- STMT_SELECT_BASE_NODE
SELECT repos_id, repos_path, presence, kind, revision, checksum,
translated_size, changed_revision, changed_date, changed_author, depth,
- symlink_target, last_mod_time, properties, file_external IS NOT NULL,
- moved_to
+ symlink_target, last_mod_time, properties, file_external IS NOT NULL
FROM nodes
WHERE wc_id = ?1 AND local_relpath = ?2 AND op_depth = 0
@@ -60,7 +59,6 @@ WHERE wc_id = ?1 AND local_relpath = ?2
SELECT nodes.repos_id, nodes.repos_path, presence, kind, revision,
checksum, translated_size, changed_revision, changed_date, changed_author,
depth, symlink_target, last_mod_time, properties, file_external IS NOT NULL,
- moved_to,
/* All the columns until now must match those returned by
STMT_SELECT_BASE_NODE. The implementation of svn_wc__db_base_get_info()
assumes that these columns are followed by the lock information) */
@@ -283,18 +281,42 @@ WHERE wc_id = ?1 AND local_relpath = ?2
SELECT dav_cache FROM nodes
WHERE wc_id = ?1 AND local_relpath = ?2 AND op_depth = 0
+/* ### FIXME. modes_move.moved_to IS NOT NULL works when there is
+ only one move but we need something else when there are several. */
-- STMT_SELECT_DELETION_INFO
-SELECT nodes_base.presence, nodes_work.presence, nodes_base.moved_to,
+SELECT nodes_base.presence, nodes_work.presence, nodes_move.moved_to,
nodes_work.op_depth
FROM nodes AS nodes_work
+LEFT OUTER JOIN nodes nodes_move ON nodes_move.wc_id = nodes_work.wc_id
+ AND nodes_move.local_relpath = nodes_work.local_relpath
+ AND nodes_move.moved_to IS NOT NULL
LEFT OUTER JOIN nodes nodes_base ON nodes_base.wc_id = nodes_work.wc_id
- AND nodes_base.local_relpath = nodes_work.local_relpath
- AND nodes_base.op_depth = 0
+ AND nodes_base.local_relpath = nodes_work.local_relpath
+ AND nodes_base.op_depth = 0
WHERE nodes_work.wc_id = ?1 AND nodes_work.local_relpath = ?2
AND nodes_work.op_depth = (SELECT MAX(op_depth) FROM nodes
WHERE wc_id = ?1 AND local_relpath = ?2
AND op_depth > 0)
+-- STMT_SELECT_OP_DEPTH_MOVED_TO
+SELECT op_depth, moved_to, repos_path, revision
+FROM nodes
+WHERE wc_id = ?1 AND local_relpath = ?2
+ AND op_depth <= (SELECT MIN(op_depth) FROM nodes
+ WHERE wc_id = ?1 AND local_relpath = ?2 AND op_depth > ?3)
+ORDER BY op_depth DESC
+
+-- STMT_SELECT_MOVED_TO
+SELECT moved_to
+FROM nodes
+WHERE wc_id = ?1 AND local_relpath = ?2 AND op_depth = ?3
+
+-- STMT_SELECT_MOVED_HERE
+SELECT moved_here, presence, repos_path, revision
+FROM nodes
+WHERE wc_id = ?1 AND local_relpath = ?2 AND op_depth >= ?3
+ORDER BY op_depth
+
-- STMT_DELETE_LOCK
DELETE FROM lock
WHERE repos_id = ?1 AND repos_relpath = ?2
@@ -884,28 +906,32 @@ INSERT OR REPLACE INTO nodes (
wc_id, local_relpath, op_depth, parent_relpath, repos_id,
repos_path, revision, presence, depth, moved_here, kind, changed_revision,
changed_date, changed_author, checksum, properties, translated_size,
- last_mod_time, symlink_target )
-SELECT wc_id, ?3 /*local_relpath*/, ?4 /*op_depth*/, ?5 /*parent_relpath*/,
- repos_id, repos_path, revision, ?6 /*presence*/, depth, ?7/*moved_here*/,
- kind, changed_revision, changed_date, changed_author, checksum, properties,
- translated_size, last_mod_time, symlink_target
-FROM nodes
-WHERE wc_id = ?1 AND local_relpath = ?2 AND op_depth = 0
+ last_mod_time, symlink_target, moved_to )
+SELECT src.wc_id, ?3 /*local_relpath*/, ?4 /*op_depth*/, ?5 /*parent_relpath*/,
+ src.repos_id, src.repos_path, src.revision, ?6 /*presence*/, src.depth,
+ ?7/*moved_here*/, src.kind, src.changed_revision, src.changed_date,
+ src.changed_author, src.checksum, src.properties, src.translated_size,
+ src.last_mod_time, src.symlink_target, dst.moved_to
+FROM nodes AS src
+LEFT OUTER JOIN nodes_current dst ON dst.wc_id = src.wc_id
+ AND dst.local_relpath = ?3 AND dst.op_depth = ?4
+WHERE src.wc_id = ?1 AND src.local_relpath = ?2 AND src.op_depth = 0
-- STMT_INSERT_WORKING_NODE_COPY_FROM_WORKING
INSERT OR REPLACE INTO nodes (
- wc_id, local_relpath, op_depth, parent_relpath, repos_id, repos_path,
- revision, presence, depth, moved_here, kind, changed_revision, changed_date,
- changed_author, checksum, properties, translated_size, last_mod_time,
- symlink_target )
-SELECT wc_id, ?3 /*local_relpath*/, ?4 /*op_depth*/, ?5 /*parent_relpath*/,
- repos_id, repos_path, revision, ?6 /*presence*/, depth, ?7 /*moved_here*/,
- kind, changed_revision, changed_date, changed_author, checksum, properties,
- translated_size, last_mod_time, symlink_target
-FROM nodes
-WHERE wc_id = ?1 AND local_relpath = ?2 AND op_depth > 0
-ORDER BY op_depth DESC
-LIMIT 1
+ wc_id, local_relpath, op_depth, parent_relpath, repos_id,
+ repos_path, revision, presence, depth, moved_here, kind, changed_revision,
+ changed_date, changed_author, checksum, properties, translated_size,
+ last_mod_time, symlink_target, moved_to )
+SELECT src.wc_id, ?3 /*local_relpath*/, ?4 /*op_depth*/, ?5 /*parent_relpath*/,
+ src.repos_id, src.repos_path, src.revision, ?6 /*presence*/, src.depth,
+ ?7 /*moved_here*/, src.kind, src.changed_revision, src.changed_date,
+ src.changed_author, src.checksum, src.properties, src.translated_size,
+ src.last_mod_time, src.symlink_target, dst.moved_to
+FROM nodes_current AS src
+LEFT OUTER JOIN nodes_current dst ON dst.wc_id = src.wc_id
+ AND dst.local_relpath = ?3 AND dst.op_depth = ?4
+WHERE src.wc_id = ?1 AND src.local_relpath = ?2 AND src.op_depth > 0
-- STMT_INSERT_WORKING_NODE_COPY_FROM_DEPTH
INSERT OR REPLACE INTO nodes (
@@ -1373,34 +1399,48 @@ WHERE wc_id = ?1
AND presence='normal'
AND file_external IS NULL
+/* ### FIXME: op-depth? What about multiple moves? */
-- STMT_SELECT_MOVED_FROM_RELPATH
-SELECT local_relpath FROM nodes
-WHERE wc_id = ?1 AND moved_to = ?2 AND op_depth = 0
+SELECT local_relpath, op_depth FROM nodes
+WHERE wc_id = ?1 AND moved_to = ?2 AND op_depth > 0
-- STMT_UPDATE_MOVED_TO_RELPATH
-UPDATE nodes SET moved_to = ?3
-WHERE wc_id = ?1 AND local_relpath = ?2 AND op_depth = 0
+UPDATE nodes SET moved_to = ?4
+WHERE wc_id = ?1 AND local_relpath = ?2 AND op_depth = ?3
+/* ### FIXME: op-depth? What about multiple moves? */
-- STMT_CLEAR_MOVED_TO_RELPATH
UPDATE nodes SET moved_to = NULL
-WHERE wc_id = ?1 AND local_relpath = ?2 AND op_depth = 0
-
--- STMT_CLEAR_MOVED_TO_RELPATH_RECURSIVE
-UPDATE nodes SET moved_to = NULL
-WHERE wc_id = ?1
- AND (?2 = ''
- OR local_relpath = ?2
- OR IS_STRICT_DESCENDANT_OF(local_relpath, ?2))
- AND op_depth = 0
+WHERE wc_id = ?1 AND local_relpath = ?2
/* This statement returns pairs of move-roots below the path ?2 in WC_ID ?1.
* Each row returns a moved-here path (always a child of ?2) in the first
* column, and its matching moved-away (deleted) path in the second column. */
-- STMT_SELECT_MOVED_HERE_CHILDREN
SELECT moved_to, local_relpath FROM nodes
-WHERE wc_id = ?1 AND op_depth = 0
+WHERE wc_id = ?1 AND op_depth > 0
AND IS_STRICT_DESCENDANT_OF(moved_to, ?2)
+/* This statement returns pairs of paths that define a move where the
+ destination of the move is within the subtree rooted at path ?2 in
+ WC_ID ?1. */
+-- STMT_SELECT_MOVED_PAIR
+SELECT local_relpath, moved_to, op_depth FROM nodes_current
+WHERE wc_id = ?1
+ AND (IS_STRICT_DESCENDANT_OF(moved_to, ?2)
+ OR (IS_STRICT_DESCENDANT_OF(local_relpath, ?2)
+ AND moved_to IS NOT NULL))
+
+/* This statement returns pairs of move-roots below the path ?2 in WC_ID ?1,
+ * where the source of the move is within the subtree rooted at path ?2, and
+ * the destination of the move is outside the subtree rooted at path ?2. */
+-- STMT_SELECT_MOVED_PAIR2
+SELECT local_relpath, moved_to FROM nodes_current
+WHERE wc_id = ?1
+ AND IS_STRICT_DESCENDANT_OF(local_relpath, ?2)
+ AND moved_to IS NOT NULL
+ AND NOT IS_STRICT_DESCENDANT_OF(moved_to, ?2)
+
/* ------------------------------------------------------------------------- */
/* Queries for verification. */
Modified: subversion/branches/fix-rdump-editor/subversion/libsvn_wc/wc.h
URL: http://svn.apache.org/viewvc/subversion/branches/fix-rdump-editor/subversion/libsvn_wc/wc.h?rev=1339349&r1=1339348&r2=1339349&view=diff
==============================================================================
--- subversion/branches/fix-rdump-editor/subversion/libsvn_wc/wc.h (original)
+++ subversion/branches/fix-rdump-editor/subversion/libsvn_wc/wc.h Wed May 16 20:32:43 2012
@@ -627,12 +627,16 @@ svn_wc__internal_get_origin(svn_boolean_
apr_pool_t *result_pool,
apr_pool_t *scratch_pool);
-/* Internal version of svn_wc__node_get_commit_base_rev */
+/* Internal version of svn_wc__node_get_commit_base() */
svn_error_t *
-svn_wc__internal_get_commit_base_rev(svn_revnum_t *commit_base_revision,
- svn_wc__db_t *db,
- const char *local_abspath,
- apr_pool_t *scratch_pool);
+svn_wc__internal_get_commit_base(svn_revnum_t *commit_base_revision,
+ const char **repos_relpath,
+ const char **repos_root_url,
+ const char **repos_uuid,
+ svn_wc__db_t *db,
+ const char *local_abspath,
+ apr_pool_t *result_pool,
+ apr_pool_t *scratch_pool);
/* Internal version of svn_wc__node_get_repos_info() */