Modified: subversion/branches/remove-log-addressing/subversion/libsvn_wc/props.c URL: http://svn.apache.org/viewvc/subversion/branches/remove-log-addressing/subversion/libsvn_wc/props.c?rev=1620589&r1=1620588&r2=1620589&view=diff ============================================================================== --- subversion/branches/remove-log-addressing/subversion/libsvn_wc/props.c (original) +++ subversion/branches/remove-log-addressing/subversion/libsvn_wc/props.c Tue Aug 26 13:00:03 2014 @@ -62,31 +62,6 @@ #include "svn_private_config.h" -/* Forward declaration. */ -static svn_error_t * -prop_conflict_from_skel(const svn_string_t **conflict_desc, - const svn_skel_t *skel, - apr_pool_t *result_pool, - apr_pool_t *scratch_pool); - -/* Given a *SINGLE* property conflict in PROP_SKEL, generate a description - for it, and write it to STREAM, along with a trailing EOL sequence. - - See prop_conflict_from_skel() for details on PROP_SKEL. */ -static svn_error_t * -append_prop_conflict(svn_stream_t *stream, - const svn_skel_t *prop_skel, - apr_pool_t *pool) -{ - /* TODO: someday, perhaps prefix each conflict_description with a - timestamp or something? */ - const svn_string_t *conflict_desc; - - SVN_ERR(prop_conflict_from_skel(&conflict_desc, prop_skel, pool, pool)); - - return svn_stream_puts(stream, conflict_desc->data); -} - /*---------------------------------------------------------------------*/ /*** Merging propchanges into the working copy ***/ @@ -531,27 +506,20 @@ maybe_prop_value(const svn_skel_t *skel, } -/* Parse a property conflict description from the provided SKEL. - The result includes a descriptive message (see generate_conflict_message) - and maybe a diff of property values containing conflict markers. - The result will be allocated in RESULT_POOL. - - Note: SKEL is a single property conflict of the form: - - ("prop" ([ORIGINAL]) ([MINE]) ([INCOMING]) ([INCOMING_BASE])) - - See notes/wc-ng/conflict-storage for more information. */ +/* Create a property rejection description for the specified property. + The result will be allocated in RESULT_POOL. */ static svn_error_t * -prop_conflict_from_skel(const svn_string_t **conflict_desc, - const svn_skel_t *skel, - apr_pool_t *result_pool, - apr_pool_t *scratch_pool) +prop_conflict_new(const svn_string_t **conflict_desc, + const char *propname, + const svn_string_t *original, + const svn_string_t *mine, + const svn_string_t *incoming, + const svn_string_t *incoming_base, + svn_cancel_func_t cancel_func, + void *cancel_baton, + apr_pool_t *result_pool, + apr_pool_t *scratch_pool) { - const svn_string_t *original; - const svn_string_t *mine; - const svn_string_t *incoming; - const svn_string_t *incoming_base; - const char *propname; svn_diff_t *diff; svn_diff_file_options_t *diff_opts; svn_stringbuf_t *buf; @@ -559,17 +527,6 @@ prop_conflict_from_skel(const svn_string svn_boolean_t mine_is_binary; svn_boolean_t incoming_is_binary; - /* Navigate to the property name. */ - skel = skel->children->next; - - /* We need to copy these into SCRATCH_POOL in order to nul-terminate - the values. */ - propname = apr_pstrmemdup(scratch_pool, skel->data, skel->len); - original = maybe_prop_value(skel->next, scratch_pool); - mine = maybe_prop_value(skel->next->next, scratch_pool); - incoming = maybe_prop_value(skel->next->next->next, scratch_pool); - incoming_base = maybe_prop_value(skel->next->next->next->next, scratch_pool); - buf = generate_conflict_message(propname, original, mine, incoming, incoming_base, scratch_pool); @@ -653,13 +610,15 @@ prop_conflict_from_skel(const svn_string style = svn_diff_conflict_display_modified_original_latest; stream = svn_stream_from_stringbuf(buf, scratch_pool); SVN_ERR(svn_stream_skip(stream, buf->len)); - SVN_ERR(svn_diff_mem_string_output_merge2(stream, diff, + SVN_ERR(svn_diff_mem_string_output_merge3(stream, diff, incoming_base_ascii, mine_ascii, incoming_ascii, incoming_base_marker, mine_marker, incoming_marker, separator, - style, scratch_pool)); + style, + cancel_func, cancel_baton, + scratch_pool)); SVN_ERR(svn_stream_close(stream)); *conflict_desc = svn_string_create_from_buf(buf, result_pool); @@ -694,6 +653,49 @@ prop_conflict_from_skel(const svn_string return SVN_NO_ERROR; } +/* Parse a property conflict description from the provided SKEL. + The result includes a descriptive message (see generate_conflict_message) + and maybe a diff of property values containing conflict markers. + The result will be allocated in RESULT_POOL. + + Note: SKEL is a single property conflict of the form: + + ("prop" ([ORIGINAL]) ([MINE]) ([INCOMING]) ([INCOMING_BASE])) + + Note: This is not the same format as the property conflicts we store in + wc.db since 1.8. This is the legacy format used in the Workqueue in 1.7-1.8 */ +static svn_error_t * +prop_conflict_from_skel(const svn_string_t **conflict_desc, + const svn_skel_t *skel, + svn_cancel_func_t cancel_func, + void *cancel_baton, + apr_pool_t *result_pool, + apr_pool_t *scratch_pool) +{ + const svn_string_t *original; + const svn_string_t *mine; + const svn_string_t *incoming; + const svn_string_t *incoming_base; + const char *propname; + + /* Navigate to the property name. */ + skel = skel->children->next; + + /* We need to copy these into SCRATCH_POOL in order to nul-terminate + the values. */ + propname = apr_pstrmemdup(scratch_pool, skel->data, skel->len); + original = maybe_prop_value(skel->next, scratch_pool); + mine = maybe_prop_value(skel->next->next, scratch_pool); + incoming = maybe_prop_value(skel->next->next->next, scratch_pool); + incoming_base = maybe_prop_value(skel->next->next->next->next, scratch_pool); + + return svn_error_trace(prop_conflict_new(conflict_desc, + propname, + original, mine, + incoming, incoming_base, + cancel_func, cancel_baton, + result_pool, scratch_pool)); +} /* Create a property conflict file at PREJFILE based on the property conflicts in CONFLICT_SKEL. */ @@ -701,7 +703,9 @@ svn_error_t * svn_wc__create_prejfile(const char **tmp_prejfile_abspath, svn_wc__db_t *db, const char *local_abspath, - const svn_skel_t *conflict_skel, + const svn_skel_t *prop_conflict_data, + svn_cancel_func_t cancel_func, + void *cancel_baton, apr_pool_t *result_pool, apr_pool_t *scratch_pool) { @@ -719,11 +723,87 @@ svn_wc__create_prejfile(const char **tmp tempdir_abspath, svn_io_file_del_none, scratch_pool, iterpool)); - for (scan = conflict_skel->children->next; scan != NULL; scan = scan->next) + if (prop_conflict_data) { - svn_pool_clear(iterpool); + for (scan = prop_conflict_data->children->next; + scan != NULL; scan = scan->next) + { + const svn_string_t *conflict_desc; - SVN_ERR(append_prop_conflict(stream, scan, iterpool)); + svn_pool_clear(iterpool); + + SVN_ERR(prop_conflict_from_skel(&conflict_desc, scan, + cancel_func, cancel_baton, + iterpool, iterpool)); + + SVN_ERR(svn_stream_puts(stream, conflict_desc->data)); + } + } + else + { + svn_wc_operation_t operation; + apr_hash_index_t *hi; + apr_hash_t *old_props; + apr_hash_t *mine_props; + apr_hash_t *their_original_props; + apr_hash_t *their_props; + apr_hash_t *conflicted_props; + svn_skel_t *conflicts; + + SVN_ERR(svn_wc__db_read_conflict(&conflicts, db, local_abspath, + scratch_pool, scratch_pool)); + + SVN_ERR(svn_wc__conflict_read_info(&operation, NULL, NULL, NULL, NULL, + db, local_abspath, + conflicts, + scratch_pool, scratch_pool)); + + SVN_ERR(svn_wc__conflict_read_prop_conflict(NULL, + &mine_props, + &their_original_props, + &their_props, + &conflicted_props, + db, local_abspath, + conflicts, + scratch_pool, + scratch_pool)); + + if (operation == svn_wc_operation_merge) + SVN_ERR(svn_wc__db_read_pristine_props(&old_props, db, local_abspath, + scratch_pool, scratch_pool)); + else + old_props = their_original_props; + + /* ### TODO: Sort conflicts? */ + for (hi = apr_hash_first(scratch_pool, conflicted_props); + hi; + hi = apr_hash_next(hi)) + { + const svn_string_t *conflict_desc; + const char *propname = apr_hash_this_key(hi); + const svn_string_t *old_value; + const svn_string_t *mine_value; + const svn_string_t *their_value; + const svn_string_t *their_original_value; + + svn_pool_clear(iterpool); + + old_value = old_props ? svn_hash_gets(old_props, propname) : NULL; + mine_value = mine_props ? svn_hash_gets(mine_props, propname) : NULL; + their_value = their_props ? svn_hash_gets(their_props, propname) + : NULL; + their_original_value = their_original_props + ? svn_hash_gets(their_original_props, propname) + : NULL; + + SVN_ERR(prop_conflict_new(&conflict_desc, + propname, old_value, mine_value, + their_value, their_original_value, + cancel_func, cancel_baton, + iterpool, iterpool)); + + SVN_ERR(svn_stream_puts(stream, conflict_desc->data)); + } } SVN_ERR(svn_stream_close(stream));
Modified: subversion/branches/remove-log-addressing/subversion/libsvn_wc/props.h URL: http://svn.apache.org/viewvc/subversion/branches/remove-log-addressing/subversion/libsvn_wc/props.h?rev=1620589&r1=1620588&r2=1620589&view=diff ============================================================================== --- subversion/branches/remove-log-addressing/subversion/libsvn_wc/props.h (original) +++ subversion/branches/remove-log-addressing/subversion/libsvn_wc/props.h Tue Aug 26 13:00:03 2014 @@ -139,11 +139,17 @@ svn_wc__get_actual_props(apr_hash_t **pr apr_pool_t *result_pool, apr_pool_t *scratch_pool); +/* Creates a property reject file at *TMP_PREJFILE_ABSPATH, with + either the property conflict data from DB (when PROP_CONFLICT_DATA + is NULL) or the information in PROP_CONFLICT_DATA if it isn't. + */ svn_error_t * svn_wc__create_prejfile(const char **tmp_prejfile_abspath, svn_wc__db_t *db, const char *local_abspath, - const svn_skel_t *conflict_skel, + const svn_skel_t *prop_conflict_data, + svn_cancel_func_t cancel_func, + void *cancel_baton, apr_pool_t *result_pool, apr_pool_t *scratch_pool); Modified: subversion/branches/remove-log-addressing/subversion/libsvn_wc/tree_conflicts.c URL: http://svn.apache.org/viewvc/subversion/branches/remove-log-addressing/subversion/libsvn_wc/tree_conflicts.c?rev=1620589&r1=1620588&r2=1620589&view=diff ============================================================================== --- subversion/branches/remove-log-addressing/subversion/libsvn_wc/tree_conflicts.c (original) +++ subversion/branches/remove-log-addressing/subversion/libsvn_wc/tree_conflicts.c Tue Aug 26 13:00:03 2014 @@ -46,6 +46,7 @@ static const svn_token_map_t node_kind_m { "file", svn_node_file }, { "dir", svn_node_dir }, { "", svn_node_unknown }, + /* ### should also map svn_node_symlink */ { NULL } }; @@ -196,7 +197,7 @@ read_node_version_info(const svn_wc_conf svn_error_t * -svn_wc__deserialize_conflict(const svn_wc_conflict_description3_t **conflict, +svn_wc__deserialize_conflict(const svn_wc_conflict_description2_t **conflict, const svn_skel_t *skel, const char *dir_path, apr_pool_t *result_pool, @@ -211,7 +212,7 @@ svn_wc__deserialize_conflict(const svn_w const svn_wc_conflict_version_t *src_left_version; const svn_wc_conflict_version_t *src_right_version; int n; - svn_wc_conflict_description3_t *new_conflict; + svn_wc_conflict_description2_t *new_conflict; if (!is_valid_conflict_skel(skel)) return svn_error_createf(SVN_ERR_WC_CORRUPT, NULL, @@ -266,7 +267,7 @@ svn_wc__deserialize_conflict(const svn_w SVN_ERR(read_node_version_info(&src_right_version, skel->next, result_pool, scratch_pool)); - new_conflict = svn_wc_conflict_description_create_tree3(victim_abspath, + new_conflict = svn_wc_conflict_description_create_tree2(victim_abspath, node_kind, operation, src_left_version, src_right_version, result_pool); new_conflict->action = action; @@ -329,7 +330,7 @@ prepend_version_info_skel(svn_skel_t *pa svn_error_t * svn_wc__serialize_conflict(svn_skel_t **skel, - const svn_wc_conflict_description3_t *conflict, + const svn_wc_conflict_description2_t *conflict, apr_pool_t *result_pool, apr_pool_t *scratch_pool) { @@ -353,13 +354,13 @@ svn_wc__serialize_conflict(svn_skel_t ** else SVN_ERR(prepend_version_info_skel(c_skel, &null_version, result_pool)); - /* reason */ - skel_prepend_enum(c_skel, svn_wc__conflict_reason_map, conflict->reason, - result_pool); - - /* action */ - skel_prepend_enum(c_skel, svn_wc__conflict_action_map, conflict->action, - result_pool); + /* local change */ + skel_prepend_enum(c_skel, svn_wc__conflict_reason_map, + conflict->reason, result_pool); + + /* incoming change */ + skel_prepend_enum(c_skel, svn_wc__conflict_action_map, + conflict->action, result_pool); /* operation */ skel_prepend_enum(c_skel, svn_wc__operation_map, conflict->operation, @@ -367,8 +368,10 @@ svn_wc__serialize_conflict(svn_skel_t ** /* node_kind */ SVN_ERR_ASSERT(conflict->node_kind == svn_node_dir - || conflict->node_kind == svn_node_file); - skel_prepend_enum(c_skel, node_kind_map, conflict->node_kind, result_pool); + || conflict->node_kind == svn_node_file + || conflict->node_kind == svn_node_none); + skel_prepend_enum(c_skel, node_kind_map, conflict->node_kind, + result_pool); /* Victim path (escaping separator chars). */ victim_basename = svn_dirent_basename(conflict->local_abspath, result_pool); @@ -401,7 +404,7 @@ svn_wc__del_tree_conflict(svn_wc_context svn_error_t * svn_wc__add_tree_conflict(svn_wc_context_t *wc_ctx, - const svn_wc_conflict_description3_t *conflict, + const svn_wc_conflict_description2_t *conflict, apr_pool_t *scratch_pool) { svn_boolean_t existing_conflict; @@ -409,10 +412,9 @@ svn_wc__add_tree_conflict(svn_wc_context svn_error_t *err; SVN_ERR_ASSERT(conflict != NULL); - SVN_ERR_ASSERT(conflict->operation == svn_wc_operation_merge - || (conflict->reason != svn_wc_conflict_reason_moved_away - && conflict->reason != svn_wc_conflict_reason_moved_here) - ); + SVN_ERR_ASSERT(conflict->operation == svn_wc_operation_merge || + (conflict->reason != svn_wc_conflict_reason_moved_away && + conflict->reason != svn_wc_conflict_reason_moved_here)); /* Re-adding an existing tree conflict victim is an error. */ err = svn_wc__internal_conflicted_p(NULL, NULL, &existing_conflict, @@ -473,7 +475,7 @@ svn_wc__add_tree_conflict(svn_wc_context svn_error_t * -svn_wc__get_tree_conflict(const svn_wc_conflict_description3_t **tree_conflict, +svn_wc__get_tree_conflict(const svn_wc_conflict_description2_t **tree_conflict, svn_wc_context_t *wc_ctx, const char *local_abspath, apr_pool_t *result_pool, @@ -495,13 +497,13 @@ svn_wc__get_tree_conflict(const svn_wc_c for (i = 0; i < conflicts->nelts; i++) { - const svn_wc_conflict_description3_t *desc; + const svn_wc_conflict_description2_t *desc; - desc = APR_ARRAY_IDX(conflicts, i, svn_wc_conflict_description3_t *); + desc = APR_ARRAY_IDX(conflicts, i, svn_wc_conflict_description2_t *); if (desc->kind == svn_wc_conflict_kind_tree) { - *tree_conflict = svn_wc__conflict_description3_dup(desc, result_pool); + *tree_conflict = svn_wc_conflict_description2_dup(desc, result_pool); return SVN_NO_ERROR; } } Modified: subversion/branches/remove-log-addressing/subversion/libsvn_wc/tree_conflicts.h URL: http://svn.apache.org/viewvc/subversion/branches/remove-log-addressing/subversion/libsvn_wc/tree_conflicts.h?rev=1620589&r1=1620588&r2=1620589&view=diff ============================================================================== --- subversion/branches/remove-log-addressing/subversion/libsvn_wc/tree_conflicts.h (original) +++ subversion/branches/remove-log-addressing/subversion/libsvn_wc/tree_conflicts.h Tue Aug 26 13:00:03 2014 @@ -62,18 +62,18 @@ extern "C" { svn_error_t * svn_wc__serialize_conflict(svn_skel_t **skel, - const svn_wc_conflict_description3_t *conflict, + const svn_wc_conflict_description2_t *conflict, apr_pool_t *result_pool, apr_pool_t *scratch_pool); -/* Parse a newly allocated svn_wc_conflict_description3_t object from the +/* Parse a newly allocated svn_wc_conflict_description2_t object from the * provided SKEL. Return the result in *CONFLICT, allocated in RESULT_POOL. * DIR_PATH is the path to the WC directory whose conflicts are being read. * Use SCRATCH_POOL for temporary allocations. */ svn_error_t * -svn_wc__deserialize_conflict(const svn_wc_conflict_description3_t **conflict, +svn_wc__deserialize_conflict(const svn_wc_conflict_description2_t **conflict, const svn_skel_t *skel, const char *dir_path, apr_pool_t *result_pool, Modified: subversion/branches/remove-log-addressing/subversion/libsvn_wc/update_editor.c URL: http://svn.apache.org/viewvc/subversion/branches/remove-log-addressing/subversion/libsvn_wc/update_editor.c?rev=1620589&r1=1620588&r2=1620589&view=diff ============================================================================== --- subversion/branches/remove-log-addressing/subversion/libsvn_wc/update_editor.c (original) +++ subversion/branches/remove-log-addressing/subversion/libsvn_wc/update_editor.c Tue Aug 26 13:00:03 2014 @@ -832,6 +832,8 @@ complete_conflict(svn_skel_t *conflict, svn_wc_conflict_version_t *target_version; svn_boolean_t is_complete; + SVN_ERR_ASSERT(new_repos_relpath); + if (!conflict) return SVN_NO_ERROR; /* Not conflicted */ @@ -850,15 +852,12 @@ complete_conflict(svn_skel_t *conflict, else original_version = NULL; - if (new_repos_relpath) - target_version = svn_wc_conflict_version_create2(eb->repos_root, - eb->repos_uuid, - new_repos_relpath, - *eb->target_revision, - target_kind, - result_pool); - else - target_version = NULL; + target_version = svn_wc_conflict_version_create2(eb->repos_root, + eb->repos_uuid, + new_repos_relpath, + *eb->target_revision, + target_kind, + result_pool); if (eb->switch_repos_relpath) SVN_ERR(svn_wc__conflict_skel_set_op_switch(conflict, @@ -1134,17 +1133,6 @@ set_target_revision(void *edit_baton, return SVN_NO_ERROR; } -static svn_error_t * -check_tree_conflict(svn_skel_t **pconflict, - struct edit_baton *eb, - const char *local_abspath, - svn_wc__db_status_t working_status, - svn_boolean_t exists_in_repos, - svn_node_kind_t expected_kind, - svn_wc_conflict_action_t action, - apr_pool_t *result_pool, - apr_pool_t *scratch_pool); - /* An svn_delta_editor_t function. */ static svn_error_t * open_root(void *edit_baton, @@ -1697,6 +1685,7 @@ delete_entry(const char *path, const char *base = svn_relpath_basename(path, NULL); const char *local_abspath; const char *repos_relpath; + const char *deleted_repos_relpath; svn_node_kind_t kind; svn_revnum_t old_revision; svn_boolean_t conflicted; @@ -1881,8 +1870,14 @@ delete_entry(const char *path, SVN_ERR_MALFUNCTION(); /* other reasons are not expected here */ } + /* Calculate the repository-relative path of the entry which was + * deleted. For updates it's the same as REPOS_RELPATH but for + * switches it is within the switch target. */ + SVN_ERR(calculate_repos_relpath(&deleted_repos_relpath, local_abspath, + repos_relpath, eb, pb, scratch_pool, + scratch_pool)); SVN_ERR(complete_conflict(tree_conflict, eb, local_abspath, repos_relpath, - old_revision, NULL, + old_revision, deleted_repos_relpath, (kind == svn_node_dir) ? svn_node_dir : svn_node_file, @@ -2989,6 +2984,7 @@ absent_node(const char *path, svn_error_t *err; svn_wc__db_status_t status; svn_node_kind_t kind; + svn_skel_t *tree_conflict = NULL; if (pb->skip_this) return SVN_NO_ERROR; @@ -3077,25 +3073,28 @@ absent_node(const char *path, { /* We have a local addition. If this would be a BASE node it would have been deleted before we get here. (Which might have turned it into - a copy). - - ### This should be recorded as a tree conflict and the update - ### can just continue, as we can just record the absent status - ### in BASE. - */ + a copy). */ SVN_ERR_ASSERT(status != svn_wc__db_status_normal); - return svn_error_createf( - SVN_ERR_WC_OBSTRUCTED_UPDATE, NULL, - _("Failed to mark '%s' absent: item of the same name is already " - "scheduled for addition"), - svn_dirent_local_style(local_abspath, pool)); + if (!pb->shadowed && !pb->edit_obstructed) + SVN_ERR(check_tree_conflict(&tree_conflict, eb, local_abspath, + status, FALSE, svn_node_unknown, + svn_wc_conflict_action_add, + scratch_pool, scratch_pool)); + } { const char *repos_relpath; repos_relpath = svn_relpath_join(pb->new_repos_relpath, name, scratch_pool); + if (tree_conflict) + SVN_ERR(complete_conflict(tree_conflict, eb, local_abspath, + NULL, SVN_INVALID_REVNUM, repos_relpath, + kind, svn_node_unknown, + scratch_pool, scratch_pool)); + + /* 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_excluded_node(eb->db, local_abspath, @@ -3104,8 +3103,23 @@ absent_node(const char *path, *(eb->target_revision), absent_kind, svn_wc__db_status_server_excluded, - NULL, NULL, + tree_conflict, NULL, scratch_pool)); + + if (tree_conflict) + { + if (eb->conflict_func) + SVN_ERR(svn_wc__conflict_invoke_resolver(eb->db, local_abspath, + tree_conflict, + NULL /* merge_options */, + eb->conflict_func, + eb->conflict_baton, + eb->cancel_func, + eb->cancel_baton, + scratch_pool)); + do_notification(eb, local_abspath, kind, svn_wc_notify_tree_conflict, + scratch_pool); + } } svn_pool_destroy(scratch_pool); Modified: subversion/branches/remove-log-addressing/subversion/libsvn_wc/upgrade.c URL: http://svn.apache.org/viewvc/subversion/branches/remove-log-addressing/subversion/libsvn_wc/upgrade.c?rev=1620589&r1=1620588&r2=1620589&view=diff ============================================================================== --- subversion/branches/remove-log-addressing/subversion/libsvn_wc/upgrade.c (original) +++ subversion/branches/remove-log-addressing/subversion/libsvn_wc/upgrade.c Tue Aug 26 13:00:03 2014 @@ -654,8 +654,8 @@ ensure_repos_info(svn_wc_entry_t *entry, /* * Read tree conflict descriptions from @a conflict_data. Set @a *conflicts - * to a hash of pointers to svn_wc_conflict_description3_t objects indexed by - * svn_wc_conflict_description3_t.local_abspath, all newly allocated in @a + * to a hash of pointers to svn_wc_conflict_description2_t objects indexed by + * svn_wc_conflict_description2_t.local_abspath, all newly allocated in @a * pool. @a dir_path is the path to the working copy directory whose conflicts * are being read. The conflicts read are the tree conflicts on the immediate * child nodes of @a dir_path. Do all allocations in @a pool. @@ -692,7 +692,7 @@ read_tree_conflicts(apr_hash_t **conflic iterpool = svn_pool_create(pool); for (skel = skel->children; skel != NULL; skel = skel->next) { - const svn_wc_conflict_description3_t *conflict; + const svn_wc_conflict_description2_t *conflict; svn_pool_clear(iterpool); SVN_ERR(svn_wc__deserialize_conflict(&conflict, skel, dir_path, @@ -727,7 +727,7 @@ migrate_single_tree_conflict_data(svn_sq hi; hi = apr_hash_next(hi)) { - const svn_wc_conflict_description3_t *conflict = apr_hash_this_val(hi); + const svn_wc_conflict_description2_t *conflict = apr_hash_this_val(hi); const char *conflict_relpath; const char *conflict_data; svn_sqlite__stmt_t *stmt; @@ -1431,7 +1431,7 @@ svn_wc__upgrade_conflict_skel_from_raw(s if (tree_conflict_data) { svn_skel_t *tc_skel; - const svn_wc_conflict_description3_t *tc; + const svn_wc_conflict_description2_t *tc; const char *local_abspath; if (!conflict_data) Modified: subversion/branches/remove-log-addressing/subversion/libsvn_wc/util.c URL: http://svn.apache.org/viewvc/subversion/branches/remove-log-addressing/subversion/libsvn_wc/util.c?rev=1620589&r1=1620588&r2=1620589&view=diff ============================================================================== --- subversion/branches/remove-log-addressing/subversion/libsvn_wc/util.c (original) +++ subversion/branches/remove-log-addressing/subversion/libsvn_wc/util.c Tue Aug 26 13:00:03 2014 @@ -188,11 +188,11 @@ svn_wc_match_ignore_list(const char *str return svn_cstring_match_glob_list(str, list); } -svn_wc_conflict_description3_t * -svn_wc_conflict_description_create_text3(const char *local_abspath, +svn_wc_conflict_description2_t * +svn_wc_conflict_description_create_text2(const char *local_abspath, apr_pool_t *result_pool) { - svn_wc_conflict_description3_t *conflict; + svn_wc_conflict_description2_t *conflict; SVN_ERR_ASSERT_NO_RETURN(svn_dirent_is_absolute(local_abspath)); @@ -205,13 +205,13 @@ svn_wc_conflict_description_create_text3 return conflict; } -svn_wc_conflict_description3_t * -svn_wc_conflict_description_create_prop3(const char *local_abspath, +svn_wc_conflict_description2_t * +svn_wc_conflict_description_create_prop2(const char *local_abspath, svn_node_kind_t node_kind, const char *property_name, apr_pool_t *result_pool) { - svn_wc_conflict_description3_t *conflict; + svn_wc_conflict_description2_t *conflict; SVN_ERR_ASSERT_NO_RETURN(svn_dirent_is_absolute(local_abspath)); @@ -223,8 +223,8 @@ svn_wc_conflict_description_create_prop3 return conflict; } -svn_wc_conflict_description3_t * -svn_wc_conflict_description_create_tree3( +svn_wc_conflict_description2_t * +svn_wc_conflict_description_create_tree2( const char *local_abspath, svn_node_kind_t node_kind, svn_wc_operation_t operation, @@ -232,7 +232,7 @@ svn_wc_conflict_description_create_tree3 const svn_wc_conflict_version_t *src_right_version, apr_pool_t *result_pool) { - svn_wc_conflict_description3_t *conflict; + svn_wc_conflict_description2_t *conflict; SVN_ERR_ASSERT_NO_RETURN(svn_dirent_is_absolute(local_abspath)); @@ -248,12 +248,37 @@ svn_wc_conflict_description_create_tree3 return conflict; } +svn_wc_conflict_version_t * +svn_wc_conflict_version_create2(const char *repos_url, + const char *repos_uuid, + const char *repos_relpath, + svn_revnum_t revision, + svn_node_kind_t kind, + apr_pool_t *result_pool) +{ + svn_wc_conflict_version_t *version; + + version = apr_pcalloc(result_pool, sizeof(*version)); + + SVN_ERR_ASSERT_NO_RETURN(svn_uri_is_canonical(repos_url, result_pool) + && svn_relpath_is_canonical(repos_relpath) + && SVN_IS_VALID_REVNUM(revision) + /* ### repos_uuid can be NULL :( */); + + version->repos_url = repos_url; + version->peg_rev = revision; + version->path_in_repos = repos_relpath; + version->node_kind = kind; + version->repos_uuid = repos_uuid; -svn_wc_conflict_description3_t * -svn_wc__conflict_description3_dup(const svn_wc_conflict_description3_t *conflict, + return version; +} + +svn_wc_conflict_description2_t * +svn_wc_conflict_description2_dup(const svn_wc_conflict_description2_t *conflict, apr_pool_t *pool) { - svn_wc_conflict_description3_t *new_conflict; + svn_wc_conflict_description2_t *new_conflict; new_conflict = apr_pcalloc(pool, sizeof(*new_conflict)); @@ -272,8 +297,8 @@ svn_wc__conflict_description3_dup(const new_conflict->their_abspath = apr_pstrdup(pool, conflict->their_abspath); if (conflict->my_abspath) new_conflict->my_abspath = apr_pstrdup(pool, conflict->my_abspath); - if (conflict->merged_abspath) - new_conflict->merged_abspath = apr_pstrdup(pool, conflict->merged_abspath); + if (conflict->merged_file) + new_conflict->merged_file = apr_pstrdup(pool, conflict->merged_file); if (conflict->src_left_version) new_conflict->src_left_version = svn_wc_conflict_version_dup(conflict->src_left_version, pool); @@ -281,36 +306,27 @@ svn_wc__conflict_description3_dup(const new_conflict->src_right_version = svn_wc_conflict_version_dup(conflict->src_right_version, pool); - return new_conflict; -} - -svn_wc_conflict_version_t * -svn_wc_conflict_version_create2(const char *repos_url, - const char *repos_uuid, - const char *repos_relpath, - svn_revnum_t revision, - svn_node_kind_t kind, - apr_pool_t *result_pool) -{ - svn_wc_conflict_version_t *version; - - version = apr_pcalloc(result_pool, sizeof(*version)); - - SVN_ERR_ASSERT_NO_RETURN(svn_uri_is_canonical(repos_url, result_pool) - && svn_relpath_is_canonical(repos_relpath) - && SVN_IS_VALID_REVNUM(revision) - /* ### repos_uuid can be NULL :( */); - - version->repos_url = repos_url; - version->peg_rev = revision; - version->path_in_repos = repos_relpath; - version->node_kind = kind; - version->repos_uuid = repos_uuid; + /* ### For property conflicts, cd2 stores prop_reject_abspath in + * ### their_abspath, and stores theirs_abspath in merged_file. */ + if (conflict->prop_reject_abspath) + new_conflict->prop_reject_abspath = new_conflict->their_abspath; + + if (conflict->prop_value_base) + new_conflict->prop_value_base = + svn_string_dup(conflict->prop_value_base, pool); + if (conflict->prop_value_working) + new_conflict->prop_value_working = + svn_string_dup(conflict->prop_value_working, pool); + if (conflict->prop_value_incoming_old) + new_conflict->prop_value_incoming_old = + svn_string_dup(conflict->prop_value_incoming_old, pool); + if (conflict->prop_value_incoming_new) + new_conflict->prop_value_incoming_new = + svn_string_dup(conflict->prop_value_incoming_new, pool); - return version; + return new_conflict; } - svn_wc_conflict_version_t * svn_wc_conflict_version_dup(const svn_wc_conflict_version_t *version, apr_pool_t *result_pool) @@ -339,91 +355,6 @@ svn_wc_conflict_version_dup(const svn_wc return new_version; } -apr_array_header_t * -svn_wc__cd3_array_to_cd2_array(const apr_array_header_t *conflicts, - apr_pool_t *result_pool) -{ - apr_array_header_t *new_conflicts; - int i; - - new_conflicts = apr_array_make(result_pool, conflicts->nelts, - sizeof (svn_wc_conflict_description2_t *)); - - for (i = 0; i < conflicts->nelts; i++) - { - svn_wc_conflict_description3_t *cd; - svn_wc_conflict_description2_t *cd2; - - cd = APR_ARRAY_IDX(conflicts, i, svn_wc_conflict_description3_t *); - cd2 = svn_wc__cd3_to_cd2(cd, result_pool); - APR_ARRAY_PUSH(new_conflicts, svn_wc_conflict_description2_t *) = cd2; - } - - return new_conflicts; -} - -svn_wc_conflict_description2_t * -svn_wc__cd3_to_cd2(const svn_wc_conflict_description3_t *conflict, - apr_pool_t *result_pool) -{ - svn_wc_conflict_description2_t *new_conflict; - - if (conflict == NULL) - return NULL; - - new_conflict = apr_pcalloc(result_pool, sizeof(*new_conflict)); - - if (conflict->local_abspath) - new_conflict->local_abspath = apr_pstrdup(result_pool, - conflict->local_abspath); - new_conflict->node_kind = conflict->node_kind; - new_conflict->kind = conflict->kind; - if (conflict->property_name) - new_conflict->property_name = apr_pstrdup(result_pool, - conflict->property_name); - new_conflict->is_binary = conflict->is_binary; - if (conflict->mime_type) - new_conflict->mime_type = apr_pstrdup(result_pool, conflict->mime_type); - new_conflict->action = conflict->action; - new_conflict->reason = conflict->reason; - if (conflict->base_abspath) - new_conflict->base_abspath = apr_pstrdup(result_pool, - conflict->base_abspath); - - if (conflict->kind == svn_wc_conflict_kind_property) - { - /* For property conflicts, cd2 stored prop_reject_abspath in - * their_abspath, and stored theirs_abspath in merged_file. */ - if (conflict->prop_reject_abspath) - new_conflict->their_abspath = apr_pstrdup(result_pool, - conflict->prop_reject_abspath); - if (conflict->their_abspath) - new_conflict->merged_file = apr_pstrdup(result_pool, - conflict->their_abspath); - } - else - { - if (conflict->their_abspath) - new_conflict->their_abspath = apr_pstrdup(result_pool, - conflict->their_abspath); - - if (conflict->merged_abspath) - new_conflict->merged_file = apr_pstrdup(result_pool, - conflict->merged_abspath); - } - if (conflict->my_abspath) - new_conflict->my_abspath = apr_pstrdup(result_pool, conflict->my_abspath); - new_conflict->operation = conflict->operation; - if (conflict->src_left_version) - new_conflict->src_left_version = - svn_wc_conflict_version_dup(conflict->src_left_version, result_pool); - if (conflict->src_right_version) - new_conflict->src_right_version = - svn_wc_conflict_version_dup(conflict->src_right_version, result_pool); - - return new_conflict; -} - svn_wc_conflict_description_t * svn_wc__cd2_to_cd(const svn_wc_conflict_description2_t *conflict, apr_pool_t *result_pool) Modified: subversion/branches/remove-log-addressing/subversion/libsvn_wc/wc.h URL: http://svn.apache.org/viewvc/subversion/branches/remove-log-addressing/subversion/libsvn_wc/wc.h?rev=1620589&r1=1620588&r2=1620589&view=diff ============================================================================== --- subversion/branches/remove-log-addressing/subversion/libsvn_wc/wc.h (original) +++ subversion/branches/remove-log-addressing/subversion/libsvn_wc/wc.h Tue Aug 26 13:00:03 2014 @@ -676,7 +676,7 @@ svn_wc__write_check(svn_wc__db_t *db, const char *local_abspath, apr_pool_t *scratch_pool); -/* Read into CONFLICTS svn_wc_conflict_description3_t* structs +/* Read into CONFLICTS svn_wc_conflict_description2_t* structs * for all conflicts that have LOCAL_ABSPATH as victim. * * Victim must be versioned or be part of a tree conflict. Modified: subversion/branches/remove-log-addressing/subversion/libsvn_wc/wc_db.h URL: http://svn.apache.org/viewvc/subversion/branches/remove-log-addressing/subversion/libsvn_wc/wc_db.h?rev=1620589&r1=1620588&r2=1620589&view=diff ============================================================================== --- subversion/branches/remove-log-addressing/subversion/libsvn_wc/wc_db.h (original) +++ subversion/branches/remove-log-addressing/subversion/libsvn_wc/wc_db.h Tue Aug 26 13:00:03 2014 @@ -2138,16 +2138,16 @@ svn_wc__db_read_props_streamily(svn_wc__ apr_pool_t *scratch_pool); -/* Set *PROPS to the properties of the node LOCAL_ABSPATH in the WORKING - tree (looking through to the BASE tree as required). - - ### *PROPS will set set to NULL in the following situations: - ### ... tbd. see props.c:svn_wc__get_pristine_props() +/* Set *PROPS to the base properties of the node at LOCAL_ABSPATH. *PROPS maps "const char *" names to "const svn_string_t *" values. If the node has no properties, set *PROPS to an empty hash. - If the node is not present, return an error. + If the base node is in a state that cannot have properties (such as + not-present or locally added without copy-from), return an error. + Allocate *PROPS and its keys and values in RESULT_POOL. + + See also svn_wc_get_pristine_props(). */ svn_error_t * svn_wc__db_read_pristine_props(apr_hash_t **props, Modified: subversion/branches/remove-log-addressing/subversion/libsvn_wc/workqueue.c URL: http://svn.apache.org/viewvc/subversion/branches/remove-log-addressing/subversion/libsvn_wc/workqueue.c?rev=1620589&r1=1620588&r2=1620589&view=diff ============================================================================== --- subversion/branches/remove-log-addressing/subversion/libsvn_wc/workqueue.c (original) +++ subversion/branches/remove-log-addressing/subversion/libsvn_wc/workqueue.c Tue Aug 26 13:00:03 2014 @@ -1116,14 +1116,15 @@ run_prej_install(work_item_baton_t *wqb, scratch_pool, scratch_pool)); if (arg1->next != NULL) - prop_conflict_skel = arg1->next; + prop_conflict_skel = arg1->next; /* Before Subversion 1.9 */ else - SVN_ERR_MALFUNCTION(); /* ### wc_db can't provide it ... yet. */ + prop_conflict_skel = NULL; /* Read from DB */ /* Construct a property reject file in the temporary area. */ SVN_ERR(svn_wc__create_prejfile(&tmp_prejfile_abspath, db, local_abspath, prop_conflict_skel, + cancel_func, cancel_baton, scratch_pool, scratch_pool)); /* ... and atomically move it into place. */ @@ -1139,21 +1140,21 @@ svn_error_t * svn_wc__wq_build_prej_install(svn_skel_t **work_item, svn_wc__db_t *db, const char *local_abspath, - svn_skel_t *conflict_skel, + /*svn_skel_t *conflict_skel,*/ apr_pool_t *result_pool, apr_pool_t *scratch_pool) { const char *local_relpath; *work_item = svn_skel__make_empty_list(result_pool); - /* ### gotta have this, today */ - SVN_ERR_ASSERT(conflict_skel != NULL); - SVN_ERR(svn_wc__db_to_relpath(&local_relpath, db, local_abspath, local_abspath, result_pool, scratch_pool)); - if (conflict_skel != NULL) - svn_skel__prepend(conflict_skel, *work_item); + /* ### In Subversion 1.7 and 1.8 we created a legacy property conflict skel + here: + if (conflict_skel != NULL) + svn_skel__prepend(conflict_skel, *work_item); + */ svn_skel__prepend_str(local_relpath, *work_item, result_pool); svn_skel__prepend_str(OP_PREJ_INSTALL, *work_item, result_pool); Modified: subversion/branches/remove-log-addressing/subversion/libsvn_wc/workqueue.h URL: http://svn.apache.org/viewvc/subversion/branches/remove-log-addressing/subversion/libsvn_wc/workqueue.h?rev=1620589&r1=1620588&r2=1620589&view=diff ============================================================================== --- subversion/branches/remove-log-addressing/subversion/libsvn_wc/workqueue.h (original) +++ subversion/branches/remove-log-addressing/subversion/libsvn_wc/workqueue.h Tue Aug 26 13:00:03 2014 @@ -181,22 +181,12 @@ svn_wc__wq_build_sync_file_flags(svn_ske /* Set *WORK_ITEM to a new work item that will install a property reject - file for LOCAL_ABSPATH into the working copy. The property conflicts will - be taken from CONFLICT_SKEL. - - ### Caution: Links CONFLICT_SKEL into the *WORK_ITEM, which involves - modifying *CONFLICT_SKEL. - - ### TODO: Make CONFLICT_SKEL 'const' and dup it into RESULT_POOL. - - ### TODO: If CONFLICT_SKEL is NULL, take property conflicts from wc_db - for the given DB/LOCAL_ABSPATH. + file for LOCAL_ABSPATH into the working copy. */ svn_error_t * svn_wc__wq_build_prej_install(svn_skel_t **work_item, svn_wc__db_t *db, const char *local_abspath, - svn_skel_t *conflict_skel, apr_pool_t *result_pool, apr_pool_t *scratch_pool); Modified: subversion/branches/remove-log-addressing/subversion/mod_dav_svn/util.c URL: http://svn.apache.org/viewvc/subversion/branches/remove-log-addressing/subversion/mod_dav_svn/util.c?rev=1620589&r1=1620588&r2=1620589&view=diff ============================================================================== --- subversion/branches/remove-log-addressing/subversion/mod_dav_svn/util.c (original) +++ subversion/branches/remove-log-addressing/subversion/mod_dav_svn/util.c Tue Aug 26 13:00:03 2014 @@ -177,10 +177,10 @@ get_last_history_rev(svn_revnum_t *revis const char *ignored; /* Get an initial HISTORY baton. */ - SVN_ERR(svn_fs_node_history(&history, root, path, pool)); + SVN_ERR(svn_fs_node_history2(&history, root, path, pool, pool)); /* Now get the first *real* point of interesting history. */ - SVN_ERR(svn_fs_history_prev(&history, history, FALSE, pool)); + SVN_ERR(svn_fs_history_prev2(&history, history, FALSE, pool, pool)); /* Fetch the location information for this history step. */ return svn_fs_history_location(&ignored, revision, history, pool); Modified: subversion/branches/remove-log-addressing/subversion/po/es.po URL: http://svn.apache.org/viewvc/subversion/branches/remove-log-addressing/subversion/po/es.po?rev=1620589&r1=1620588&r2=1620589&view=diff ============================================================================== --- subversion/branches/remove-log-addressing/subversion/po/es.po [UTF-8] (original) +++ subversion/branches/remove-log-addressing/subversion/po/es.po [UTF-8] Tue Aug 26 13:00:03 2014 @@ -53,7 +53,7 @@ # msgid "" msgstr "" -"Project-Id-Version: subversion 1.7\n" +"Project-Id-Version: subversion 1.9\n" "Report-Msgid-Bugs-To: [email protected]\n" "POT-Creation-Date: 2010-11-12 08:49-0600\n" "PO-Revision-Date: 2009-02-19 14:22-0200\n" Modified: subversion/branches/remove-log-addressing/subversion/po/fr.po URL: http://svn.apache.org/viewvc/subversion/branches/remove-log-addressing/subversion/po/fr.po?rev=1620589&r1=1620588&r2=1620589&view=diff ============================================================================== --- subversion/branches/remove-log-addressing/subversion/po/fr.po [UTF-8] (original) +++ subversion/branches/remove-log-addressing/subversion/po/fr.po [UTF-8] Tue Aug 26 13:00:03 2014 @@ -22,7 +22,7 @@ # msgid "" msgstr "" -"Project-Id-Version: subversion 1.7\n" +"Project-Id-Version: subversion 1.9\n" "Report-Msgid-Bugs-To: [email protected]\n" "POT-Creation-Date: 2012-07-07 14:51+0200\n" "PO-Revision-Date: 2012-07-07 17:04+0200\n" Modified: subversion/branches/remove-log-addressing/subversion/po/it.po URL: http://svn.apache.org/viewvc/subversion/branches/remove-log-addressing/subversion/po/it.po?rev=1620589&r1=1620588&r2=1620589&view=diff ============================================================================== --- subversion/branches/remove-log-addressing/subversion/po/it.po (original) +++ subversion/branches/remove-log-addressing/subversion/po/it.po Tue Aug 26 13:00:03 2014 @@ -101,7 +101,7 @@ # working copy: copia di lavoro (CL) msgid "" msgstr "" -"Project-Id-Version: subversion 1.7\n" +"Project-Id-Version: subversion 1.9\n" "Report-Msgid-Bugs-To: [email protected]\n" "POT-Creation-Date: 2010-11-12 08:49-0600\n" "PO-Revision-Date: 2007-10-12 10:09+0200\n" Modified: subversion/branches/remove-log-addressing/subversion/po/ja.po URL: http://svn.apache.org/viewvc/subversion/branches/remove-log-addressing/subversion/po/ja.po?rev=1620589&r1=1620588&r2=1620589&view=diff ============================================================================== --- subversion/branches/remove-log-addressing/subversion/po/ja.po [UTF-8] (original) +++ subversion/branches/remove-log-addressing/subversion/po/ja.po [UTF-8] Tue Aug 26 13:00:03 2014 @@ -195,7 +195,7 @@ # zero byte ゼロバイト文字 msgid "" msgstr "" -"Project-Id-Version: subversion 1.7\n" +"Project-Id-Version: subversion 1.9\n" "Report-Msgid-Bugs-To: [email protected]\n" "POT-Creation-Date: 2010-11-12 08:49-0600\n" "PO-Revision-Date: 2007-10-28 01:23+0900\n" Modified: subversion/branches/remove-log-addressing/subversion/po/ko.po URL: http://svn.apache.org/viewvc/subversion/branches/remove-log-addressing/subversion/po/ko.po?rev=1620589&r1=1620588&r2=1620589&view=diff ============================================================================== --- subversion/branches/remove-log-addressing/subversion/po/ko.po [UTF-8] (original) +++ subversion/branches/remove-log-addressing/subversion/po/ko.po [UTF-8] Tue Aug 26 13:00:03 2014 @@ -19,7 +19,7 @@ # msgid "" msgstr "" -"Project-Id-Version: subversion 1.7\n" +"Project-Id-Version: subversion 1.9\n" "Report-Msgid-Bugs-To: [email protected]\n" "POT-Creation-Date: 2011-03-07 00:53+0900\n" "PO-Revision-Date: 2011-03-03 18:16+0900\n" Modified: subversion/branches/remove-log-addressing/subversion/po/nb.po URL: http://svn.apache.org/viewvc/subversion/branches/remove-log-addressing/subversion/po/nb.po?rev=1620589&r1=1620588&r2=1620589&view=diff ============================================================================== --- subversion/branches/remove-log-addressing/subversion/po/nb.po [UTF-8] (original) +++ subversion/branches/remove-log-addressing/subversion/po/nb.po [UTF-8] Tue Aug 26 13:00:03 2014 @@ -87,7 +87,7 @@ # msgid "" msgstr "" -"Project-Id-Version: subversion 1.7\n" +"Project-Id-Version: subversion 1.9\n" "Report-Msgid-Bugs-To: [email protected]\n" "POT-Creation-Date: 2010-11-12 08:49-0600\n" "PO-Revision-Date: 2009-10-14 16:21+0200\n" Modified: subversion/branches/remove-log-addressing/subversion/po/pl.po URL: http://svn.apache.org/viewvc/subversion/branches/remove-log-addressing/subversion/po/pl.po?rev=1620589&r1=1620588&r2=1620589&view=diff ============================================================================== --- subversion/branches/remove-log-addressing/subversion/po/pl.po [UTF-8] (original) +++ subversion/branches/remove-log-addressing/subversion/po/pl.po [UTF-8] Tue Aug 26 13:00:03 2014 @@ -55,7 +55,7 @@ # work queue - kolejka pracy msgid "" msgstr "" -"Project-Id-Version: subversion 1.7\n" +"Project-Id-Version: subversion 1.9\n" "Report-Msgid-Bugs-To: [email protected]\n" "POT-Creation-Date: 2010-11-12 08:49-0600\n" "PO-Revision-Date: 2009-11-14 22:00+0100\n" Modified: subversion/branches/remove-log-addressing/subversion/po/pt_BR.po URL: http://svn.apache.org/viewvc/subversion/branches/remove-log-addressing/subversion/po/pt_BR.po?rev=1620589&r1=1620588&r2=1620589&view=diff ============================================================================== --- subversion/branches/remove-log-addressing/subversion/po/pt_BR.po [UTF-8] (original) +++ subversion/branches/remove-log-addressing/subversion/po/pt_BR.po [UTF-8] Tue Aug 26 13:00:03 2014 @@ -19,7 +19,7 @@ # msgid "" msgstr "" -"Project-Id-Version: subversion 1.7\n" +"Project-Id-Version: subversion 1.9\n" "Report-Msgid-Bugs-To: [email protected]\n" "POT-Creation-Date: 2010-11-12 08:49-0600\n" "PO-Revision-Date: 2004-07-26 19:19-300\n" Modified: subversion/branches/remove-log-addressing/subversion/po/zh_TW.po URL: http://svn.apache.org/viewvc/subversion/branches/remove-log-addressing/subversion/po/zh_TW.po?rev=1620589&r1=1620588&r2=1620589&view=diff ============================================================================== --- subversion/branches/remove-log-addressing/subversion/po/zh_TW.po [UTF-8] (original) +++ subversion/branches/remove-log-addressing/subversion/po/zh_TW.po [UTF-8] Tue Aug 26 13:00:03 2014 @@ -22,7 +22,7 @@ # msgid "" msgstr "" -"Project-Id-Version: subversion 1.7\n" +"Project-Id-Version: subversion 1.9\n" "Report-Msgid-Bugs-To: [email protected]\n" "POT-Creation-Date: 2010-11-12 08:49-0600\n" "PO-Revision-Date: 2004-09-12 22:05+0800\n" Modified: subversion/branches/remove-log-addressing/subversion/svn/cl-conflicts.c URL: http://svn.apache.org/viewvc/subversion/branches/remove-log-addressing/subversion/svn/cl-conflicts.c?rev=1620589&r1=1620588&r2=1620589&view=diff ============================================================================== --- subversion/branches/remove-log-addressing/subversion/svn/cl-conflicts.c (original) +++ subversion/branches/remove-log-addressing/subversion/svn/cl-conflicts.c Tue Aug 26 13:00:03 2014 @@ -75,6 +75,7 @@ local_reason_str(svn_node_kind_t kind, s switch (kind) { case svn_node_file: + case svn_node_symlink: switch (reason) { case svn_wc_conflict_reason_edited: @@ -126,9 +127,32 @@ local_reason_str(svn_node_kind_t kind, s return _("local dir moved here"); } break; - case svn_node_symlink: case svn_node_none: case svn_node_unknown: + switch (reason) + { + case svn_wc_conflict_reason_edited: + return _("local edit"); + case svn_wc_conflict_reason_obstructed: + return _("local obstruction"); + case svn_wc_conflict_reason_deleted: + return _("local delete"); + case svn_wc_conflict_reason_missing: + if (operation == svn_wc_operation_merge) + return _("local missing or deleted or moved away"); + else + return _("local missing"); + case svn_wc_conflict_reason_unversioned: + return _("local unversioned"); + case svn_wc_conflict_reason_added: + return _("local add"); + case svn_wc_conflict_reason_replaced: + return _("local replace"); + case svn_wc_conflict_reason_moved_away: + return _("local moved away"); + case svn_wc_conflict_reason_moved_here: + return _("local moved here"); + } break; } return NULL; @@ -142,6 +166,7 @@ incoming_action_str(svn_node_kind_t kind switch (kind) { case svn_node_file: + case svn_node_symlink: switch (action) { case svn_wc_conflict_action_edit: @@ -151,7 +176,7 @@ incoming_action_str(svn_node_kind_t kind case svn_wc_conflict_action_delete: return _("incoming file delete or move"); case svn_wc_conflict_action_replace: - return _("incoming file replace"); + return _("incoming replace with file"); } break; case svn_node_dir: @@ -164,12 +189,22 @@ incoming_action_str(svn_node_kind_t kind case svn_wc_conflict_action_delete: return _("incoming dir delete or move"); case svn_wc_conflict_action_replace: - return _("incoming dir replace"); + return _("incoming replace with dir"); } break; - case svn_node_symlink: case svn_node_none: case svn_node_unknown: + switch (action) + { + case svn_wc_conflict_action_edit: + return _("incoming edit"); + case svn_wc_conflict_action_add: + return _("incoming add"); + case svn_wc_conflict_action_delete: + return _("incoming delete or move"); + case svn_wc_conflict_action_replace: + return _("incoming replace"); + } break; } return NULL; Modified: subversion/branches/remove-log-addressing/subversion/svn/conflict-callbacks.c URL: http://svn.apache.org/viewvc/subversion/branches/remove-log-addressing/subversion/svn/conflict-callbacks.c?rev=1620589&r1=1620588&r2=1620589&view=diff ============================================================================== --- subversion/branches/remove-log-addressing/subversion/svn/conflict-callbacks.c (original) +++ subversion/branches/remove-log-addressing/subversion/svn/conflict-callbacks.c Tue Aug 26 13:00:03 2014 @@ -204,6 +204,8 @@ show_diff(const svn_wc_conflict_descript * and 'my' files of DESC. */ static svn_error_t * show_conflicts(const svn_wc_conflict_description2_t *desc, + svn_cancel_func_t cancel_func, + void *cancel_baton, apr_pool_t *pool) { svn_diff_t *diff; @@ -220,7 +222,7 @@ show_conflicts(const svn_wc_conflict_des options, pool)); /* ### Consider putting the markers/labels from ### svn_wc__merge_internal in the conflict description. */ - return svn_diff_file_output_merge2(output, diff, + return svn_diff_file_output_merge3(output, diff, desc->base_abspath, desc->my_abspath, desc->their_abspath, @@ -229,6 +231,8 @@ show_conflicts(const svn_wc_conflict_des _(">>>>>>> THEIRS (select with 'tc')"), "=======", svn_diff_conflict_display_only_conflicts, + cancel_func, + cancel_baton, pool); } @@ -244,6 +248,8 @@ static svn_error_t * merge_prop_conflict(svn_stream_t *output, const svn_wc_conflict_description2_t *desc, const char *merged_abspath, + svn_cancel_func_t cancel_func, + void *cancel_baton, apr_pool_t *pool) { const char *base_abspath = desc->base_abspath; @@ -275,7 +281,7 @@ merge_prop_conflict(svn_stream_t *output merged_abspath ? merged_abspath : my_abspath, their_abspath, options, pool)); - SVN_ERR(svn_diff_file_output_merge2(output, diff, + SVN_ERR(svn_diff_file_output_merge3(output, diff, base_abspath, merged_abspath ? merged_abspath : my_abspath, @@ -285,6 +291,8 @@ merge_prop_conflict(svn_stream_t *output _(">>>>>>> THEIRS"), "=======", svn_diff_conflict_display_modified_original_latest, + cancel_func, + cancel_baton, pool)); return SVN_NO_ERROR; @@ -300,12 +308,15 @@ merge_prop_conflict(svn_stream_t *output static svn_error_t * show_prop_conflict(const svn_wc_conflict_description2_t *desc, const char *merged_abspath, + svn_cancel_func_t cancel_func, + void *cancel_baton, apr_pool_t *pool) { svn_stream_t *output; SVN_ERR(svn_stream_for_stdout(&output, pool)); - SVN_ERR(merge_prop_conflict(output, desc, merged_abspath, pool)); + SVN_ERR(merge_prop_conflict(output, desc, merged_abspath, + cancel_func, cancel_baton, pool)); return SVN_NO_ERROR; } @@ -374,7 +385,10 @@ edit_prop_conflict(const char **merged_f result_pool, scratch_pool)); merged_prop = svn_stream_from_aprfile2(file, TRUE /* disown */, scratch_pool); - SVN_ERR(merge_prop_conflict(merged_prop, desc, NULL, scratch_pool)); + SVN_ERR(merge_prop_conflict(merged_prop, desc, NULL, + b->pb->cancel_func, + b->pb->cancel_baton, + scratch_pool)); SVN_ERR(svn_stream_close(merged_prop)); SVN_ERR(svn_io_file_flush(file, scratch_pool)); SVN_ERR(open_editor(&performed_edit, file_path, b, scratch_pool)); @@ -473,25 +487,6 @@ static const resolver_option_t prop_conf { NULL } }; -/* Resolver options for an obstructued addition */ -static const resolver_option_t obstructed_add_options[] = -{ - { "mf", N_("my version"), N_("accept pre-existing item (ignore " - "upstream addition) [mine-full]"), - svn_wc_conflict_choose_mine_full }, - { "tf", N_("their version"), N_("accept incoming item (overwrite " - "pre-existing item) [theirs-full]"), - svn_wc_conflict_choose_theirs_full }, - { "p", N_("postpone"), N_("mark the conflict to be resolved later" - " [postpone]"), - svn_wc_conflict_choose_postpone }, - { "q", N_("quit resolution"), N_("postpone all remaining conflicts"), - svn_wc_conflict_choose_postpone }, - { "h", N_("help"), N_("show this help (also '?')"), - svn_wc_conflict_choose_undefined }, - { NULL } -}; - /* Resolver options for a tree conflict */ static const resolver_option_t tree_conflict_options[] = { @@ -778,7 +773,10 @@ handle_text_conflict(svn_wc_conflict_res "files not available.\n\n"))); continue; } - SVN_ERR(show_conflicts(desc, iterpool)); + SVN_ERR(show_conflicts(desc, + b->pb->cancel_func, + b->pb->cancel_baton, + iterpool)); knows_something = TRUE; } else if (strcmp(opt->code, "df") == 0) @@ -1025,7 +1023,9 @@ handle_prop_conflict(svn_wc_conflict_res } else if (strcmp(opt->code, "dc") == 0) { - SVN_ERR(show_prop_conflict(desc, merged_file_path, scratch_pool)); + SVN_ERR(show_prop_conflict(desc, merged_file_path, + b->pb->cancel_func, b->pb->cancel_baton, + scratch_pool)); } else if (strcmp(opt->code, "e") == 0) { @@ -1129,56 +1129,6 @@ handle_tree_conflict(svn_wc_conflict_res return SVN_NO_ERROR; } -/* Ask the user what to do about the obstructed add described by DESC. - * Return the answer in RESULT. B is the conflict baton for this - * conflict resolution session. - * SCRATCH_POOL is used for temporary allocations. */ -static svn_error_t * -handle_obstructed_add(svn_wc_conflict_result_t *result, - const svn_wc_conflict_description2_t *desc, - svn_cl__interactive_conflict_baton_t *b, - apr_pool_t *scratch_pool) -{ - apr_pool_t *iterpool; - - SVN_ERR(svn_cmdline_fprintf( - stderr, scratch_pool, - _("Conflict discovered when trying to add '%s'.\n" - "An object of the same name already exists.\n"), - svn_cl__local_style_skip_ancestor(b->path_prefix, - desc->local_abspath, - scratch_pool))); - - iterpool = svn_pool_create(scratch_pool); - while (1) - { - const resolver_option_t *opt; - - svn_pool_clear(iterpool); - - SVN_ERR(prompt_user(&opt, obstructed_add_options, NULL, b->pb, - iterpool)); - if (! opt) - continue; - - if (strcmp(opt->code, "q") == 0) - { - result->choice = opt->choice; - b->accept_which = svn_cl__accept_postpone; - b->quit = TRUE; - break; - } - else if (opt->choice != svn_wc_conflict_choose_undefined) - { - result->choice = opt->choice; - break; - } - } - svn_pool_destroy(iterpool); - - return SVN_NO_ERROR; -} - /* The body of svn_cl__conflict_func_interactive(). */ static svn_error_t * conflict_func_interactive(svn_wc_conflict_result_t **result, @@ -1322,29 +1272,6 @@ conflict_func_interactive(svn_wc_conflic SVN_ERR(handle_text_conflict(*result, desc, b, scratch_pool)); else if (desc->kind == svn_wc_conflict_kind_property) SVN_ERR(handle_prop_conflict(*result, desc, b, result_pool, scratch_pool)); - - /* - Dealing with obstruction of additions can be tricky. The - obstructing item could be unversioned, versioned, or even - schedule-add. Here's a matrix of how the caller should behave, - based on results we return. - - Unversioned Versioned Schedule-Add - - choose_mine skip addition, skip addition skip addition - add existing item - - choose_theirs destroy file, schedule-delete, revert add, - add new item. add new item. rm file, - add new item - - postpone [ bail out ] - - */ - else if ((desc->action == svn_wc_conflict_action_add) - && (desc->reason == svn_wc_conflict_reason_obstructed)) - SVN_ERR(handle_obstructed_add(*result, desc, b, scratch_pool)); - else if (desc->kind == svn_wc_conflict_kind_tree) SVN_ERR(handle_tree_conflict(*result, desc, b, scratch_pool)); Modified: subversion/branches/remove-log-addressing/subversion/svn/status.c URL: http://svn.apache.org/viewvc/subversion/branches/remove-log-addressing/subversion/svn/status.c?rev=1620589&r1=1620588&r2=1620589&view=diff ============================================================================== --- subversion/branches/remove-log-addressing/subversion/svn/status.c (original) +++ subversion/branches/remove-log-addressing/subversion/svn/status.c Tue Aug 26 13:00:03 2014 @@ -284,15 +284,14 @@ print_status(const char *target_abspath, if (tree_conflicted) { - const svn_wc_conflict_description3_t *tree_conflict; + const svn_wc_conflict_description2_t *tree_conflict; SVN_ERR(svn_wc__get_tree_conflict(&tree_conflict, ctx->wc_ctx, local_abspath, pool, pool)); SVN_ERR_ASSERT(tree_conflict != NULL); tree_status_code = 'C'; SVN_ERR(svn_cl__get_human_readable_tree_conflict_description( - &desc, svn_wc__cd3_to_cd2(tree_conflict, pool), - pool)); + &desc, tree_conflict, pool)); tree_desc_line = apr_psprintf(pool, "\n > %s", desc); (*tree_conflicts)++; } Modified: subversion/branches/remove-log-addressing/subversion/svnfsfs/stats-cmd.c URL: http://svn.apache.org/viewvc/subversion/branches/remove-log-addressing/subversion/svnfsfs/stats-cmd.c?rev=1620589&r1=1620574&r2=1620589&view=diff ============================================================================== --- subversion/branches/remove-log-addressing/subversion/svnfsfs/stats-cmd.c (original) +++ subversion/branches/remove-log-addressing/subversion/svnfsfs/stats-cmd.c Tue Aug 26 13:00:03 2014 @@ -29,11 +29,11 @@ #include "private/svn_sorts_private.h" #include "private/svn_string_private.h" -#include "../../../subversion/libsvn_fs_fs/index.h" -#include "../../../subversion/libsvn_fs_fs/pack.h" -#include "../../../subversion/libsvn_fs_fs/rev_file.h" -#include "../../../subversion/libsvn_fs_fs/util.h" -#include "../../../subversion/libsvn_fs/fs-loader.h" +#include "../libsvn_fs_fs/index.h" +#include "../libsvn_fs_fs/pack.h" +#include "../libsvn_fs_fs/rev_file.h" +#include "../libsvn_fs_fs/util.h" +#include "../libsvn_fs/fs-loader.h" #include "svn_private_config.h" #include "svnfsfs.h" Modified: subversion/branches/remove-log-addressing/subversion/svnlook/svnlook.c URL: http://svn.apache.org/viewvc/subversion/branches/remove-log-addressing/subversion/svnlook/svnlook.c?rev=1620589&r1=1620588&r2=1620589&view=diff ============================================================================== --- subversion/branches/remove-log-addressing/subversion/svnlook/svnlook.c (original) +++ subversion/branches/remove-log-addressing/subversion/svnlook/svnlook.c Tue Aug 26 13:00:03 2014 @@ -811,7 +811,9 @@ display_prop_diffs(svn_stream_t *outstre SVN_ERR(svn_diff__display_prop_diffs( outstream, encoding, propchanges, original_props, - FALSE /* pretty_print_mergeinfo */, pool)); + FALSE /* pretty_print_mergeinfo */, + -1 /* context_size */, + check_cancel, NULL, pool)); return SVN_NO_ERROR; } Modified: subversion/branches/remove-log-addressing/subversion/svnserve/logger.c URL: http://svn.apache.org/viewvc/subversion/branches/remove-log-addressing/subversion/svnserve/logger.c?rev=1620589&r1=1620588&r2=1620589&view=diff ============================================================================== --- subversion/branches/remove-log-addressing/subversion/svnserve/logger.c (original) +++ subversion/branches/remove-log-addressing/subversion/svnserve/logger.c Tue Aug 26 13:00:03 2014 @@ -60,7 +60,7 @@ logger__create_for_stderr(logger_t **log result->pool = svn_pool_create(pool); SVN_ERR(svn_stream_for_stderr(&result->stream, pool)); - SVN_ERR(svn_mutex__init(&result->mutex, TRUE, FALSE, pool)); + SVN_ERR(svn_mutex__init(&result->mutex, TRUE, pool)); *logger = result; @@ -78,7 +78,7 @@ logger__create(logger_t **logger, SVN_ERR(svn_io_file_open(&file, filename, APR_WRITE | APR_CREATE | APR_APPEND, APR_OS_DEFAULT, pool)); - SVN_ERR(svn_mutex__init(&result->mutex, TRUE, FALSE, pool)); + SVN_ERR(svn_mutex__init(&result->mutex, TRUE, pool)); result->stream = svn_stream_from_aprfile2(file, FALSE, pool); result->pool = svn_pool_create(pool); Modified: subversion/branches/remove-log-addressing/subversion/tests/cmdline/authz_tests.py URL: http://svn.apache.org/viewvc/subversion/branches/remove-log-addressing/subversion/tests/cmdline/authz_tests.py?rev=1620589&r1=1620588&r2=1620589&view=diff ============================================================================== --- subversion/branches/remove-log-addressing/subversion/tests/cmdline/authz_tests.py (original) +++ subversion/branches/remove-log-addressing/subversion/tests/cmdline/authz_tests.py Tue Aug 26 13:00:03 2014 @@ -1253,17 +1253,17 @@ def authz_tree_conflict(sbox): # And now create an obstruction sbox.simple_mkdir('A/C') - expected_output = svntest.wc.State(wc_dir, {}) - expected_status = svntest.actions.get_virginal_state(wc_dir, 2) - expected_status.tweak('A/C', status='A ', wc_rev='0') - expected_status.tweak('A', '', status='! ', wc_rev='1') + expected_output = svntest.wc.State(wc_dir, { + 'A/C' : Item(status=' ', treeconflict='C'), + }) + expected_status = svntest.actions.get_virginal_state(wc_dir, 1) + expected_status.tweak('A/C', status='R ', treeconflict='C') svntest.actions.run_and_verify_update(wc_dir, expected_output, None, expected_status, - "Failed to mark '.*C' (server|absent):", - None, None, None, None, 0, + None, None, None, None, None, 0, '-r', '1', wc_dir) @Issue(3900) Modified: subversion/branches/remove-log-addressing/subversion/tests/cmdline/diff_tests.py URL: http://svn.apache.org/viewvc/subversion/branches/remove-log-addressing/subversion/tests/cmdline/diff_tests.py?rev=1620589&r1=1620588&r2=1620589&view=diff ============================================================================== --- subversion/branches/remove-log-addressing/subversion/tests/cmdline/diff_tests.py (original) +++ subversion/branches/remove-log-addressing/subversion/tests/cmdline/diff_tests.py Tue Aug 26 13:00:03 2014 @@ -3215,7 +3215,7 @@ def diff_git_format_wc_wc(sbox): expected_output = make_git_diff_header( alpha_copied_path, "A/B/E/alpha_copied", - "nonexistent", "working copy", + "revision 1", "working copy", copyfrom_path="A/B/E/alpha", copyfrom_rev='1', cp=True, text_changes=True) + [ @@ -4782,6 +4782,50 @@ def diff_replaced_moved(sbox): svntest.actions.run_and_verify_svn(None, None, [], 'diff', sbox.ospath('AA/B'), '-r1') +# Regression test for the fix in r1619380. Prior to this (and in releases +# 1.8.0 through 1.8.10) a local diff incorrectly showed a copied dir's +# properties as added, whereas it should show only the changes against the +# copy-source. +def diff_local_copied_dir(sbox): + "local WC diff of copied dir" + + sbox.build() + + was_cwd = os.getcwd() + os.chdir(sbox.wc_dir) + sbox.wc_dir = '' + + try: + sbox.simple_propset('p1', 'v1', 'A/C') + sbox.simple_commit() + + # dir with no prop changes + sbox.simple_copy('A/C', 'C2') + # dir with prop changes + sbox.simple_copy('A/C', 'C3') + sbox.simple_propset('p2', 'v2', 'C3') + + expected_output_C2 = [] + expected_output_C3 = [ + 'Index: C3\n', + '===================================================================\n', + '--- C3 (revision 2)\n', + '+++ C3 (working copy)\n', + '\n', + 'Property changes on: C3\n', + '___________________________________________________________________\n', + 'Added: p2\n', + '## -0,0 +1 ##\n', + '+v2\n', + '\ No newline at end of property\n', + ] + + svntest.actions.run_and_verify_svn(None, expected_output_C2, [], + 'diff', 'C2') + svntest.actions.run_and_verify_svn(None, expected_output_C3, [], + 'diff', 'C3') + finally: + os.chdir(was_cwd) ######################################################################## @@ -4873,6 +4917,7 @@ test_list = [ None, diff_parent_dir, diff_deleted_in_move_against_repos, diff_replaced_moved, + diff_local_copied_dir, ] if __name__ == '__main__': Modified: subversion/branches/remove-log-addressing/subversion/tests/cmdline/relocate_tests.py URL: http://svn.apache.org/viewvc/subversion/branches/remove-log-addressing/subversion/tests/cmdline/relocate_tests.py?rev=1620589&r1=1620588&r2=1620589&view=diff ============================================================================== --- subversion/branches/remove-log-addressing/subversion/tests/cmdline/relocate_tests.py (original) +++ subversion/branches/remove-log-addressing/subversion/tests/cmdline/relocate_tests.py Tue Aug 26 13:00:03 2014 @@ -208,17 +208,13 @@ def relocate_and_propset(sbox): # Create virgin repos and working copy svntest.main.safe_rmtree(sbox.repo_dir, 1) svntest.main.create_repos(sbox.repo_dir) + svntest.actions.guarantee_greek_repository( + sbox.repo_dir, svntest.main.options.server_minor_version) wc_dir = sbox.wc_dir repo_dir = sbox.repo_dir repo_url = sbox.repo_url - # import the greek tree - svntest.main.greek_state.write_to_disk(svntest.main.greek_dump_dir) - exit_code, output, errput = svntest.main.run_svn( - None, 'import', '-m', 'Log message for revision 1.', - svntest.main.greek_dump_dir, sbox.repo_url) - # checkout svntest.main.safe_rmtree(wc_dir, 1) svntest.actions.run_and_verify_svn(None, @@ -273,19 +269,15 @@ def single_file_relocate(sbox): # Create virgin repos and working copy svntest.main.safe_rmtree(sbox.repo_dir, 1) - svntest.main.create_repos(sbox.repo_dir) + svntest.actions.guarantee_greek_repository( + sbox.repo_dir, svntest.main.options.server_minor_version) wc_dir = sbox.wc_dir iota_path = os.path.join(sbox.wc_dir, 'iota') repo_dir = sbox.repo_dir repo_url = sbox.repo_url iota_url = repo_url + '/iota' - - # import the greek tree - svntest.main.greek_state.write_to_disk(svntest.main.greek_dump_dir) - exit_code, output, errput = svntest.main.run_svn( - None, 'import', '-m', 'Log message for revision 1.', - svntest.main.greek_dump_dir, sbox.repo_url) + greek_dump_dir = sbox.add_wc_path('greek-dump') # checkout svntest.main.safe_rmtree(wc_dir, 1) Modified: subversion/branches/remove-log-addressing/subversion/tests/cmdline/svnadmin_tests.py URL: http://svn.apache.org/viewvc/subversion/branches/remove-log-addressing/subversion/tests/cmdline/svnadmin_tests.py?rev=1620589&r1=1620588&r2=1620589&view=diff ============================================================================== --- subversion/branches/remove-log-addressing/subversion/tests/cmdline/svnadmin_tests.py (original) +++ subversion/branches/remove-log-addressing/subversion/tests/cmdline/svnadmin_tests.py Tue Aug 26 13:00:03 2014 @@ -106,6 +106,20 @@ def check_hotcopy_fsfs_fsx(src, dst): raise svntest.Failure("%s does not exist in hotcopy " "destination" % dst_path) + # Special case for db/uuid: Only the UUID in the first line needs + # to match. Source and target must have the same number of lines + # (due to having the same format). + if src_path == os.path.join(src, 'db', 'uuid'): + lines1 = open(src_path, 'rb').read().split("\n") + lines2 = open(dst_path, 'rb').read().split("\n") + if len(lines1) != len(lines2): + raise svntest.Failure("%s differs in number of lines" + % dst_path) + if lines1[0] != lines2[0]: + raise svntest.Failure("%s contains different uuid: '%s' vs. '%s'" + % (dst_path, lines1[0], lines2[0])) + continue + # Special case for rep-cache: It will always differ in a byte-by-byte # comparison, so compare db tables instead. if src_file == 'rep-cache.db': @@ -122,7 +136,7 @@ def check_hotcopy_fsfs_fsx(src, dst): for i in range(len(rows1)): if rows1[i] != rows2[i]: raise svntest.Failure("rep-cache row %i differs: '%s' vs. '%s'" - % (row, rows1[i])) + % (i, rows1[i], rows2[i])) continue # Special case for revprop-generation: It will always be zero in @@ -213,7 +227,7 @@ def get_txns(repo_dir): return txns -def write_sharded_format(repo_dir, shards): +def patch_format(repo_dir, shard_size): """Rewrite the format of the FSFS or FSX repository REPO_DIR so that it would use sharding with SHARDS revisions per shard.""" @@ -223,7 +237,7 @@ def write_sharded_format(repo_dir, shard for line in contents.split("\n"): if line.startswith("layout "): - processed_lines.append("layout sharded %d" % shards) + processed_lines.append("layout sharded %d" % shard_size) else: processed_lines.append(line) @@ -1133,6 +1147,7 @@ def fsfs_recover_handle_missing_revs_or_ #---------------------------------------------------------------------- +@Skip(svntest.main.tests_use_prepacakaged_repository) def create_in_repo_subdir(sbox): "'svnadmin create /path/to/repo/subdir'" @@ -1755,7 +1770,7 @@ def hotcopy_incremental_packed(sbox): # Configure two files per shard to trigger packing. sbox.build() - write_sharded_format(sbox.repo_dir, 2) + patch_format(sbox.repo_dir, shard_size=2) backup_dir, backup_url = sbox.add_repo_path('backup') os.mkdir(backup_dir) @@ -2272,7 +2287,7 @@ def load_ignore_dates(sbox): load_dumpstream(sbox, dumpfile_skeleton, '--ignore-dates') svntest.actions.run_and_verify_svnlook("Unexpected output", ['6\n'], None, 'youngest', sbox.repo_dir) - for rev in range(6): + for rev in range(1, 6): exit_code, output, errput = svntest.main.run_svnlook('date', '-r', rev, sbox.repo_dir) if errput: @@ -2403,7 +2418,7 @@ def verify_packed(sbox): # Configure two files per shard to trigger packing. sbox.build() - write_sharded_format(sbox.repo_dir, 2) + patch_format(sbox.repo_dir, shard_size=2) # Play with our greek tree. These changesets fall into two # separate shards with r2 and r3 being in shard 1 ... @@ -2470,8 +2485,18 @@ def freeze_freeze(sbox): second_repo_dir, _ = sbox.add_repo_path('backup') svntest.actions.run_and_verify_svnadmin(None, None, [], "hotcopy", sbox.repo_dir, second_repo_dir) - svntest.actions.run_and_verify_svnadmin(None, [], None, - 'setuuid', second_repo_dir) + + if svntest.main.is_fs_type_fsx() or \ + (svntest.main.is_fs_type_fsfs() and \ + svntest.main.options.server_minor_version < 9): + # FSFS repositories created with --compatible-version=1.8 and less + # erroneously share the filesystem data (locks, shared transaction + # data, ...) between hotcopy source and destination. This is fixed + # for new FS formats, but in order to avoid a deadlock for old formats, + # we have to manually assign a new UUID for the hotcopy destination. + # As of trunk@1618024, the same applies to FSX repositories. + svntest.actions.run_and_verify_svnadmin(None, [], None, + 'setuuid', second_repo_dir) svntest.actions.run_and_verify_svnadmin(None, None, [], 'freeze', '--', sbox.repo_dir, @@ -2563,7 +2588,7 @@ def fsfs_hotcopy_progress(sbox): sbox.build(create_wc=False) svntest.main.safe_rmtree(sbox.repo_dir, True) svntest.main.create_repos(sbox.repo_dir) - write_sharded_format(sbox.repo_dir, 3) + patch_format(sbox.repo_dir, shard_size=3) inc_backup_dir, inc_backup_url = sbox.add_repo_path('incremental-backup') @@ -2772,6 +2797,38 @@ def fsfs_hotcopy_progress_old(sbox): sbox.repo_dir, inc_backup_dir) +@SkipUnless(svntest.main.fs_has_unique_freeze) +def freeze_same_uuid(sbox): + "freeze multiple repositories with same UUID" + + sbox.build(create_wc=False) + + first_repo_dir, _ = sbox.add_repo_path('first') + second_repo_dir, _ = sbox.add_repo_path('second') + + # Test that 'svnadmin freeze A (svnadmin freeze B)' does not deadlock for + # new FSFS formats, even if 'A' and 'B' share the same UUID. Create two + # repositories by loading the same dump file, ... + svntest.main.create_repos(first_repo_dir) + svntest.main.create_repos(second_repo_dir) + + dump_path = os.path.join(os.path.dirname(sys.argv[0]), + 'svnadmin_tests_data', + 'skeleton_repos.dump') + dump_contents = open(dump_path, 'rb').readlines() + svntest.actions.run_and_verify_load(first_repo_dir, dump_contents) + svntest.actions.run_and_verify_load(second_repo_dir, dump_contents) + + # ...and execute the 'svnadmin freeze -F' command. + arg_file = sbox.get_tempname() + svntest.main.file_write(arg_file, + "%s\n%s\n" % (first_repo_dir, second_repo_dir)) + + svntest.actions.run_and_verify_svnadmin(None, None, None, + 'freeze', '-F', arg_file, '--', + sys.executable, '-c', 'True') + + ######################################################################## # Run the tests @@ -2823,6 +2880,7 @@ test_list = [ None, fsfs_hotcopy_progress, fsfs_hotcopy_progress_with_revprop_changes, fsfs_hotcopy_progress_old, + freeze_same_uuid, ] if __name__ == '__main__':
