You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by ju...@apache.org on 2015/06/01 10:57:06 UTC
svn commit: r1682839 [2/2] - in /subversion/branches/move-tracking-2: ./
subversion/ subversion/bindings/swig/perl/native/ subversion/include/
subversion/include/private/ subversion/libsvn_client/
subversion/libsvn_diff/ subversion/libsvn_fs_fs/ subver...
Modified: subversion/branches/move-tracking-2/subversion/svn/cl-conflicts.c
URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/svn/cl-conflicts.c?rev=1682839&r1=1682838&r2=1682839&view=diff
==============================================================================
--- subversion/branches/move-tracking-2/subversion/svn/cl-conflicts.c (original)
+++ subversion/branches/move-tracking-2/subversion/svn/cl-conflicts.c Mon Jun 1 08:57:05 2015
@@ -236,7 +236,7 @@ svn_cl__get_human_readable_prop_conflict
/* We provide separately translatable strings for the values that we
* know about, and a fall-back in case any other values occur. */
- switch (conflict->reason)
+ switch (svn_client_conflict_get_reason(conflict))
{
case svn_wc_conflict_reason_edited:
reason_str = _("local edit");
@@ -252,11 +252,12 @@ svn_cl__get_human_readable_prop_conflict
break;
default:
reason_str = apr_psprintf(pool, _("local %s"),
- svn_token__to_word(map_conflict_reason_xml,
- conflict->reason));
+ svn_token__to_word(
+ map_conflict_reason_xml,
+ svn_client_conflict_get_reason(conflict)));
break;
}
- switch (conflict->action)
+ switch (svn_client_conflict_get_action(conflict))
{
case svn_wc_conflict_action_edit:
action_str = _("incoming edit");
@@ -269,14 +270,16 @@ svn_cl__get_human_readable_prop_conflict
break;
default:
action_str = apr_psprintf(pool, _("incoming %s"),
- svn_token__to_word(map_conflict_action_xml,
- conflict->action));
+ svn_token__to_word(
+ map_conflict_action_xml,
+ svn_client_conflict_get_action(conflict)));
break;
}
SVN_ERR_ASSERT(reason_str && action_str);
*desc = apr_psprintf(pool, _("%s, %s %s"),
reason_str, action_str,
- operation_str(conflict->operation));
+ operation_str(
+ svn_client_conflict_get_operation(conflict)));
return SVN_NO_ERROR;
}
@@ -288,31 +291,46 @@ svn_cl__get_human_readable_tree_conflict
{
const char *action, *reason, *operation;
svn_node_kind_t incoming_kind;
+ svn_wc_conflict_action_t conflict_action;
+ svn_wc_conflict_reason_t conflict_reason;
+ svn_wc_operation_t conflict_operation;
+ svn_node_kind_t conflict_node_kind;
+
+ conflict_action = svn_client_conflict_get_action(conflict);
+ conflict_reason = svn_client_conflict_get_reason(conflict);
+ conflict_operation = svn_client_conflict_get_operation(conflict);
+ conflict_node_kind = svn_client_conflict_get_node_kind(conflict);
/* Determine the node kind of the incoming change. */
incoming_kind = svn_node_unknown;
- if (conflict->action == svn_wc_conflict_action_edit ||
- conflict->action == svn_wc_conflict_action_delete)
+ if (conflict_action == svn_wc_conflict_action_edit ||
+ conflict_action == svn_wc_conflict_action_delete)
{
+ const svn_wc_conflict_version_t *src_left_version;
+
/* Change is acting on 'src_left' version of the node. */
- if (conflict->src_left_version)
- incoming_kind = conflict->src_left_version->node_kind;
+ src_left_version = svn_client_conflict_get_src_left_version(conflict);
+ if (src_left_version)
+ incoming_kind = src_left_version->node_kind;
}
- else if (conflict->action == svn_wc_conflict_action_add ||
- conflict->action == svn_wc_conflict_action_replace)
+ else if (conflict_action == svn_wc_conflict_action_add ||
+ conflict_action == svn_wc_conflict_action_replace)
{
+ const svn_wc_conflict_version_t *src_right_version;
+
/* Change is acting on 'src_right' version of the node.
*
* ### For 'replace', the node kind is ambiguous. However, src_left
* ### is NULL for replace, so we must use src_right. */
- if (conflict->src_right_version)
- incoming_kind = conflict->src_right_version->node_kind;
+ src_right_version = svn_client_conflict_get_src_right_version(conflict);
+ if (src_right_version)
+ incoming_kind = src_right_version->node_kind;
}
- reason = local_reason_str(conflict->node_kind, conflict->reason,
- conflict->operation);
- action = incoming_action_str(incoming_kind, conflict->action);
- operation = operation_str(conflict->operation);
+ reason = local_reason_str(conflict_node_kind, conflict_reason,
+ conflict_operation);
+ action = incoming_action_str(incoming_kind, conflict_action);
+ operation = operation_str(conflict_operation);
SVN_ERR_ASSERT(operation);
if (action && reason)
@@ -326,12 +344,12 @@ svn_cl__get_human_readable_tree_conflict
It will not be pretty, but is closer to an internal error than
an ordinary user-facing string. */
*desc = apr_psprintf(pool, _("local: %s %s incoming: %s %s %s"),
- svn_node_kind_to_word(conflict->node_kind),
+ svn_node_kind_to_word(conflict_node_kind),
svn_token__to_word(map_conflict_reason_xml,
- conflict->reason),
+ conflict_reason),
svn_node_kind_to_word(incoming_kind),
svn_token__to_word(map_conflict_action_xml,
- conflict->action),
+ conflict_action),
operation);
}
return SVN_NO_ERROR;
@@ -400,20 +418,27 @@ append_tree_conflict_info_xml(svn_string
{
apr_hash_t *att_hash = apr_hash_make(pool);
const char *tmp;
+ const svn_wc_conflict_version_t *src_left_version;
+ const svn_wc_conflict_version_t *src_right_version;
svn_hash_sets(att_hash, "victim",
- svn_dirent_basename(conflict->local_abspath, pool));
+ svn_dirent_basename(
+ svn_client_conflict_get_local_abspath(conflict), pool));
svn_hash_sets(att_hash, "kind",
- svn_cl__node_kind_str_xml(conflict->node_kind));
+ svn_cl__node_kind_str_xml(
+ svn_client_conflict_get_node_kind(conflict)));
svn_hash_sets(att_hash, "operation",
- svn_cl__operation_str_xml(conflict->operation, pool));
+ svn_cl__operation_str_xml(
+ svn_client_conflict_get_operation(conflict), pool));
- tmp = svn_token__to_word(map_conflict_action_xml, conflict->action);
+ tmp = svn_token__to_word(map_conflict_action_xml,
+ svn_client_conflict_get_action(conflict));
svn_hash_sets(att_hash, "action", tmp);
- tmp = svn_token__to_word(map_conflict_reason_xml, conflict->reason);
+ tmp = svn_token__to_word(map_conflict_reason_xml,
+ svn_client_conflict_get_reason(conflict));
svn_hash_sets(att_hash, "reason", tmp);
/* Open the tree-conflict tag. */
@@ -422,16 +447,18 @@ append_tree_conflict_info_xml(svn_string
/* Add child tags for OLDER_VERSION and THEIR_VERSION. */
- if (conflict->src_left_version)
+ src_left_version = svn_client_conflict_get_src_left_version(conflict);
+ if (src_left_version)
SVN_ERR(add_conflict_version_xml(&str,
"source-left",
- conflict->src_left_version,
+ src_left_version,
pool));
- if (conflict->src_right_version)
+ src_right_version = svn_client_conflict_get_src_right_version(conflict);
+ if (src_right_version)
SVN_ERR(add_conflict_version_xml(&str,
"source-right",
- conflict->src_right_version,
+ src_right_version,
pool));
svn_xml_make_close_tag(&str, pool, "tree-conflict");
@@ -446,7 +473,15 @@ svn_cl__append_conflict_info_xml(svn_str
{
apr_hash_t *att_hash;
const char *kind;
- if (conflict->kind == svn_wc_conflict_kind_tree)
+ svn_wc_conflict_kind_t conflict_kind;
+ svn_wc_operation_t conflict_operation;
+ const svn_wc_conflict_version_t *src_left_version;
+ const svn_wc_conflict_version_t *src_right_version;
+
+ conflict_kind = svn_client_conflict_get_kind(conflict);
+ conflict_operation = svn_client_conflict_get_operation(conflict);
+
+ if (conflict_kind == svn_wc_conflict_kind_tree)
{
/* Uses other element type */
return svn_error_trace(
@@ -456,53 +491,59 @@ svn_cl__append_conflict_info_xml(svn_str
att_hash = apr_hash_make(scratch_pool);
svn_hash_sets(att_hash, "operation",
- svn_cl__operation_str_xml(conflict->operation, scratch_pool));
+ svn_cl__operation_str_xml(conflict_operation, scratch_pool));
- kind = svn_token__to_word(map_conflict_kind_xml, conflict->kind);
+ kind = svn_token__to_word(map_conflict_kind_xml, conflict_kind);
svn_hash_sets(att_hash, "type", kind);
svn_hash_sets(att_hash, "operation",
- svn_cl__operation_str_xml(conflict->operation, scratch_pool));
+ svn_cl__operation_str_xml(conflict_operation, scratch_pool));
/* "<conflict>" */
svn_xml_make_open_tag_hash(&str, scratch_pool,
svn_xml_normal, "conflict", att_hash);
- if (conflict->src_left_version)
+ src_left_version = svn_client_conflict_get_src_left_version(conflict);
+ if (src_left_version)
SVN_ERR(add_conflict_version_xml(&str,
"source-left",
- conflict->src_left_version,
+ src_left_version,
scratch_pool));
- if (conflict->src_right_version)
+ src_right_version = svn_client_conflict_get_src_right_version(conflict);
+ if (src_right_version)
SVN_ERR(add_conflict_version_xml(&str,
"source-right",
- conflict->src_right_version,
+ src_right_version,
scratch_pool));
- switch (conflict->kind)
+ switch (conflict_kind)
{
case svn_wc_conflict_kind_text:
/* "<prev-base-file> xx </prev-base-file>" */
- svn_cl__xml_tagged_cdata(&str, scratch_pool, "prev-base-file",
- conflict->base_abspath);
+ svn_cl__xml_tagged_cdata(
+ &str, scratch_pool, "prev-base-file",
+ svn_client_conflict_get_base_abspath(conflict));
/* "<prev-wc-file> xx </prev-wc-file>" */
- svn_cl__xml_tagged_cdata(&str, scratch_pool, "prev-wc-file",
- conflict->my_abspath);
+ svn_cl__xml_tagged_cdata(
+ &str, scratch_pool, "prev-wc-file",
+ svn_client_conflict_get_my_abspath(conflict));
/* "<cur-base-file> xx </cur-base-file>" */
- svn_cl__xml_tagged_cdata(&str, scratch_pool, "cur-base-file",
- conflict->their_abspath);
+ svn_cl__xml_tagged_cdata(
+ &str, scratch_pool, "cur-base-file",
+ svn_client_conflict_get_their_abspath(conflict));
break;
case svn_wc_conflict_kind_property:
/* "<prop-file> xx </prop-file>" */
- svn_cl__xml_tagged_cdata(&str, scratch_pool, "prop-file",
- conflict->their_abspath);
+ svn_cl__xml_tagged_cdata(
+ &str, scratch_pool, "prop-file",
+ svn_client_conflict_get_their_abspath(conflict));
break;
default:
Modified: subversion/branches/move-tracking-2/subversion/svn/conflict-callbacks.c
URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/svn/conflict-callbacks.c?rev=1682839&r1=1682838&r2=1682839&view=diff
==============================================================================
--- subversion/branches/move-tracking-2/subversion/svn/conflict-callbacks.c (original)
+++ subversion/branches/move-tracking-2/subversion/svn/conflict-callbacks.c Mon Jun 1 08:57:05 2015
@@ -141,8 +141,10 @@ show_diff(const svn_wc_conflict_descript
svn_diff_t *diff;
svn_stream_t *output;
svn_diff_file_options_t *options;
+ const char *merged_file;
- if (desc->merged_file)
+ merged_file = svn_client_conflict_get_merged_file(desc);
+ if (merged_file)
{
/* For conflicts recorded by the 'merge' operation, show a diff between
* 'mine' (the working version of the file as it appeared before the
@@ -156,26 +158,26 @@ show_diff(const svn_wc_conflict_descript
*
* This way, the diff is always minimal and clearly identifies changes
* brought into the working copy by the update/switch/merge operation. */
- if (desc->operation == svn_wc_operation_merge)
+ if (svn_client_conflict_get_operation(desc) == svn_wc_operation_merge)
{
- path1 = desc->my_abspath;
+ path1 = svn_client_conflict_get_my_abspath(desc);
label1 = _("MINE");
}
else
{
- path1 = desc->their_abspath;
+ path1 = svn_client_conflict_get_their_abspath(desc);
label1 = _("THEIRS");
}
- path2 = desc->merged_file;
+ path2 = merged_file;
label2 = _("MERGED");
}
else
{
/* There's no merged file, but we can show the
difference between mine and theirs. */
- path1 = desc->their_abspath;
+ path1 = svn_client_conflict_get_their_abspath(desc);
label1 = _("THEIRS");
- path2 = desc->my_abspath;
+ path2 = svn_client_conflict_get_my_abspath(desc);
label2 = _("MINE");
}
@@ -219,24 +221,25 @@ show_conflicts(const svn_wc_conflict_des
options->ignore_eol_style = TRUE;
SVN_ERR(svn_stream_for_stdout(&output, pool));
SVN_ERR(svn_diff_file_diff3_2(&diff,
- desc->base_abspath,
- desc->my_abspath,
- desc->their_abspath,
+ svn_client_conflict_get_base_abspath(desc),
+ svn_client_conflict_get_my_abspath(desc),
+ svn_client_conflict_get_their_abspath(desc),
options, pool));
/* ### Consider putting the markers/labels from
### svn_wc__merge_internal in the conflict description. */
- return svn_diff_file_output_merge3(output, diff,
- desc->base_abspath,
- desc->my_abspath,
- desc->their_abspath,
- _("||||||| ORIGINAL"),
- _("<<<<<<< MINE (select with 'mc')"),
- _(">>>>>>> THEIRS (select with 'tc')"),
- "=======",
- svn_diff_conflict_display_only_conflicts,
- cancel_func,
- cancel_baton,
- pool);
+ return svn_diff_file_output_merge3(
+ output, diff,
+ svn_client_conflict_get_base_abspath(desc),
+ svn_client_conflict_get_my_abspath(desc),
+ svn_client_conflict_get_their_abspath(desc),
+ _("||||||| ORIGINAL"),
+ _("<<<<<<< MINE (select with 'mc')"),
+ _(">>>>>>> THEIRS (select with 'tc')"),
+ "=======",
+ svn_diff_conflict_display_only_conflicts,
+ cancel_func,
+ cancel_baton,
+ pool);
}
/* Perform a 3-way merge of the conflicting values of a property,
@@ -255,9 +258,9 @@ merge_prop_conflict(svn_stream_t *output
void *cancel_baton,
apr_pool_t *pool)
{
- const char *base_abspath = desc->base_abspath;
- const char *my_abspath = desc->my_abspath;
- const char *their_abspath = desc->their_abspath;
+ const char *base_abspath = svn_client_conflict_get_base_abspath(desc);
+ const char *my_abspath = svn_client_conflict_get_my_abspath(desc);
+ const char *their_abspath = svn_client_conflict_get_their_abspath(desc);
svn_diff_file_options_t *options = svn_diff_file_options_create(pool);
svn_diff_t *diff;
@@ -712,14 +715,21 @@ handle_text_conflict(svn_wc_conflict_res
give them a rational basis for choosing (r)esolved? */
svn_boolean_t knows_something = FALSE;
const char *local_relpath;
+ const char *local_abspath = svn_client_conflict_get_local_abspath(desc);
+ svn_boolean_t is_binary = svn_client_conflict_get_is_binary(desc);
+ const char *base_abspath = svn_client_conflict_get_base_abspath(desc);
+ const char *my_abspath = svn_client_conflict_get_my_abspath(desc);
+ const char *their_abspath = svn_client_conflict_get_their_abspath(desc);
+ const char *merged_file = svn_client_conflict_get_merged_file(desc);
- SVN_ERR_ASSERT(desc->kind == svn_wc_conflict_kind_text);
+ SVN_ERR_ASSERT(svn_client_conflict_get_kind(desc) ==
+ svn_wc_conflict_kind_text);
local_relpath = svn_cl__local_style_skip_ancestor(b->path_prefix,
- desc->local_abspath,
+ local_abspath,
scratch_pool);
- if (desc->is_binary)
+ if (is_binary)
SVN_ERR(svn_cmdline_fprintf(stderr, scratch_pool,
_("Conflict discovered in binary file '%s'.\n"),
local_relpath));
@@ -736,9 +746,9 @@ handle_text_conflict(svn_wc_conflict_res
markers to the user (this is the typical 3-way merge
scenario), or if no base is available, we can show a diff
between mine and theirs. */
- if (!desc->is_binary &&
- ((desc->merged_file && desc->base_abspath)
- || (!desc->base_abspath && desc->my_abspath && desc->their_abspath)))
+ if (!is_binary &&
+ ((merged_file && base_abspath)
+ || (!base_abspath && my_abspath && their_abspath)))
diff_allowed = TRUE;
while (TRUE)
@@ -746,7 +756,7 @@ handle_text_conflict(svn_wc_conflict_res
const char *options[1 + MAX_ARRAY_LEN(binary_conflict_options,
text_conflict_options)];
- const resolver_option_t *conflict_options = desc->is_binary
+ const resolver_option_t *conflict_options = is_binary
? binary_conflict_options
: text_conflict_options;
const char **next_option = options;
@@ -758,13 +768,13 @@ handle_text_conflict(svn_wc_conflict_res
if (diff_allowed)
{
/* We need one more path for this feature. */
- if (desc->my_abspath)
+ if (my_abspath)
*next_option++ = "df";
*next_option++ = "e";
/* We need one more path for this feature. */
- if (desc->my_abspath)
+ if (my_abspath)
*next_option++ = "m";
if (knows_something)
@@ -781,7 +791,7 @@ handle_text_conflict(svn_wc_conflict_res
/* The 'mine-full' option selects the ".mine" file so only offer
* it if that file exists. It does not exist for binary files,
* for example (questionable historical behaviour since 1.0). */
- if (desc->my_abspath)
+ if (my_abspath)
*next_option++ = "mf";
*next_option++ = "tf";
@@ -808,7 +818,7 @@ handle_text_conflict(svn_wc_conflict_res
}
else if (strcmp(opt->code, "dc") == 0)
{
- if (desc->is_binary)
+ if (is_binary)
{
SVN_ERR(svn_cmdline_fprintf(stderr, iterpool,
_("Invalid option; cannot "
@@ -816,8 +826,7 @@ handle_text_conflict(svn_wc_conflict_res
"binary file.\n\n")));
continue;
}
- else if (! (desc->my_abspath && desc->base_abspath &&
- desc->their_abspath))
+ else if (! (my_abspath && base_abspath && their_abspath))
{
SVN_ERR(svn_cmdline_fprintf(stderr, iterpool,
_("Invalid option; original "
@@ -833,7 +842,7 @@ handle_text_conflict(svn_wc_conflict_res
else if (strcmp(opt->code, "df") == 0)
{
/* Re-check preconditions. */
- if (! diff_allowed || ! desc->my_abspath)
+ if (! diff_allowed || ! my_abspath)
{
SVN_ERR(svn_cmdline_fprintf(stderr, iterpool,
_("Invalid option; there's no "
@@ -848,7 +857,7 @@ handle_text_conflict(svn_wc_conflict_res
}
else if (strcmp(opt->code, "e") == 0 || strcmp(opt->code, ":-E") == 0)
{
- SVN_ERR(open_editor(&performed_edit, desc->merged_file, b, iterpool));
+ SVN_ERR(open_editor(&performed_edit, merged_file, b, iterpool));
if (performed_edit)
knows_something = TRUE;
}
@@ -858,7 +867,7 @@ handle_text_conflict(svn_wc_conflict_res
svn_error_t *err;
/* Re-check preconditions. */
- if (! desc->my_abspath)
+ if (! my_abspath)
{
SVN_ERR(svn_cmdline_fprintf(stderr, iterpool,
_("Invalid option; there's no "
@@ -866,11 +875,11 @@ handle_text_conflict(svn_wc_conflict_res
continue;
}
- err = svn_cl__merge_file_externally(desc->base_abspath,
- desc->their_abspath,
- desc->my_abspath,
- desc->merged_file,
- desc->local_abspath, b->config,
+ err = svn_cl__merge_file_externally(base_abspath,
+ their_abspath,
+ my_abspath,
+ merged_file,
+ local_abspath, b->config,
NULL, iterpool);
if (err)
{
@@ -881,11 +890,11 @@ handle_text_conflict(svn_wc_conflict_res
/* Try the internal merge tool. */
svn_error_clear(err);
SVN_ERR(svn_cl__merge_file(&remains_in_conflict,
- desc->base_abspath,
- desc->their_abspath,
- desc->my_abspath,
- desc->merged_file,
- desc->local_abspath,
+ base_abspath,
+ their_abspath,
+ my_abspath,
+ merged_file,
+ local_abspath,
b->path_prefix,
b->editor_cmd,
b->config,
@@ -924,18 +933,17 @@ handle_text_conflict(svn_wc_conflict_res
* and then when the user chooses it say 'Invalid option'. */
/* ### 'merged_file' shouldn't be necessary *before* we launch the
* resolver: it should be the *result* of doing so. */
- if (desc->base_abspath && desc->their_abspath &&
- desc->my_abspath && desc->merged_file)
+ if (base_abspath && their_abspath && my_abspath && merged_file)
{
svn_error_t *err;
char buf[1024];
const char *message;
- err = svn_cl__merge_file_externally(desc->base_abspath,
- desc->their_abspath,
- desc->my_abspath,
- desc->merged_file,
- desc->local_abspath,
+ err = svn_cl__merge_file_externally(base_abspath,
+ their_abspath,
+ my_abspath,
+ merged_file,
+ local_abspath,
b->config, NULL, iterpool);
if (err && (err->apr_err == SVN_ERR_CL_NO_EXTERNAL_MERGE_TOOL ||
err->apr_err == SVN_ERR_EXTERNAL_PROGRAM))
@@ -962,11 +970,11 @@ handle_text_conflict(svn_wc_conflict_res
svn_boolean_t remains_in_conflict = TRUE;
SVN_ERR(svn_cl__merge_file(&remains_in_conflict,
- desc->base_abspath,
- desc->their_abspath,
- desc->my_abspath,
- desc->merged_file,
- desc->local_abspath,
+ base_abspath,
+ their_abspath,
+ my_abspath,
+ merged_file,
+ local_abspath,
b->path_prefix,
b->editor_cmd,
b->config,
@@ -981,7 +989,7 @@ handle_text_conflict(svn_wc_conflict_res
{
if ((opt->choice == svn_wc_conflict_choose_mine_conflict
|| opt->choice == svn_wc_conflict_choose_theirs_conflict)
- && desc->is_binary)
+ && is_binary)
{
SVN_ERR(svn_cmdline_fprintf(stderr, iterpool,
_("Invalid option; cannot choose "
@@ -1036,14 +1044,16 @@ handle_prop_conflict(svn_wc_conflict_res
((svn_wc_conflict_description2_t *)desc)->their_abspath = desc->merged_file;
((svn_wc_conflict_description2_t *)desc)->merged_file = NULL;
- SVN_ERR_ASSERT(desc->kind == svn_wc_conflict_kind_property);
+ SVN_ERR_ASSERT(svn_client_conflict_get_kind(desc) ==
+ svn_wc_conflict_kind_property);
SVN_ERR(svn_cmdline_fprintf(stderr, scratch_pool,
_("Conflict for property '%s' discovered"
" on '%s'.\n"),
- desc->property_name,
+ svn_client_conflict_get_property_name(desc),
svn_cl__local_style_skip_ancestor(
- b->path_prefix, desc->local_abspath,
+ b->path_prefix,
+ svn_client_conflict_get_local_abspath(desc),
scratch_pool)));
SVN_ERR(svn_cl__get_human_readable_prop_conflict_description(&message, desc,
@@ -1140,21 +1150,22 @@ handle_tree_conflict(svn_wc_conflict_res
stderr, scratch_pool,
_("Tree conflict on '%s'\n > %s\n"),
svn_cl__local_style_skip_ancestor(b->path_prefix,
- desc->local_abspath,
- scratch_pool),
+ svn_client_conflict_get_local_abspath(desc), scratch_pool),
readable_desc));
src_left_version =
- svn_cl__node_description(desc->src_left_version,
- desc->src_left_version->repos_url,
- scratch_pool);
+ svn_cl__node_description(
+ svn_client_conflict_get_src_left_version(desc),
+ svn_client_conflict_get_src_left_version(desc)->repos_url,
+ scratch_pool);
if (src_left_version)
SVN_ERR(svn_cmdline_fprintf(stderr, scratch_pool, "%s: %s\n",
_("Source left"), src_left_version));
src_right_version =
- svn_cl__node_description(desc->src_right_version,
- desc->src_right_version->repos_url,
- scratch_pool);
+ svn_cl__node_description(
+ svn_client_conflict_get_src_right_version(desc),
+ svn_client_conflict_get_src_right_version(desc)->repos_url,
+ scratch_pool);
if (src_right_version)
SVN_ERR(svn_cmdline_fprintf(stderr, scratch_pool, "%s: %s\n",
_("Source right"), src_right_version));
@@ -1169,18 +1180,22 @@ handle_tree_conflict(svn_wc_conflict_res
tc_opts = tree_conflict_options;
- if (desc->operation == svn_wc_operation_update ||
- desc->operation == svn_wc_operation_switch)
+ if (svn_client_conflict_get_operation(desc) == svn_wc_operation_update ||
+ svn_client_conflict_get_operation(desc) == svn_wc_operation_switch)
{
- if (desc->reason == svn_wc_conflict_reason_moved_away)
+ svn_wc_conflict_reason_t reason;
+
+ reason = svn_client_conflict_get_reason(desc);
+ if (reason == svn_wc_conflict_reason_moved_away)
{
tc_opts = tree_conflict_options_update_moved_away;
}
- else if (desc->reason == svn_wc_conflict_reason_deleted ||
- desc->reason == svn_wc_conflict_reason_replaced)
+ else if (reason == svn_wc_conflict_reason_deleted ||
+ reason == svn_wc_conflict_reason_replaced)
{
- if (desc->action == svn_wc_conflict_action_edit &&
- desc->node_kind == svn_node_dir)
+ if (svn_client_conflict_get_action(desc) ==
+ svn_wc_conflict_action_edit &&
+ svn_client_conflict_get_node_kind(desc) == svn_node_dir)
tc_opts = tree_conflict_options_update_edit_deleted_dir;
}
}
@@ -1217,6 +1232,10 @@ conflict_func_interactive(svn_wc_conflic
{
svn_cl__interactive_conflict_baton_t *b = baton;
svn_error_t *err;
+ const char *base_abspath = svn_client_conflict_get_base_abspath(desc);
+ const char *my_abspath = svn_client_conflict_get_my_abspath(desc);
+ const char *their_abspath = svn_client_conflict_get_their_abspath(desc);
+ const char *merged_file = svn_client_conflict_get_merged_file(desc);
/* Start out assuming we're going to postpone the conflict. */
*result = svn_wc_create_conflict_result(svn_wc_conflict_choose_postpone,
@@ -1237,8 +1256,8 @@ conflict_func_interactive(svn_wc_conflic
case svn_cl__accept_working:
/* If the caller didn't merge the property values, then I guess
* 'choose working' means 'choose mine'... */
- if (! desc->merged_file)
- (*result)->merged_file = desc->my_abspath;
+ if (! merged_file)
+ (*result)->merged_file = my_abspath;
(*result)->choice = svn_wc_conflict_choose_merged;
return SVN_NO_ERROR;
case svn_cl__accept_mine_conflict:
@@ -1254,7 +1273,7 @@ conflict_func_interactive(svn_wc_conflic
(*result)->choice = svn_wc_conflict_choose_theirs_full;
return SVN_NO_ERROR;
case svn_cl__accept_edit:
- if (desc->merged_file)
+ if (merged_file)
{
if (b->external_failed)
{
@@ -1262,7 +1281,7 @@ conflict_func_interactive(svn_wc_conflic
return SVN_NO_ERROR;
}
- err = svn_cmdline__edit_file_externally(desc->merged_file,
+ err = svn_cmdline__edit_file_externally(merged_file,
b->editor_cmd, b->config,
scratch_pool);
if (err && (err->apr_err == SVN_ERR_CL_NO_EXTERNAL_EDITOR ||
@@ -1285,10 +1304,10 @@ conflict_func_interactive(svn_wc_conflic
/* else, fall through to prompting. */
break;
case svn_cl__accept_launch:
- if (desc->base_abspath && desc->their_abspath
- && desc->my_abspath && desc->merged_file)
+ if (base_abspath && their_abspath && my_abspath && merged_file)
{
svn_boolean_t remains_in_conflict;
+ const char *local_abspath;
if (b->external_failed)
{
@@ -1296,11 +1315,12 @@ conflict_func_interactive(svn_wc_conflic
return SVN_NO_ERROR;
}
- err = svn_cl__merge_file_externally(desc->base_abspath,
- desc->their_abspath,
- desc->my_abspath,
- desc->merged_file,
- desc->local_abspath,
+ local_abspath = svn_client_conflict_get_local_abspath(desc);
+ err = svn_cl__merge_file_externally(base_abspath,
+ their_abspath,
+ my_abspath,
+ merged_file,
+ local_abspath,
b->config,
&remains_in_conflict,
scratch_pool);
@@ -1344,13 +1364,14 @@ conflict_func_interactive(svn_wc_conflic
Conflicting edits on a file's text, or
Conflicting edits on a property.
*/
- if (((desc->kind == svn_wc_conflict_kind_text)
- && (desc->action == svn_wc_conflict_action_edit)
- && (desc->reason == svn_wc_conflict_reason_edited)))
+ if (((svn_client_conflict_get_kind(desc) == svn_wc_conflict_kind_text)
+ && (svn_client_conflict_get_action(desc) == svn_wc_conflict_action_edit)
+ && (svn_client_conflict_get_reason(desc) ==
+ svn_wc_conflict_reason_edited)))
SVN_ERR(handle_text_conflict(*result, desc, b, scratch_pool));
- else if (desc->kind == svn_wc_conflict_kind_property)
+ else if (svn_client_conflict_get_kind(desc) == svn_wc_conflict_kind_property)
SVN_ERR(handle_prop_conflict(*result, desc, b, result_pool, scratch_pool));
- else if (desc->kind == svn_wc_conflict_kind_tree)
+ else if (svn_client_conflict_get_kind(desc) == svn_wc_conflict_kind_tree)
SVN_ERR(handle_tree_conflict(*result, desc, b, scratch_pool));
else /* other types of conflicts -- do nothing about them. */
@@ -1378,10 +1399,11 @@ svn_cl__conflict_func_interactive(svn_wc
{
const char *local_path
= svn_cl__local_style_skip_ancestor(
- b->path_prefix, desc->local_abspath, scratch_pool);
+ b->path_prefix, svn_client_conflict_get_local_abspath(desc),
+ scratch_pool);
svn_cl__conflict_stats_resolved(b->conflict_stats, local_path,
- desc->kind);
+ svn_client_conflict_get_kind(desc));
}
return SVN_NO_ERROR;
}
Modified: subversion/branches/move-tracking-2/subversion/svn/info-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/svn/info-cmd.c?rev=1682839&r1=1682838&r2=1682839&view=diff
==============================================================================
--- subversion/branches/move-tracking-2/subversion/svn/info-cmd.c (original)
+++ subversion/branches/move-tracking-2/subversion/svn/info-cmd.c Mon Jun 1 08:57:05 2015
@@ -591,32 +591,39 @@ print_info(void *baton,
APR_ARRAY_IDX(info->wc_info->conflicts, i,
const svn_wc_conflict_description2_t *);
const char *desc;
+ const char *base_abspath;
+ const char *my_abspath;
+ const char *their_abspath;
+
+ base_abspath = svn_client_conflict_get_base_abspath(conflict);
+ my_abspath = svn_client_conflict_get_my_abspath(conflict);
+ their_abspath = svn_client_conflict_get_their_abspath(conflict);
- switch (conflict->kind)
+ switch (svn_client_conflict_get_kind(conflict))
{
case svn_wc_conflict_kind_text:
- if (conflict->base_abspath)
+ if (base_abspath)
SVN_ERR(svn_cmdline_printf(pool,
_("Conflict Previous Base File: %s\n"),
svn_cl__local_style_skip_ancestor(
receiver_baton->path_prefix,
- conflict->base_abspath,
+ base_abspath,
pool)));
- if (conflict->my_abspath)
+ if (my_abspath)
SVN_ERR(svn_cmdline_printf(pool,
_("Conflict Previous Working File: %s\n"),
svn_cl__local_style_skip_ancestor(
receiver_baton->path_prefix,
- conflict->my_abspath,
+ my_abspath,
pool)));
- if (conflict->their_abspath)
+ if (their_abspath)
SVN_ERR(svn_cmdline_printf(pool,
_("Conflict Current Base File: %s\n"),
svn_cl__local_style_skip_ancestor(
receiver_baton->path_prefix,
- conflict->their_abspath,
+ their_abspath,
pool)));
break;
@@ -625,9 +632,10 @@ print_info(void *baton,
SVN_ERR(svn_cmdline_printf(pool,
_("Conflict Properties File: %s\n"),
svn_cl__local_style_skip_ancestor(
- receiver_baton->path_prefix,
- conflict->prop_reject_abspath,
- pool)));
+ receiver_baton->path_prefix,
+ svn_client_conflict_get_prop_reject_abspath(
+ conflict),
+ pool)));
printed_prop_conflict_file = TRUE;
break;
@@ -659,21 +667,23 @@ print_info(void *baton,
const char *desc;
SVN_ERR(svn_cl__get_human_readable_action_description(&desc,
- svn_wc_conflict_action_edit,
- conflict->operation,
- conflict->node_kind, pool));
+ svn_wc_conflict_action_edit,
+ svn_client_conflict_get_operation(conflict),
+ svn_client_conflict_get_node_kind(conflict), pool));
SVN_ERR(svn_cmdline_printf(pool, "%s: %s\n",
_("Conflict Details"), desc));
}
src_left_version =
- svn_cl__node_description(conflict->src_left_version,
- info->repos_root_URL, pool);
+ svn_cl__node_description(
+ svn_client_conflict_get_src_left_version(conflict),
+ info->repos_root_URL, pool);
src_right_version =
- svn_cl__node_description(conflict->src_right_version,
- info->repos_root_URL, pool);
+ svn_cl__node_description(
+ svn_client_conflict_get_src_right_version(conflict),
+ info->repos_root_URL, pool);
if (src_left_version)
SVN_ERR(svn_cmdline_printf(pool, " %s: %s\n",
Modified: subversion/branches/move-tracking-2/subversion/svnrdump/dump_editor.c
URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/svnrdump/dump_editor.c?rev=1682839&r1=1682838&r2=1682839&view=diff
==============================================================================
--- subversion/branches/move-tracking-2/subversion/svnrdump/dump_editor.c (original)
+++ subversion/branches/move-tracking-2/subversion/svnrdump/dump_editor.c Mon Jun 1 08:57:05 2015
@@ -879,7 +879,7 @@ close_file(void *file_baton,
{
struct file_baton *fb = file_baton;
struct dump_edit_baton *eb = fb->eb;
- apr_finfo_t *info = apr_pcalloc(pool, sizeof(apr_finfo_t));
+ svn_filesize_t text_content_length = 0;
svn_stringbuf_t *propstring = NULL;
svn_repos__dumpfile_headers_t *headers;
@@ -903,15 +903,12 @@ close_file(void *file_baton,
/* Dump the text headers */
if (fb->dump_text)
{
- apr_status_t err;
-
/* Text-delta: true */
svn_repos__dumpfile_header_push(
headers, SVN_REPOS_DUMPFILE_TEXT_DELTA, "true");
- err = apr_file_info_get(info, APR_FINFO_SIZE, eb->delta_file);
- if (err)
- SVN_ERR(svn_error_wrap_apr(err, NULL));
+ SVN_ERR(svn_io_file_size_get(&text_content_length, eb->delta_file,
+ pool));
if (fb->base_checksum)
/* Text-delta-base-md5: */
@@ -925,7 +922,7 @@ close_file(void *file_baton,
/* Dump the headers and props now */
SVN_ERR(svn_repos__dump_node_record(eb->stream, headers, propstring,
- fb->dump_text, info->size,
+ fb->dump_text, text_content_length,
FALSE /*content_length_always*/,
pool));
Modified: subversion/branches/move-tracking-2/subversion/tests/libsvn_fs/locks-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/tests/libsvn_fs/locks-test.c?rev=1682839&r1=1682838&r2=1682839&view=diff
==============================================================================
--- subversion/branches/move-tracking-2/subversion/tests/libsvn_fs/locks-test.c (original)
+++ subversion/branches/move-tracking-2/subversion/tests/libsvn_fs/locks-test.c Mon Jun 1 08:57:05 2015
@@ -1101,9 +1101,10 @@ obtain_write_lock_failure(const svn_test
apr_hash_t *lock_paths, *unlock_paths;
/* The test makes sense only for FSFS. */
- if (strcmp(opts->fs_type, SVN_FS_TYPE_FSFS) != 0)
+ if (strcmp(opts->fs_type, SVN_FS_TYPE_FSFS) != 0
+ && strcmp(opts->fs_type, SVN_FS_TYPE_FSX) != 0)
return svn_error_create(SVN_ERR_TEST_SKIPPED, NULL,
- "this will test FSFS repositories only");
+ "this will test FSFS/FSX repositories only");
SVN_ERR(create_greek_fs(&fs, &newrev, "test-obtain-write-lock-failure",
opts, pool));
Modified: subversion/branches/move-tracking-2/subversion/tests/libsvn_subr/io-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/tests/libsvn_subr/io-test.c?rev=1682839&r1=1682838&r2=1682839&view=diff
==============================================================================
--- subversion/branches/move-tracking-2/subversion/tests/libsvn_subr/io-test.c (original)
+++ subversion/branches/move-tracking-2/subversion/tests/libsvn_subr/io-test.c Mon Jun 1 08:57:05 2015
@@ -782,7 +782,47 @@ test_install_stream_to_longpath(apr_pool
return SVN_NO_ERROR;
}
-
+
+static svn_error_t *
+test_file_size_get(apr_pool_t *pool)
+{
+ const char *tmp_dir, *path;
+ apr_file_t *file;
+ svn_filesize_t filesize;
+
+ /* Create an empty directory. */
+ SVN_ERR(svn_dirent_get_absolute(&tmp_dir, "test_file_size_get", pool));
+ SVN_ERR(svn_io_remove_dir2(tmp_dir, TRUE, NULL, NULL, pool));
+ SVN_ERR(svn_io_make_dir_recursively(tmp_dir, pool));
+ svn_test_add_dir_cleanup(tmp_dir);
+
+ /* Path does not exist. */
+ path = svn_dirent_join(tmp_dir, "file", pool);
+
+ /* Create a file.*/
+ SVN_ERR(svn_io_file_open(&file, path,
+ APR_WRITE | APR_CREATE | APR_BUFFERED,
+ APR_OS_DEFAULT, pool));
+ SVN_ERR(svn_io_file_size_get(&filesize, file, pool));
+ SVN_TEST_ASSERT(filesize == 0);
+
+ /* Write 8 bytes and check new size. */
+ SVN_ERR(svn_io_file_write_full(file, "12345678", 8, NULL, pool));
+
+ SVN_ERR(svn_io_file_size_get(&filesize, file, pool));
+ SVN_TEST_ASSERT(filesize == 8);
+
+ /* Truncate to 2 bytes. */
+ SVN_ERR(svn_io_file_trunc(file, 2, pool));
+
+ SVN_ERR(svn_io_file_size_get(&filesize, file, pool));
+ SVN_TEST_ASSERT(filesize == 2);
+
+ /* Close the file. */
+ SVN_ERR(svn_io_file_close(file, pool));
+ return SVN_NO_ERROR;
+}
+
/* The test table. */
static int max_threads = 3;
@@ -806,6 +846,8 @@ static struct svn_test_descriptor_t test
"test ignore-enoent"),
SVN_TEST_PASS2(test_install_stream_to_longpath,
"test svn_stream__install_stream to long path"),
+ SVN_TEST_PASS2(test_file_size_get,
+ "test svn_io_file_size_get"),
SVN_TEST_NULL
};
Modified: subversion/branches/move-tracking-2/subversion/tests/libsvn_subr/spillbuf-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/tests/libsvn_subr/spillbuf-test.c?rev=1682839&r1=1682838&r2=1682839&view=diff
==============================================================================
--- subversion/branches/move-tracking-2/subversion/tests/libsvn_subr/spillbuf-test.c (original)
+++ subversion/branches/move-tracking-2/subversion/tests/libsvn_subr/spillbuf-test.c Mon Jun 1 08:57:05 2015
@@ -514,7 +514,7 @@ static svn_error_t *
test_spillbuf__file_attrs(apr_pool_t *pool, svn_boolean_t spill_all,
svn_spillbuf_t *buf)
{
- apr_finfo_t finfo;
+ svn_filesize_t filesize;
SVN_ERR(svn_spillbuf__write(buf, "abcdef", 6, pool));
SVN_ERR(svn_spillbuf__write(buf, "ghijkl", 6, pool));
@@ -528,13 +528,12 @@ test_spillbuf__file_attrs(apr_pool_t *po
SVN_TEST_ASSERT(svn_spillbuf__get_file(buf) != NULL);
/* The size of the file must match expectations */
- SVN_ERR(svn_io_file_info_get(&finfo, APR_FINFO_SIZE,
- svn_spillbuf__get_file(buf), pool));
+ SVN_ERR(svn_io_file_size_get(&filesize, svn_spillbuf__get_file(buf), pool));
if (spill_all)
- SVN_TEST_ASSERT(finfo.size == svn_spillbuf__get_size(buf));
+ SVN_TEST_ASSERT(filesize == svn_spillbuf__get_size(buf));
else
- SVN_TEST_ASSERT(finfo.size == (svn_spillbuf__get_size(buf)
- - svn_spillbuf__get_memory_size(buf)));
+ SVN_TEST_ASSERT(filesize == (svn_spillbuf__get_size(buf)
+ - svn_spillbuf__get_memory_size(buf)));
return SVN_NO_ERROR;
}
Propchange: subversion/branches/move-tracking-2/tools/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon Jun 1 08:57:05 2015
@@ -82,4 +82,4 @@
/subversion/branches/verify-at-commit/tools:1462039-1462408
/subversion/branches/verify-keep-going/tools:1439280-1546110
/subversion/branches/wc-collate-path/tools:1402685-1480384
-/subversion/trunk/tools:1606692-1681720
+/subversion/trunk/tools:1606692-1682838
Modified: subversion/branches/move-tracking-2/tools/dev/unix-build/Makefile.svn
URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/tools/dev/unix-build/Makefile.svn?rev=1682839&r1=1682838&r2=1682839&view=diff
==============================================================================
--- subversion/branches/move-tracking-2/tools/dev/unix-build/Makefile.svn (original)
+++ subversion/branches/move-tracking-2/tools/dev/unix-build/Makefile.svn Mon Jun 1 08:57:05 2015
@@ -1470,13 +1470,12 @@ $(MOD_DONTDOTHAT_CONF):
echo >>$@.tmp '/ = deny'
mv -f $@.tmp $@
-$(HTTPD_CHECK_USERS):
+$(HTTPD_CHECK_CONF): $(MOD_DONTDOTHAT_CONF)
mkdir -p $(dir $@)
- echo > $@.tmp 'jrandom:xCGl35kV9oWCY'
- echo >>$@.tmp 'jconstant:xCGl35kV9oWCY'
- mv -f $@.tmp $@
-
-$(HTTPD_CHECK_CONF): $(HTTPD_CHECK_USERS) $(MOD_DONTDOTHAT_CONF)
+ $(PREFIX)/httpd/bin/htpasswd -bc $(HTTPD_CHECK_USERS).tmp jrandom rayjandom
+ $(PREFIX)/httpd/bin/htpasswd -b $(HTTPD_CHECK_USERS).tmp jconstant rayjandom
+ $(PREFIX)/httpd/bin/htpasswd -b $(HTTPD_CHECK_USERS).tmp __dumpster__ __loadster__
+ mv -f $(HTTPD_CHECK_USERS).tmp $(HTTPD_CHECK_USERS)
echo > $@.tmp '# httpd config for make check'
echo >>$@.tmp 'ServerRoot "$(PREFIX)/httpd"'
echo >>$@.tmp 'Listen localhost:$(HTTPD_CHECK_PORT)'