You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by cm...@apache.org on 2013/05/10 16:58:56 UTC
svn commit: r1481041 [31/38] - in /subversion/branches/master-passphrase: ./
build/ build/ac-macros/ build/generator/ build/generator/templates/
contrib/client-side/svncopy/ contrib/hook-scripts/
contrib/server-side/fsfsfixer/ contrib/server-side/fsfsf...
Modified: subversion/branches/master-passphrase/subversion/svn/merge-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/master-passphrase/subversion/svn/merge-cmd.c?rev=1481041&r1=1481040&r2=1481041&view=diff
==============================================================================
--- subversion/branches/master-passphrase/subversion/svn/merge-cmd.c (original)
+++ subversion/branches/master-passphrase/subversion/svn/merge-cmd.c Fri May 10 14:58:47 2013
@@ -63,83 +63,6 @@ ensure_wc_path_has_repo_revision(const c
return SVN_NO_ERROR;
}
-/* Automatic, merge-tracking merge, used for sync or reintegrate purposes. */
-static svn_error_t *
-automatic_merge(const char *source_path_or_url,
- const svn_opt_revision_t *source_revision,
- const char *target_wcpath,
- svn_depth_t depth,
- svn_boolean_t diff_ignore_ancestry,
- svn_boolean_t force_delete,
- svn_boolean_t record_only,
- svn_boolean_t dry_run,
- svn_boolean_t allow_mixed_rev,
- svn_boolean_t allow_local_mods,
- svn_boolean_t allow_switched_subtrees,
- svn_boolean_t verbose,
- const apr_array_header_t *merge_options,
- svn_client_ctx_t *ctx,
- apr_pool_t *scratch_pool)
-{
- svn_client_automatic_merge_t *merge;
-
- if (verbose)
- SVN_ERR(svn_cmdline_printf(scratch_pool, _("--- Checking branch relationship\n")));
- SVN_ERR_W(svn_cl__check_related_source_and_target(
- source_path_or_url, source_revision,
- target_wcpath, &unspecified_revision, ctx, scratch_pool),
- _("Source and target must be different but related branches"));
-
- if (verbose)
- SVN_ERR(svn_cmdline_printf(scratch_pool, _("--- Calculating automatic merge\n")));
-
- /* Find the 3-way merges needed (and check suitability of the WC). */
- SVN_ERR(svn_client_find_automatic_merge(&merge,
- source_path_or_url, source_revision,
- target_wcpath, allow_mixed_rev,
- allow_local_mods, allow_switched_subtrees,
- ctx, scratch_pool, scratch_pool));
-
- if (svn_client_automatic_merge_is_reintegrate_like(merge))
- {
- if (record_only)
- return svn_error_create(SVN_ERR_CL_MUTUALLY_EXCLUSIVE_ARGS, NULL,
- _("The required merge is reintegrate-like, "
- "and the --record-only option "
- "cannot be used with this kind of merge"));
-
- if (depth != svn_depth_unknown)
- return svn_error_create(SVN_ERR_CL_MUTUALLY_EXCLUSIVE_ARGS, NULL,
- _("The required merge is reintegrate-like, "
- "and the --depth option "
- "cannot be used with this kind of merge"));
-
- if (force_delete)
- return svn_error_create(SVN_ERR_CL_MUTUALLY_EXCLUSIVE_ARGS, NULL,
- _("The required merge is reintegrate-like, "
- "and the --force option "
- "cannot be used with this kind of merge"));
-
- if (allow_mixed_rev)
- return svn_error_create(SVN_ERR_CL_MUTUALLY_EXCLUSIVE_ARGS, NULL,
- _("The required merge is reintegrate-like, "
- "and the --allow-mixed-revisions option "
- "cannot be used with this kind of merge"));
- }
-
- if (verbose)
- SVN_ERR(svn_cmdline_printf(scratch_pool, _("--- Merging\n")));
-
- /* Perform the 3-way merges */
- SVN_ERR(svn_client_do_automatic_merge(merge, target_wcpath, depth,
- diff_ignore_ancestry,
- force_delete, record_only,
- dry_run, merge_options,
- ctx, scratch_pool));
-
- return SVN_NO_ERROR;
-}
-
/* Run a merge.
*
* (No docs yet, as this code was just hoisted out of svn_cl__merge().)
@@ -163,28 +86,9 @@ run_merge(svn_boolean_t two_sources_spec
{
svn_error_t *merge_err;
- /* Do an automatic merge if just one source and no revisions. */
- if ((! two_sources_specified)
- && (! opt_state->reintegrate)
- && (! opt_state->ignore_ancestry)
- && first_range_start.kind == svn_opt_revision_unspecified
- && first_range_end.kind == svn_opt_revision_unspecified)
- {
- merge_err = automatic_merge(sourcepath1, &peg_revision1, targetpath,
- opt_state->depth,
- FALSE /*diff_ignore_ancestry*/,
- opt_state->force, /* force_delete */
- opt_state->record_only,
- opt_state->dry_run,
- opt_state->allow_mixed_rev,
- TRUE /*allow_local_mods*/,
- TRUE /*allow_switched_subtrees*/,
- opt_state->verbose,
- options, ctx, scratch_pool);
- }
- else if (opt_state->reintegrate)
+ if (opt_state->reintegrate)
{
- merge_err = svn_client_merge_reintegrate(
+ merge_err = svn_cl__deprecated_merge_reintegrate(
sourcepath1, &peg_revision1, targetpath,
opt_state->dry_run, options, ctx, scratch_pool);
}
@@ -196,13 +100,7 @@ run_merge(svn_boolean_t two_sources_spec
if ((first_range_start.kind == svn_opt_revision_unspecified)
&& (first_range_end.kind == svn_opt_revision_unspecified))
{
- svn_opt_revision_range_t *range = apr_pcalloc(scratch_pool,
- sizeof(*range));
- ranges_to_merge = apr_array_make(scratch_pool, 1, sizeof(range));
- range->start.kind = svn_opt_revision_number;
- range->start.value.number = 1;
- range->end = peg_revision1;
- APR_ARRAY_PUSH(ranges_to_merge, svn_opt_revision_range_t *) = range;
+ ranges_to_merge = NULL;
/* This must be a 'sync' merge so check branch relationship. */
if (opt_state->verbose)
@@ -452,7 +350,7 @@ svn_cl__merge(apr_getopt_t *os,
/* If no targetpath was specified, see if we can infer it from the
sourcepaths. */
if (! has_explicit_target
- && sourcepath1 && sourcepath2
+ && sourcepath1 && sourcepath2
&& strcmp(targetpath, "") == 0)
{
/* If the sourcepath is a URL, it can only refer to a target in
@@ -542,30 +440,6 @@ svn_cl__merge(apr_getopt_t *os,
"with --reintegrate"));
}
- /* Decide how to handle conflicts. If the user wants interactive
- * conflict resolution, postpone conflict resolution during the merge
- * and if any conflicts occur we'll run the conflict resolver later.
- * Otherwise install the appropriate resolver now. */
- if (opt_state->accept_which == svn_cl__accept_unspecified
- || opt_state->accept_which == svn_cl__accept_postpone
- || opt_state->accept_which == svn_cl__accept_edit
- || opt_state->accept_which == svn_cl__accept_launch)
- {
- /* 'svn.c' has already installed the 'postpone' handler for us. */
- }
- else
- {
- svn_cl__interactive_conflict_baton_t *b;
-
- ctx->conflict_func2 = svn_cl__conflict_func_interactive;
- SVN_ERR(svn_cl__get_conflict_func_interactive_baton(
- &b,
- opt_state->accept_which,
- ctx->config, opt_state->editor_cmd,
- ctx->cancel_func, ctx->cancel_baton, pool));
- ctx->conflict_baton2 = b;
- }
-
merge_err = run_merge(two_sources_specified,
sourcepath1, peg_revision1,
sourcepath2,
@@ -580,22 +454,12 @@ svn_cl__merge(apr_getopt_t *os,
_("Merge tracking not possible, use --ignore-ancestry or\n"
"fix invalid mergeinfo in target with 'svn propset'"));
}
- if (! merge_err || merge_err->apr_err == SVN_ERR_WC_FOUND_CONFLICT)
+
+ if (!opt_state->quiet)
{
- svn_error_t *err = SVN_NO_ERROR;
+ svn_error_t *err = svn_cl__notifier_print_conflict_stats(
+ ctx->notify_baton2, pool);
- if (! opt_state->quiet)
- err = svn_cl__notifier_print_conflict_stats(ctx->notify_baton2,
- pool);
-
- /* Resolve any postponed conflicts. (Only if we've been using the
- * default 'postpone' resolver which remembers what was postponed.) */
- if (!err && ctx->conflict_func2 == svn_cl__conflict_func_postpone)
- err = svn_cl__resolve_postponed_conflicts(NULL,
- ctx->conflict_baton2,
- opt_state->accept_which,
- opt_state->editor_cmd,
- ctx, pool);
merge_err = svn_error_compose_create(merge_err, err);
}
Modified: subversion/branches/master-passphrase/subversion/svn/mergeinfo-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/master-passphrase/subversion/svn/mergeinfo-cmd.c?rev=1481041&r1=1481040&r2=1481041&view=diff
==============================================================================
--- subversion/branches/master-passphrase/subversion/svn/mergeinfo-cmd.c (original)
+++ subversion/branches/master-passphrase/subversion/svn/mergeinfo-cmd.c Fri May 10 14:58:47 2013
@@ -211,41 +211,28 @@ mergeinfo_summary(
svn_client_ctx_t *ctx,
apr_pool_t *pool)
{
- svn_client_automatic_merge_t *the_merge;
const char *yca_url, *base_url, *right_url, *target_url;
svn_revnum_t yca_rev, base_rev, right_rev, target_rev;
const char *repos_root_url;
- svn_boolean_t target_is_wc, reintegrate_like;
+ svn_boolean_t target_is_wc, is_reintegration;
target_is_wc = (! svn_path_is_url(target_path_or_url))
&& (target_revision->kind == svn_opt_revision_unspecified
|| target_revision->kind == svn_opt_revision_working);
- if (target_is_wc)
- SVN_ERR(svn_client_find_automatic_merge(
- &the_merge,
- source_path_or_url, source_revision,
- target_path_or_url,
- TRUE, TRUE, TRUE, /* allow_* */
- ctx, pool, pool));
- else
- SVN_ERR(svn_client_find_automatic_merge_no_wc(
- &the_merge,
- source_path_or_url, source_revision,
- target_path_or_url, target_revision,
- ctx, pool, pool));
-
- SVN_ERR(svn_client_automatic_merge_get_locations(
+ SVN_ERR(svn_client_get_merging_summary(
+ &is_reintegration,
&yca_url, &yca_rev,
&base_url, &base_rev,
&right_url, &right_rev,
&target_url, &target_rev,
&repos_root_url,
- the_merge, pool));
- reintegrate_like = svn_client_automatic_merge_is_reintegrate_like(the_merge);
+ source_path_or_url, source_revision,
+ target_path_or_url, target_revision,
+ ctx, pool, pool));
SVN_ERR(mergeinfo_diagram(yca_url, base_url, right_url, target_url,
yca_rev, base_rev, right_rev, target_rev,
- repos_root_url, target_is_wc, reintegrate_like,
+ repos_root_url, target_is_wc, is_reintegration,
pool));
return SVN_NO_ERROR;
@@ -262,6 +249,7 @@ svn_cl__mergeinfo(apr_getopt_t *os,
apr_array_header_t *targets;
const char *source, *target;
svn_opt_revision_t src_peg_revision, tgt_peg_revision;
+ svn_opt_revision_t *src_start_revision, *src_end_revision;
/* Default to depth empty. */
svn_depth_t depth = (opt_state->depth == svn_depth_unknown)
? svn_depth_empty : opt_state->depth;
@@ -314,13 +302,19 @@ svn_cl__mergeinfo(apr_getopt_t *os,
ctx, pool),
_("Source and target must be different but related branches"));
+ src_start_revision = &(opt_state->start_revision);
+ if (opt_state->end_revision.kind == svn_opt_revision_unspecified)
+ src_end_revision = src_start_revision;
+ else
+ src_end_revision = &(opt_state->end_revision);
+
/* Do the real work, depending on the requested data flavor. */
if (opt_state->show_revs == svn_cl__show_revs_merged)
{
SVN_ERR(svn_client_mergeinfo_log2(TRUE, target, &tgt_peg_revision,
source, &src_peg_revision,
- &(opt_state->start_revision),
- &(opt_state->end_revision),
+ src_start_revision,
+ src_end_revision,
print_log_rev, NULL,
TRUE, depth, NULL, ctx,
pool));
@@ -329,14 +323,24 @@ svn_cl__mergeinfo(apr_getopt_t *os,
{
SVN_ERR(svn_client_mergeinfo_log2(FALSE, target, &tgt_peg_revision,
source, &src_peg_revision,
- &(opt_state->start_revision),
- &(opt_state->end_revision),
+ src_start_revision,
+ src_end_revision,
print_log_rev, NULL,
TRUE, depth, NULL, ctx,
pool));
}
else
{
+ if ((opt_state->start_revision.kind != svn_opt_revision_unspecified)
+ || (opt_state->end_revision.kind != svn_opt_revision_unspecified))
+ return svn_error_create(SVN_ERR_CL_ARG_PARSING_ERROR, NULL,
+ _("--revision (-r) option valid only with "
+ "--show-revs option"));
+ if (opt_state->depth != svn_depth_unknown)
+ return svn_error_create(SVN_ERR_CL_ARG_PARSING_ERROR, NULL,
+ _("Depth specification options valid only "
+ "with --show-revs option"));
+
SVN_ERR(mergeinfo_summary(source, &src_peg_revision,
target, &tgt_peg_revision,
ctx, pool));
Modified: subversion/branches/master-passphrase/subversion/svn/notify.c
URL: http://svn.apache.org/viewvc/subversion/branches/master-passphrase/subversion/svn/notify.c?rev=1481041&r1=1481040&r2=1481041&view=diff
==============================================================================
--- subversion/branches/master-passphrase/subversion/svn/notify.c (original)
+++ subversion/branches/master-passphrase/subversion/svn/notify.c Fri May 10 14:58:47 2013
@@ -36,7 +36,10 @@
#include "svn_dirent_uri.h"
#include "svn_path.h"
#include "svn_sorts.h"
+#include "svn_hash.h"
#include "cl.h"
+#include "private/svn_subr_private.h"
+#include "private/svn_dep_compat.h"
#include "svn_private_config.h"
@@ -53,56 +56,159 @@ struct notify_baton
svn_boolean_t had_print_error; /* Used to not keep printing error messages
when we've already had one print error. */
- /* Conflict stats for update and merge. */
- int text_conflicts;
- int prop_conflicts;
- int tree_conflicts;
- int skipped_paths;
+ svn_cl__conflict_stats_t *conflict_stats;
/* The cwd, for use in decomposing absolute paths. */
const char *path_prefix;
};
+/* Conflict stats for operations such as update and merge. */
+struct svn_cl__conflict_stats_t
+{
+ apr_pool_t *stats_pool;
+ apr_hash_t *text_conflicts, *prop_conflicts, *tree_conflicts;
+ int text_conflicts_resolved, prop_conflicts_resolved, tree_conflicts_resolved;
+ int skipped_paths;
+};
-svn_error_t *
-svn_cl__notifier_reset_conflict_stats(void *baton)
+svn_cl__conflict_stats_t *
+svn_cl__conflict_stats_create(apr_pool_t *pool)
{
- struct notify_baton *nb = baton;
+ svn_cl__conflict_stats_t *conflict_stats
+ = apr_palloc(pool, sizeof(*conflict_stats));
- nb->text_conflicts = 0;
- nb->prop_conflicts = 0;
- nb->tree_conflicts = 0;
- nb->skipped_paths = 0;
- return SVN_NO_ERROR;
+ conflict_stats->stats_pool = pool;
+ conflict_stats->text_conflicts = apr_hash_make(pool);
+ conflict_stats->prop_conflicts = apr_hash_make(pool);
+ conflict_stats->tree_conflicts = apr_hash_make(pool);
+ conflict_stats->text_conflicts_resolved = 0;
+ conflict_stats->prop_conflicts_resolved = 0;
+ conflict_stats->tree_conflicts_resolved = 0;
+ conflict_stats->skipped_paths = 0;
+ return conflict_stats;
}
-svn_error_t *
-svn_cl__notifier_print_conflict_stats(void *baton, apr_pool_t *scratch_pool)
+/* Add the PATH (as a key, with a meaningless value) into the HASH in NB. */
+static void
+store_path(struct notify_baton *nb, apr_hash_t *hash, const char *path)
{
- struct notify_baton *nb = baton;
+ svn_hash_sets(hash, apr_pstrdup(nb->conflict_stats->stats_pool, path), "");
+}
- if (nb->text_conflicts > 0 || nb->prop_conflicts > 0
- || nb->tree_conflicts > 0 || nb->skipped_paths > 0)
+void
+svn_cl__conflict_stats_resolved(svn_cl__conflict_stats_t *conflict_stats,
+ const char *path_local,
+ svn_wc_conflict_kind_t conflict_kind)
+{
+ switch (conflict_kind)
+ {
+ case svn_wc_conflict_kind_text:
+ if (svn_hash_gets(conflict_stats->text_conflicts, path_local))
+ {
+ svn_hash_sets(conflict_stats->text_conflicts, path_local, NULL);
+ conflict_stats->text_conflicts_resolved++;
+ }
+ break;
+ case svn_wc_conflict_kind_property:
+ if (svn_hash_gets(conflict_stats->prop_conflicts, path_local))
+ {
+ svn_hash_sets(conflict_stats->prop_conflicts, path_local, NULL);
+ conflict_stats->prop_conflicts_resolved++;
+ }
+ break;
+ case svn_wc_conflict_kind_tree:
+ if (svn_hash_gets(conflict_stats->tree_conflicts, path_local))
+ {
+ svn_hash_sets(conflict_stats->tree_conflicts, path_local, NULL);
+ conflict_stats->tree_conflicts_resolved++;
+ }
+ break;
+ }
+}
+
+static const char *
+remaining_str(apr_pool_t *pool, int n_remaining)
+{
+ return apr_psprintf(pool, Q_("%d remaining",
+ "%d remaining",
+ n_remaining),
+ n_remaining);
+}
+
+static const char *
+resolved_str(apr_pool_t *pool, int n_resolved)
+{
+ return apr_psprintf(pool, Q_("and %d already resolved",
+ "and %d already resolved",
+ n_resolved),
+ n_resolved);
+}
+
+svn_error_t *
+svn_cl__print_conflict_stats(svn_cl__conflict_stats_t *conflict_stats,
+ apr_pool_t *scratch_pool)
+{
+ int n_text = apr_hash_count(conflict_stats->text_conflicts);
+ int n_prop = apr_hash_count(conflict_stats->prop_conflicts);
+ int n_tree = apr_hash_count(conflict_stats->tree_conflicts);
+ int n_text_r = conflict_stats->text_conflicts_resolved;
+ int n_prop_r = conflict_stats->prop_conflicts_resolved;
+ int n_tree_r = conflict_stats->tree_conflicts_resolved;
+
+ if (n_text > 0 || n_text_r > 0
+ || n_prop > 0 || n_prop_r > 0
+ || n_tree > 0 || n_tree_r > 0
+ || conflict_stats->skipped_paths > 0)
SVN_ERR(svn_cmdline_printf(scratch_pool,
_("Summary of conflicts:\n")));
- if (nb->text_conflicts > 0)
- SVN_ERR(svn_cmdline_printf(scratch_pool,
- _(" Text conflicts: %d\n"),
- nb->text_conflicts));
- if (nb->prop_conflicts > 0)
- SVN_ERR(svn_cmdline_printf(scratch_pool,
- _(" Property conflicts: %d\n"),
- nb->prop_conflicts));
- if (nb->tree_conflicts > 0)
- SVN_ERR(svn_cmdline_printf(scratch_pool,
- _(" Tree conflicts: %d\n"),
- nb->tree_conflicts));
- if (nb->skipped_paths > 0)
+ if (n_text_r == 0 && n_prop_r == 0 && n_tree_r == 0)
+ {
+ if (n_text > 0)
+ SVN_ERR(svn_cmdline_printf(scratch_pool,
+ _(" Text conflicts: %d\n"),
+ n_text));
+ if (n_prop > 0)
+ SVN_ERR(svn_cmdline_printf(scratch_pool,
+ _(" Property conflicts: %d\n"),
+ n_prop));
+ if (n_tree > 0)
+ SVN_ERR(svn_cmdline_printf(scratch_pool,
+ _(" Tree conflicts: %d\n"),
+ n_tree));
+ }
+ else
+ {
+ if (n_text > 0 || n_text_r > 0)
+ SVN_ERR(svn_cmdline_printf(scratch_pool,
+ _(" Text conflicts: %s (%s)\n"),
+ remaining_str(scratch_pool, n_text),
+ resolved_str(scratch_pool, n_text_r)));
+ if (n_prop > 0 || n_prop_r > 0)
+ SVN_ERR(svn_cmdline_printf(scratch_pool,
+ _(" Property conflicts: %s (%s)\n"),
+ remaining_str(scratch_pool, n_prop),
+ resolved_str(scratch_pool, n_prop_r)));
+ if (n_tree > 0 || n_tree_r > 0)
+ SVN_ERR(svn_cmdline_printf(scratch_pool,
+ _(" Tree conflicts: %s (%s)\n"),
+ remaining_str(scratch_pool, n_tree),
+ resolved_str(scratch_pool, n_tree_r)));
+ }
+ if (conflict_stats->skipped_paths > 0)
SVN_ERR(svn_cmdline_printf(scratch_pool,
_(" Skipped paths: %d\n"),
- nb->skipped_paths));
+ conflict_stats->skipped_paths));
+
+ return SVN_NO_ERROR;
+}
+svn_error_t *
+svn_cl__notifier_print_conflict_stats(void *baton, apr_pool_t *scratch_pool)
+{
+ struct notify_baton *nb = baton;
+
+ SVN_ERR(svn_cl__print_conflict_stats(nb->conflict_stats, scratch_pool));
return SVN_NO_ERROR;
}
@@ -131,7 +237,7 @@ notify(void *baton, const svn_wc_notify_
switch (n->action)
{
case svn_wc_notify_skip:
- nb->skipped_paths++;
+ nb->conflict_stats->skipped_paths++;
if (n->content_state == svn_wc_notify_state_missing)
{
if ((err = svn_cmdline_printf
@@ -154,28 +260,28 @@ notify(void *baton, const svn_wc_notify_
}
break;
case svn_wc_notify_update_skip_obstruction:
- nb->skipped_paths++;
+ nb->conflict_stats->skipped_paths++;
if ((err = svn_cmdline_printf(
pool, _("Skipped '%s' -- An obstructing working copy was found\n"),
path_local)))
goto print_error;
break;
case svn_wc_notify_update_skip_working_only:
- nb->skipped_paths++;
+ nb->conflict_stats->skipped_paths++;
if ((err = svn_cmdline_printf(
pool, _("Skipped '%s' -- Has no versioned parent\n"),
path_local)))
goto print_error;
break;
case svn_wc_notify_update_skip_access_denied:
- nb->skipped_paths++;
+ nb->conflict_stats->skipped_paths++;
if ((err = svn_cmdline_printf(
pool, _("Skipped '%s' -- Access denied\n"),
path_local)))
goto print_error;
break;
case svn_wc_notify_skip_conflicted:
- nb->skipped_paths++;
+ nb->conflict_stats->skipped_paths++;
if ((err = svn_cmdline_printf(
pool, _("Skipped '%s' -- Node remains in conflict\n"),
path_local)))
@@ -224,7 +330,7 @@ notify(void *baton, const svn_wc_notify_
nb->received_some_change = TRUE;
if (n->content_state == svn_wc_notify_state_conflicted)
{
- nb->text_conflicts++;
+ store_path(nb, nb->conflict_stats->text_conflicts, path_local);
if ((err = svn_cmdline_printf(pool, "C %s\n", path_local)))
goto print_error;
}
@@ -239,7 +345,7 @@ notify(void *baton, const svn_wc_notify_
nb->received_some_change = TRUE;
if (n->content_state == svn_wc_notify_state_conflicted)
{
- nb->text_conflicts++;
+ store_path(nb, nb->conflict_stats->text_conflicts, path_local);
statchar_buf[0] = 'C';
}
else
@@ -247,7 +353,7 @@ notify(void *baton, const svn_wc_notify_
if (n->prop_state == svn_wc_notify_state_conflicted)
{
- nb->prop_conflicts++;
+ store_path(nb, nb->conflict_stats->prop_conflicts, path_local);
statchar_buf[1] = 'C';
}
else if (n->prop_state == svn_wc_notify_state_merged)
@@ -313,7 +419,7 @@ notify(void *baton, const svn_wc_notify_
nb->received_some_change = TRUE;
if (n->content_state == svn_wc_notify_state_conflicted)
{
- nb->text_conflicts++;
+ store_path(nb, nb->conflict_stats->text_conflicts, path_local);
statchar_buf[0] = 'C';
}
else if (n->kind == svn_node_file)
@@ -326,7 +432,7 @@ notify(void *baton, const svn_wc_notify_
if (n->prop_state == svn_wc_notify_state_conflicted)
{
- nb->prop_conflicts++;
+ store_path(nb, nb->conflict_stats->prop_conflicts, path_local);
statchar_buf[1] = 'C';
}
else if (n->prop_state == svn_wc_notify_state_changed)
@@ -525,7 +631,7 @@ notify(void *baton, const svn_wc_notify_
{
if (n->content_state == svn_wc_notify_state_conflicted)
{
- nb->text_conflicts++;
+ store_path(nb, nb->conflict_stats->text_conflicts, path_local);
statchar_buf[0] = 'C';
}
else if (n->kind == svn_node_file)
@@ -538,7 +644,7 @@ notify(void *baton, const svn_wc_notify_
if (n->prop_state == svn_wc_notify_state_conflicted)
{
- nb->prop_conflicts++;
+ store_path(nb, nb->conflict_stats->prop_conflicts, path_local);
statchar_buf[1] = 'C';
}
else if (n->prop_state == svn_wc_notify_state_merged)
@@ -915,7 +1021,7 @@ notify(void *baton, const svn_wc_notify_
break;
case svn_wc_notify_tree_conflict:
- nb->tree_conflicts++;
+ store_path(nb, nb->conflict_stats->tree_conflicts, path_local);
if ((err = svn_cmdline_printf(pool, " C %s\n", path_local)))
goto print_error;
break;
@@ -940,50 +1046,50 @@ notify(void *baton, const svn_wc_notify_
case svn_wc_notify_property_modified:
case svn_wc_notify_property_added:
- err = svn_cmdline_printf(pool,
- _("property '%s' set on '%s'\n"),
- n->prop_name, path_local);
- if (err)
- goto print_error;
+ err = svn_cmdline_printf(pool,
+ _("property '%s' set on '%s'\n"),
+ n->prop_name, path_local);
+ if (err)
+ goto print_error;
break;
case svn_wc_notify_property_deleted:
- err = svn_cmdline_printf(pool,
- _("property '%s' deleted from '%s'.\n"),
- n->prop_name, path_local);
- if (err)
- goto print_error;
+ err = svn_cmdline_printf(pool,
+ _("property '%s' deleted from '%s'.\n"),
+ n->prop_name, path_local);
+ if (err)
+ goto print_error;
break;
case svn_wc_notify_property_deleted_nonexistent:
- err = svn_cmdline_printf(pool,
- _("Attempting to delete nonexistent "
- "property '%s' on '%s'\n"), n->prop_name,
- path_local);
- if (err)
- goto print_error;
+ err = svn_cmdline_printf(pool,
+ _("Attempting to delete nonexistent "
+ "property '%s' on '%s'\n"), n->prop_name,
+ path_local);
+ if (err)
+ goto print_error;
break;
case svn_wc_notify_revprop_set:
- err = svn_cmdline_printf(pool,
- _("property '%s' set on repository revision %ld\n"),
- n->prop_name, n->revision);
+ err = svn_cmdline_printf(pool,
+ _("property '%s' set on repository revision %ld\n"),
+ n->prop_name, n->revision);
if (err)
goto print_error;
break;
case svn_wc_notify_revprop_deleted:
- err = svn_cmdline_printf(pool,
+ err = svn_cmdline_printf(pool,
_("property '%s' deleted from repository revision %ld\n"),
n->prop_name, n->revision);
- if (err)
- goto print_error;
+ if (err)
+ goto print_error;
break;
case svn_wc_notify_upgraded_path:
- err = svn_cmdline_printf(pool, _("Upgraded '%s'\n"), path_local);
- if (err)
- goto print_error;
+ err = svn_cmdline_printf(pool, _("Upgraded '%s'\n"), path_local);
+ if (err)
+ goto print_error;
break;
case svn_wc_notify_url_redirect:
@@ -994,8 +1100,9 @@ notify(void *baton, const svn_wc_notify_
break;
case svn_wc_notify_path_nonexistent:
- err = svn_cmdline_printf(pool, _("'%s' is not under version control"),
- path_local);
+ err = svn_cmdline_printf(pool, "%s\n",
+ apr_psprintf(pool, _("'%s' is not under version control"),
+ path_local));
if (err)
goto print_error;
break;
@@ -1011,17 +1118,20 @@ notify(void *baton, const svn_wc_notify_
case svn_wc_notify_foreign_copy_begin:
if (n->merge_range == NULL)
- err = svn_cmdline_printf(pool,
- _("--- Copying from foreign repository URL '%s':\n"),
- n->url);
- if (err)
- goto print_error;
+ {
+ err = svn_cmdline_printf(
+ pool,
+ _("--- Copying from foreign repository URL '%s':\n"),
+ n->url);
+ if (err)
+ goto print_error;
+ }
break;
case svn_wc_notify_move_broken:
- err = svn_cmdline_printf(pool,
- _("Breaking move with source path '%s'\n"),
- path_local);
+ err = svn_cmdline_printf(pool,
+ _("Breaking move with source path '%s'\n"),
+ path_local);
if (err)
goto print_error;
break;
@@ -1059,6 +1169,7 @@ notify(void *baton, const svn_wc_notify_
svn_error_t *
svn_cl__get_notifier(svn_wc_notify_func2_t *notify_func_p,
void **notify_baton_p,
+ svn_cl__conflict_stats_t *conflict_stats,
apr_pool_t *pool)
{
struct notify_baton *nb = apr_pcalloc(pool, sizeof(*nb));
@@ -1070,10 +1181,7 @@ svn_cl__get_notifier(svn_wc_notify_func2
nb->is_wc_to_repos_copy = FALSE;
nb->in_external = FALSE;
nb->had_print_error = FALSE;
- nb->text_conflicts = 0;
- nb->prop_conflicts = 0;
- nb->tree_conflicts = 0;
- nb->skipped_paths = 0;
+ nb->conflict_stats = conflict_stats;
SVN_ERR(svn_dirent_get_absolute(&nb->path_prefix, "", pool));
*notify_func_p = notify;
Modified: subversion/branches/master-passphrase/subversion/svn/propedit-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/master-passphrase/subversion/svn/propedit-cmd.c?rev=1481041&r1=1481040&r2=1481041&view=diff
==============================================================================
--- subversion/branches/master-passphrase/subversion/svn/propedit-cmd.c (original)
+++ subversion/branches/master-passphrase/subversion/svn/propedit-cmd.c Fri May 10 14:58:47 2013
@@ -27,6 +27,7 @@
/*** Includes. ***/
+#include "svn_hash.h"
#include "svn_cmdline.h"
#include "svn_wc.h"
#include "svn_pools.h"
@@ -86,7 +87,8 @@ svn_cl__propedit(apr_getopt_t *os,
_("'%s' is not a valid Subversion property name"),
pname_utf8);
if (!opt_state->force)
- SVN_ERR(svn_cl__check_svn_prop_name(pname_utf8, opt_state->revprop, pool));
+ SVN_ERR(svn_cl__check_svn_prop_name(pname_utf8, opt_state->revprop,
+ svn_cl__prop_use_edit, pool));
if (opt_state->encoding && !svn_prop_needs_translation(pname_utf8))
return svn_error_create
@@ -239,7 +241,7 @@ svn_cl__propedit(apr_getopt_t *os,
NULL, ctx, subpool, subpool));
/* Get the property value. */
- propval = apr_hash_get(props, abspath_or_url, APR_HASH_KEY_STRING);
+ propval = svn_hash_gets(props, abspath_or_url);
if (! propval)
propval = svn_string_create_empty(subpool);
Modified: subversion/branches/master-passphrase/subversion/svn/propget-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/master-passphrase/subversion/svn/propget-cmd.c?rev=1481041&r1=1481040&r2=1481041&view=diff
==============================================================================
--- subversion/branches/master-passphrase/subversion/svn/propget-cmd.c (original)
+++ subversion/branches/master-passphrase/subversion/svn/propget-cmd.c Fri May 10 14:58:47 2013
@@ -27,6 +27,7 @@
/*** Includes. ***/
+#include "svn_hash.h"
#include "svn_cmdline.h"
#include "svn_pools.h"
#include "svn_client.h"
@@ -209,7 +210,7 @@ print_single_prop(svn_string_t *propval,
/* Print the property name and value just as "proplist -v" does */
apr_hash_t *hash = apr_hash_make(scratch_pool);
- apr_hash_set(hash, pname_utf8, APR_HASH_KEY_STRING, propval);
+ svn_hash_sets(hash, pname_utf8, propval);
SVN_ERR(svn_cmdline__print_prop_hash(out, hash, FALSE, scratch_pool));
}
else
Modified: subversion/branches/master-passphrase/subversion/svn/props.c
URL: http://svn.apache.org/viewvc/subversion/branches/master-passphrase/subversion/svn/props.c?rev=1481041&r1=1481040&r2=1481041&view=diff
==============================================================================
--- subversion/branches/master-passphrase/subversion/svn/props.c (original)
+++ subversion/branches/master-passphrase/subversion/svn/props.c Fri May 10 14:58:47 2013
@@ -30,6 +30,7 @@
#include <stdlib.h>
#include <apr_hash.h>
+#include "svn_hash.h"
#include "svn_cmdline.h"
#include "svn_string.h"
#include "svn_error.h"
@@ -163,8 +164,64 @@ simprop_compare(const void *pkeya, const
: (keya->diff < keyb->diff ? -1 : 0))));
}
+
+static const char*
+force_prop_option_message(svn_cl__prop_use_t prop_use, const char *prop_name,
+ apr_pool_t *scratch_pool)
+{
+ switch (prop_use)
+ {
+ case svn_cl__prop_use_set:
+ return apr_psprintf(
+ scratch_pool,
+ _("(To set the '%s' property, re-run with '--force'.)"),
+ prop_name);
+ case svn_cl__prop_use_edit:
+ return apr_psprintf(
+ scratch_pool,
+ _("(To edit the '%s' property, re-run with '--force'.)"),
+ prop_name);
+ case svn_cl__prop_use_use:
+ default:
+ return apr_psprintf(
+ scratch_pool,
+ _("(To use the '%s' property, re-run with '--force'.)"),
+ prop_name);
+ }
+}
+
+static const char*
+wrong_prop_error_message(svn_cl__prop_use_t prop_use, const char *prop_name,
+ apr_pool_t *scratch_pool)
+{
+ switch (prop_use)
+ {
+ case svn_cl__prop_use_set:
+ return apr_psprintf(
+ scratch_pool,
+ _("'%s' is not a valid %s property name;"
+ " re-run with '--force' to set it"),
+ prop_name, SVN_PROP_PREFIX);
+ case svn_cl__prop_use_edit:
+ return apr_psprintf(
+ scratch_pool,
+ _("'%s' is not a valid %s property name;"
+ " re-run with '--force' to edit it"),
+ prop_name, SVN_PROP_PREFIX);
+ case svn_cl__prop_use_use:
+ default:
+ return apr_psprintf(
+ scratch_pool,
+ _("'%s' is not a valid %s property name;"
+ " re-run with '--force' to use it"),
+ prop_name, SVN_PROP_PREFIX);
+ }
+}
+
svn_error_t *
-svn_cl__check_svn_prop_name(const char *propname, svn_boolean_t revprop,
+svn_cl__check_svn_prop_name(const char *propname,
+ svn_boolean_t revprop,
+ svn_cl__prop_use_t prop_use,
apr_pool_t *scratch_pool)
{
static const char *const nodeprops[] =
@@ -221,9 +278,10 @@ svn_cl__check_svn_prop_name(const char *
if (0 == strcmp(proplist[i] + prefix.len, propname + prefix.len))
return svn_error_createf(
SVN_ERR_CLIENT_PROPERTY_NAME, NULL,
- _("'%s' is not a valid %s property name; did you mean '%s'?"
- "\n(To set the '%s' property, re-run with '--force'.)"),
- propname, SVN_PROP_PREFIX, proplist[i], propname);
+ _("'%s' is not a valid %s property name;"
+ " did you mean '%s'?\n%s"),
+ propname, SVN_PROP_PREFIX, proplist[i],
+ force_prop_option_message(prop_use, propname, scratch_pool));
}
return SVN_NO_ERROR;
}
@@ -263,39 +321,36 @@ svn_cl__check_svn_prop_name(const char *
{
case 0:
/* The best alternative isn't good enough */
- return svn_error_createf(
+ return svn_error_create(
SVN_ERR_CLIENT_PROPERTY_NAME, NULL,
- _("'%s' is not a valid %s property name;"
- " re-run with '--force' to set it"),
- propname, SVN_PROP_PREFIX);
+ wrong_prop_error_message(prop_use, propname, scratch_pool));
case 1:
/* There is only one good candidate */
return svn_error_createf(
SVN_ERR_CLIENT_PROPERTY_NAME, NULL,
- _("'%s' is not a valid %s property name; did you mean '%s'?\n"
- "(To set the '%s' property, re-run with '--force'.)"),
- propname, SVN_PROP_PREFIX, propkeys[0]->propname, propname);
+ _("'%s' is not a valid %s property name; did you mean '%s'?\n%s"),
+ propname, SVN_PROP_PREFIX, propkeys[0]->propname,
+ force_prop_option_message(prop_use, propname, scratch_pool));
case 2:
/* Suggest a list of the most likely candidates */
return svn_error_createf(
SVN_ERR_CLIENT_PROPERTY_NAME, NULL,
_("'%s' is not a valid %s property name\n"
- "Did you mean '%s' or '%s'?\n"
- "(To set the '%s' property, re-run with '--force'.)"),
+ "Did you mean '%s' or '%s'?\n%s"),
propname, SVN_PROP_PREFIX,
- propkeys[0]->propname, propkeys[1]->propname, propname);
+ propkeys[0]->propname, propkeys[1]->propname,
+ force_prop_option_message(prop_use, propname, scratch_pool));
default:
/* Never suggest more than three candidates */
return svn_error_createf(
SVN_ERR_CLIENT_PROPERTY_NAME, NULL,
_("'%s' is not a valid %s property name\n"
- "Did you mean '%s', '%s' or '%s'?\n"
- "(To set the '%s' property, re-run with '--force'.)"),
+ "Did you mean '%s', '%s' or '%s'?\n%s"),
propname, SVN_PROP_PREFIX,
propkeys[0]->propname, propkeys[1]->propname, propkeys[2]->propname,
- propname);
+ force_prop_option_message(prop_use, propname, scratch_pool));
}
}
Modified: subversion/branches/master-passphrase/subversion/svn/propset-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/master-passphrase/subversion/svn/propset-cmd.c?rev=1481041&r1=1481040&r2=1481041&view=diff
==============================================================================
--- subversion/branches/master-passphrase/subversion/svn/propset-cmd.c (original)
+++ subversion/branches/master-passphrase/subversion/svn/propset-cmd.c Fri May 10 14:58:47 2013
@@ -69,7 +69,7 @@ svn_cl__propset(apr_getopt_t *os,
pname_utf8);
if (!opt_state->force)
SVN_ERR(svn_cl__check_svn_prop_name(pname_utf8, opt_state->revprop,
- scratch_pool));
+ svn_cl__prop_use_set, scratch_pool));
/* Get the PROPVAL from either an external file, or from the command
line. */
Modified: subversion/branches/master-passphrase/subversion/svn/resolve-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/master-passphrase/subversion/svn/resolve-cmd.c?rev=1481041&r1=1481040&r2=1481041&view=diff
==============================================================================
--- subversion/branches/master-passphrase/subversion/svn/resolve-cmd.c (original)
+++ subversion/branches/master-passphrase/subversion/svn/resolve-cmd.c Fri May 10 14:58:47 2013
@@ -52,9 +52,6 @@ svn_cl__resolve(apr_getopt_t *os,
int i;
apr_pool_t *iterpool;
svn_boolean_t had_error = FALSE;
- svn_wc_conflict_resolver_func2_t conflict_func2;
- void *conflict_baton2;
- svn_cl__interactive_conflict_baton_t *b;
switch (opt_state->accept_which)
{
@@ -106,21 +103,6 @@ svn_cl__resolve(apr_getopt_t *os,
SVN_ERR(svn_cl__check_targets_are_local_paths(targets));
- /* Store old state */
- conflict_func2 = ctx->conflict_func2;
- conflict_baton2 = ctx->conflict_baton2;
-
- /* This subcommand always uses the interactive resolver function. */
- ctx->conflict_func2 = svn_cl__conflict_func_interactive;
- SVN_ERR(svn_cl__get_conflict_func_interactive_baton(&b,
- opt_state->accept_which,
- ctx->config,
- opt_state->editor_cmd,
- ctx->cancel_func,
- ctx->cancel_baton,
- scratch_pool));
- ctx->conflict_baton2 = b;
-
iterpool = svn_pool_create(scratch_pool);
for (i = 0; i < targets->nelts; i++)
{
@@ -140,10 +122,6 @@ svn_cl__resolve(apr_getopt_t *os,
}
svn_pool_destroy(iterpool);
- /* Restore state */
- ctx->conflict_func2 = conflict_func2;
- ctx->conflict_baton2 = conflict_baton2;
-
if (had_error)
return svn_error_create(SVN_ERR_CL_ERROR_PROCESSING_EXTERNALS, NULL,
_("Failure occurred resolving one or more "
Modified: subversion/branches/master-passphrase/subversion/svn/schema/info.rnc
URL: http://svn.apache.org/viewvc/subversion/branches/master-passphrase/subversion/svn/schema/info.rnc?rev=1481041&r1=1481040&r2=1481041&view=diff
==============================================================================
--- subversion/branches/master-passphrase/subversion/svn/schema/info.rnc (original)
+++ subversion/branches/master-passphrase/subversion/svn/schema/info.rnc Fri May 10 14:58:47 2013
@@ -127,7 +127,8 @@ attlist.tree-conflict &=
## Operation causing the tree conflict.
attribute operation { "update" | "merge" | "switch" },
## Operation's action on the victim.
- attribute action { "edit" | "add" | "delete" },
+ attribute action { "edit" | "add" | "delete" | "replace" },
## Local reason for the conflict.
attribute reason { "edit" | "obstruction" | "delete" | "add" |
- "missing" | "unversioned" }
+ "missing" | "unversioned" | "replace" |
+ "moved-away" | "moved-here" }
Modified: subversion/branches/master-passphrase/subversion/svn/status-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/master-passphrase/subversion/svn/status-cmd.c?rev=1481041&r1=1481040&r2=1481041&view=diff
==============================================================================
--- subversion/branches/master-passphrase/subversion/svn/status-cmd.c (original)
+++ subversion/branches/master-passphrase/subversion/svn/status-cmd.c Fri May 10 14:58:47 2013
@@ -27,6 +27,7 @@
/*** Includes. ***/
+#include "svn_hash.h"
#include "svn_string.h"
#include "svn_wc.h"
#include "svn_client.h"
@@ -241,13 +242,12 @@ print_status(void *baton,
scache->status = svn_client_status_dup(status, sb->cl_pool);
path_array =
- apr_hash_get(sb->cached_changelists, cl_key, APR_HASH_KEY_STRING);
+ svn_hash_gets(sb->cached_changelists, cl_key);
if (path_array == NULL)
{
path_array = apr_array_make(sb->cl_pool, 1,
sizeof(struct status_cache *));
- apr_hash_set(sb->cached_changelists, cl_key,
- APR_HASH_KEY_STRING, path_array);
+ svn_hash_sets(sb->cached_changelists, cl_key, path_array);
}
APR_ARRAY_PUSH(path_array, struct status_cache *) = scache;
Modified: subversion/branches/master-passphrase/subversion/svn/status.c
URL: http://svn.apache.org/viewvc/subversion/branches/master-passphrase/subversion/svn/status.c?rev=1481041&r1=1481040&r2=1481041&view=diff
==============================================================================
--- subversion/branches/master-passphrase/subversion/svn/status.c (original)
+++ subversion/branches/master-passphrase/subversion/svn/status.c Fri May 10 14:58:47 2013
@@ -26,6 +26,7 @@
/*** Includes. ***/
+#include "svn_hash.h"
#include "svn_cmdline.h"
#include "svn_wc.h"
#include "svn_dirent_uri.h"
@@ -471,28 +472,27 @@ svn_cl__print_status_xml(const char *cwd
"path", svn_dirent_local_style(path, pool), NULL);
att_hash = apr_hash_make(pool);
- apr_hash_set(att_hash, "item", APR_HASH_KEY_STRING,
- generate_status_desc(combined_status(status)));
+ svn_hash_sets(att_hash, "item",
+ generate_status_desc(combined_status(status)));
- apr_hash_set(att_hash, "props", APR_HASH_KEY_STRING,
- generate_status_desc(
- (status->node_status != svn_wc_status_deleted)
- ? status->prop_status
- : svn_wc_status_none));
+ svn_hash_sets(att_hash, "props",
+ generate_status_desc(
+ (status->node_status != svn_wc_status_deleted)
+ ? status->prop_status
+ : svn_wc_status_none));
if (status->wc_is_locked)
- apr_hash_set(att_hash, "wc-locked", APR_HASH_KEY_STRING, "true");
+ svn_hash_sets(att_hash, "wc-locked", "true");
if (status->copied)
- apr_hash_set(att_hash, "copied", APR_HASH_KEY_STRING, "true");
+ svn_hash_sets(att_hash, "copied", "true");
if (status->switched)
- apr_hash_set(att_hash, "switched", APR_HASH_KEY_STRING, "true");
+ svn_hash_sets(att_hash, "switched", "true");
if (status->file_external)
- apr_hash_set(att_hash, "file-external", APR_HASH_KEY_STRING, "true");
+ svn_hash_sets(att_hash, "file-external", "true");
if (status->versioned && ! status->copied)
- apr_hash_set(att_hash, "revision", APR_HASH_KEY_STRING,
- apr_psprintf(pool, "%ld", status->revision));
+ svn_hash_sets(att_hash, "revision",
+ apr_psprintf(pool, "%ld", status->revision));
if (tree_conflicted)
- apr_hash_set(att_hash, "tree-conflicted", APR_HASH_KEY_STRING,
- "true");
+ svn_hash_sets(att_hash, "tree-conflicted", "true");
if (status->moved_from_abspath || status->moved_to_abspath)
{
const char *relpath;
@@ -502,14 +502,14 @@ svn_cl__print_status_xml(const char *cwd
relpath = make_relpath(cwd_abspath, status->moved_from_abspath,
pool, pool);
relpath = svn_dirent_local_style(relpath, pool);
- apr_hash_set(att_hash, "moved-from", APR_HASH_KEY_STRING, relpath);
+ svn_hash_sets(att_hash, "moved-from", relpath);
}
if (status->moved_to_abspath)
{
relpath = make_relpath(cwd_abspath, status->moved_to_abspath,
pool, pool);
relpath = svn_dirent_local_style(relpath, pool);
- apr_hash_set(att_hash, "moved-to", APR_HASH_KEY_STRING, relpath);
+ svn_hash_sets(att_hash, "moved-to", relpath);
}
}
svn_xml_make_open_tag_hash(&sb, pool, svn_xml_normal, "wc-status",
Modified: subversion/branches/master-passphrase/subversion/svn/svn.c
URL: http://svn.apache.org/viewvc/subversion/branches/master-passphrase/subversion/svn/svn.c?rev=1481041&r1=1481040&r2=1481041&view=diff
==============================================================================
--- subversion/branches/master-passphrase/subversion/svn/svn.c (original)
+++ subversion/branches/master-passphrase/subversion/svn/svn.c Fri May 10 14:58:47 2013
@@ -647,7 +647,7 @@ const svn_opt_subcommand_desc2_t svn_cl_
" If locked, the letter 'O'. (Use 'svn info URL' to see details)\n"
" Size (in bytes)\n"
" Date and time of the last commit\n"),
- {'r', 'v', 'R', opt_depth, opt_incremental, opt_xml,
+ {'r', 'v', 'R', opt_depth, opt_incremental, opt_xml,
opt_include_externals },
{{opt_include_externals, N_("include externals definitions")}} },
@@ -781,8 +781,24 @@ const svn_opt_subcommand_desc2_t svn_cl_
" used, and the default value of 'REV' is the base revision (usually the\n"
" revision last updated to).\n"
"\n"
-" TARGET_WCPATH is a working copy path; if omitted, '.' is assumed. In\n"
-" normal usage the working copy should be up to date, at a single\n"
+" TARGET_WCPATH is a working copy path; if omitted, '.' is generally\n"
+" assumed. There are some special cases:\n"
+"\n"
+" - If SOURCE is a URL:\n"
+"\n"
+" - If the basename of the URL and the basename of '.' are the\n"
+" same, then the differences are applied to '.'. Otherwise,\n"
+" if a file with the same basename as that of the URL is found\n"
+" within '.', then the differences are applied to that file.\n"
+" In all other cases, the target defaults to '.'.\n"
+"\n"
+" - If SOURCE is a working copy path:\n"
+"\n"
+" - If the source is a file, then differences are applied to that\n"
+" file (useful for reverse-merging earlier changes). Otherwise,\n"
+" if the source is a directory, then the target defaults to '.'.\n"
+"\n"
+" In normal usage the working copy should be up to date, at a single\n"
" revision, with no local modifications and no switched subtrees.\n"
"\n"
" - The 'Feature Branch' Merging Pattern -\n"
@@ -883,7 +899,9 @@ const svn_opt_subcommand_desc2_t svn_cl_
" path, the corresponding URL of the path is used, and the default value\n"
" of 'REV' is the base revision (usually the revision last updated to).\n"
"\n"
-" TARGET_WCPATH is a working copy path; if omitted, '.' is assumed.\n"
+" TARGET_WCPATH is a working copy path; if omitted, '.' is generally\n"
+" assumed. The special cases noted above in the 'automatic' merge form\n"
+" also apply here.\n"
"\n"
" The revision ranges to be merged are specified by the '-r' and/or '-c'\n"
" options. '-r N:M' refers to the difference in the history of the\n"
@@ -900,7 +918,7 @@ const svn_opt_subcommand_desc2_t svn_cl_
" source and target refer to the same branch, a previously committed\n"
" revision can be 'undone'. In a reverse range, N is greater than M in\n"
" '-r N:M', or the '-c' option is used with a negative number: '-c -M'\n"
-" is equivalent to '-r M:<M-1>' Undoing changes like this is also known\n"
+" is equivalent to '-r M:<M-1>'. Undoing changes like this is also known\n"
" as performing a 'reverse merge'.\n"
"\n"
" Multiple '-c' and/or '-r' options may be specified and mixing of\n"
@@ -952,11 +970,9 @@ const svn_opt_subcommand_desc2_t svn_cl_
" branch may be the same as one or both sources, or different again.\n"
" The three branches involved can be completely unrelated.\n"
"\n"
-" If TARGET_WCPATH is omitted, a default value of '.' is assumed.\n"
-" However, in the special case where both sources refer to a file node\n"
-" with the same name and a file with the same name is also found within\n"
-" '.', the differences will be applied to that local file. The source\n"
-" revisions REV1 and REV2 default to HEAD if omitted.\n"
+" TARGET_WCPATH is a working copy path; if omitted, '.' is generally\n"
+" assumed. The special cases noted above in the 'automatic' merge form\n"
+" also apply here.\n"
"\n"
" SOURCE1 and/or SOURCE2 can also be specified as a working copy path,\n"
" in which case the merge source URL is derived from the working copy.\n"
@@ -1130,7 +1146,7 @@ const svn_opt_subcommand_desc2_t svn_cl_
" The --allow-mixed-revisions option is provided for backward compatibility.\n"
"\n"
" The --revision option has no use and is deprecated.\n"),
- {'r', 'q', opt_force, opt_parents, opt_allow_mixed_revisions,
+ {'r', 'q', opt_force, opt_parents, opt_allow_mixed_revisions,
SVN_CL__LOG_MSG_OPTIONS} },
{ "patch", svn_cl__patch, {0}, N_
@@ -1258,13 +1274,32 @@ const svn_opt_subcommand_desc2_t svn_cl_
" Property names starting with 'svn:' are reserved. Subversion recognizes\n"
" the following special versioned properties on a file:\n"
" svn:keywords - Keywords to be expanded. Valid keywords are:\n"
- " URL, HeadURL - The URL for the head version of the object.\n"
+ " URL, HeadURL - The URL for the head version of the file.\n"
" Author, LastChangedBy - The last person to modify the file.\n"
- " Date, LastChangedDate - The date/time the object was last modified.\n"
- " Rev, Revision, - The last revision the object changed.\n"
+ " Date, LastChangedDate - The date/time the file was last modified.\n"
+ " Rev, Revision, - The last revision the file changed.\n"
" LastChangedRevision\n"
" Id - A compressed summary of the previous four.\n"
" Header - Similar to Id but includes the full URL.\n"
+ "\n"
+ " Custom keywords can be defined with a format string separated from\n"
+ " the keyword name with '='. Valid format substitutions are:\n"
+ " %a - The author of the revision given by %r.\n"
+ " %b - The basename of the URL of the file.\n"
+ " %d - Short format of the date of the revision given by %r.\n"
+ " %D - Long format of the date of the revision given by %r.\n"
+ " %P - The file's path, relative to the repository root.\n"
+ " %r - The number of the revision which last changed the file.\n"
+ " %R - The URL to the root of the repository.\n"
+ " %u - The URL of the file.\n"
+ " %_ - A space (keyword definitions cannot contain a literal space).\n"
+ " %% - A literal '%'.\n"
+ " %H - Equivalent to %P%_%r%_%d%_%a.\n"
+ " %I - Equivalent to %b%_%r%_%d%_%a.\n"
+ " Example custom keyword definition: MyKeyword=%r%_%a%_%P\n"
+ " Once a custom keyword has been defined for a file, it can be used\n"
+ " within the file like any other keyword: $MyKeyword$\n"
+ "\n"
" svn:executable - If present, make the file executable. Use\n"
" 'svn propdel svn:executable PATH...' to clear.\n"
" svn:eol-style - One of 'native', 'LF', 'CR', 'CRLF'.\n"
@@ -1687,14 +1722,17 @@ sub_main(int argc, const char *argv[], a
apr_array_header_t *received_opts;
int i;
const svn_opt_subcommand_desc2_t *subcommand = NULL;
- const char *dash_m_arg = NULL, *dash_F_arg = NULL;
+ const char *dash_F_arg = NULL;
svn_cl__cmd_baton_t command_baton;
svn_auth_baton_t *ab;
svn_config_t *cfg_config;
svn_boolean_t descend = TRUE;
svn_boolean_t interactive_conflicts = FALSE;
svn_boolean_t force_interactive = FALSE;
+ svn_cl__conflict_stats_t *conflict_stats
+ = svn_cl__conflict_stats_create(pool);
svn_boolean_t use_notifier = TRUE;
+ svn_boolean_t reading_file_from_stdin = FALSE;
apr_hash_t *changelists;
apr_hash_t *cfg_hash;
@@ -1730,7 +1768,7 @@ sub_main(int argc, const char *argv[], a
/* No args? Show usage. */
if (argc <= 1)
{
- svn_cl__help(NULL, NULL, pool);
+ SVN_INT_ERR(svn_cl__help(NULL, NULL, pool));
return EXIT_FAILURE;
}
@@ -1750,7 +1788,7 @@ sub_main(int argc, const char *argv[], a
break;
else if (apr_err)
{
- svn_cl__help(NULL, NULL, pool);
+ SVN_INT_ERR(svn_cl__help(NULL, NULL, pool));
return EXIT_FAILURE;
}
@@ -1760,7 +1798,8 @@ sub_main(int argc, const char *argv[], a
switch (opt_id) {
case 'l':
{
- err = svn_cstring_atoi(&opt_state.limit, opt_arg);
+ SVN_INT_ERR(svn_utf_cstring_to_utf8(&utf8_opt_arg, opt_arg, pool));
+ err = svn_cstring_atoi(&opt_state.limit, utf8_opt_arg);
if (err)
{
err = svn_error_create(SVN_ERR_CL_ARG_PARSING_ERROR, err,
@@ -1776,16 +1815,17 @@ sub_main(int argc, const char *argv[], a
}
break;
case 'm':
- /* Note that there's no way here to detect if the log message
- contains a zero byte -- if it does, then opt_arg will just
- be shorter than the user intended. Oh well. */
+ /* We store the raw message here. We will convert it to UTF-8
+ * later, according to the value of the '--encoding' option. */
opt_state.message = apr_pstrdup(pool, opt_arg);
- dash_m_arg = opt_arg;
break;
case 'c':
{
- apr_array_header_t *change_revs =
- svn_cstring_split(opt_arg, ", \n\r\t\v", TRUE, pool);
+ apr_array_header_t *change_revs;
+
+ SVN_INT_ERR(svn_utf_cstring_to_utf8(&utf8_opt_arg, opt_arg, pool));
+ change_revs = svn_cstring_split(utf8_opt_arg, ", \n\r\t\v", TRUE,
+ pool);
if (opt_state.old_target)
{
@@ -1880,10 +1920,10 @@ sub_main(int argc, const char *argv[], a
break;
case 'r':
opt_state.used_revision_arg = TRUE;
+ SVN_INT_ERR(svn_utf_cstring_to_utf8(&utf8_opt_arg, opt_arg, pool));
if (svn_opt_parse_revision_to_range(opt_state.revision_ranges,
- opt_arg, pool) != 0)
+ utf8_opt_arg, pool) != 0)
{
- SVN_INT_ERR(svn_utf_cstring_to_utf8(&utf8_opt_arg, opt_arg, pool));
err = svn_error_createf
(SVN_ERR_CL_ARG_PARSING_ERROR, NULL,
_("Syntax error in revision argument '%s'"),
@@ -1908,19 +1948,19 @@ sub_main(int argc, const char *argv[], a
opt_state.incremental = TRUE;
break;
case 'F':
+ /* We read the raw file content here. We will convert it to UTF-8
+ * later (if it's a log/lock message or an svn:* prop value),
+ * according to the value of the '--encoding' option. */
SVN_INT_ERR(svn_utf_cstring_to_utf8(&utf8_opt_arg, opt_arg, pool));
SVN_INT_ERR(svn_stringbuf_from_file2(&(opt_state.filedata),
utf8_opt_arg, pool));
- dash_F_arg = opt_arg;
+ reading_file_from_stdin = (strcmp(utf8_opt_arg, "-") == 0);
+ dash_F_arg = utf8_opt_arg;
break;
case opt_targets:
{
svn_stringbuf_t *buffer, *buffer_utf8;
- /* We need to convert to UTF-8 now, even before we divide
- the targets into an array, because otherwise we wouldn't
- know what delimiter to use for svn_cstring_split(). */
-
SVN_INT_ERR(svn_utf_cstring_to_utf8(&utf8_opt_arg, opt_arg, pool));
SVN_INT_ERR(svn_stringbuf_from_file2(&buffer, utf8_opt_arg, pool));
SVN_INT_ERR(svn_utf_stringbuf_to_utf8(&buffer_utf8, buffer, pool));
@@ -2070,17 +2110,16 @@ sub_main(int argc, const char *argv[], a
_("Can't specify -c with --old"));
return EXIT_ERROR(err);
}
- opt_state.old_target = apr_pstrdup(pool, opt_arg);
+ SVN_INT_ERR(svn_utf_cstring_to_utf8(&utf8_opt_arg, opt_arg, pool));
+ opt_state.old_target = apr_pstrdup(pool, utf8_opt_arg);
break;
case opt_new_cmd:
- opt_state.new_target = apr_pstrdup(pool, opt_arg);
+ SVN_INT_ERR(svn_utf_cstring_to_utf8(&utf8_opt_arg, opt_arg, pool));
+ opt_state.new_target = apr_pstrdup(pool, utf8_opt_arg);
break;
case opt_config_dir:
- {
- const char *path_utf8;
- SVN_INT_ERR(svn_utf_cstring_to_utf8(&path_utf8, opt_arg, pool));
- opt_state.config_dir = svn_dirent_internal_style(path_utf8, pool);
- }
+ SVN_INT_ERR(svn_utf_cstring_to_utf8(&utf8_opt_arg, opt_arg, pool));
+ opt_state.config_dir = svn_dirent_internal_style(utf8_opt_arg, pool);
break;
case opt_config_options:
if (!opt_state.config_options)
@@ -2088,9 +2127,9 @@ sub_main(int argc, const char *argv[], a
apr_array_make(pool, 1,
sizeof(svn_cmdline__config_argument_t*));
- SVN_INT_ERR(svn_utf_cstring_to_utf8(&opt_arg, opt_arg, pool));
+ SVN_INT_ERR(svn_utf_cstring_to_utf8(&utf8_opt_arg, opt_arg, pool));
SVN_INT_ERR(svn_cmdline__parse_config_option(opt_state.config_options,
- opt_arg, pool));
+ utf8_opt_arg, pool));
break;
case opt_autoprops:
opt_state.autoprops = TRUE;
@@ -2099,12 +2138,12 @@ sub_main(int argc, const char *argv[], a
opt_state.no_autoprops = TRUE;
break;
case opt_native_eol:
- if ( !strcmp("LF", opt_arg) || !strcmp("CR", opt_arg) ||
- !strcmp("CRLF", opt_arg))
- opt_state.native_eol = apr_pstrdup(pool, opt_arg);
+ SVN_INT_ERR(svn_utf_cstring_to_utf8(&utf8_opt_arg, opt_arg, pool));
+ if ( !strcmp("LF", utf8_opt_arg) || !strcmp("CR", utf8_opt_arg) ||
+ !strcmp("CRLF", utf8_opt_arg))
+ opt_state.native_eol = utf8_opt_arg;
else
{
- SVN_INT_ERR(svn_utf_cstring_to_utf8(&utf8_opt_arg, opt_arg, pool));
err = svn_error_createf
(SVN_ERR_CL_ARG_PARSING_ERROR, NULL,
_("Syntax error in native-eol argument '%s'"),
@@ -2122,15 +2161,14 @@ sub_main(int argc, const char *argv[], a
opt_state.remove = TRUE;
break;
case opt_changelist:
- opt_state.changelist = apr_pstrdup(pool, opt_arg);
- if (opt_state.changelist[0] == '\0')
+ SVN_INT_ERR(svn_utf_cstring_to_utf8(&utf8_opt_arg, opt_arg, pool));
+ if (utf8_opt_arg[0] == '\0')
{
err = svn_error_create(SVN_ERR_CL_ARG_PARSING_ERROR, NULL,
_("Changelist names must not be empty"));
return EXIT_ERROR(err);
}
- apr_hash_set(changelists, opt_state.changelist,
- APR_HASH_KEY_STRING, (void *)1);
+ svn_hash_sets(changelists, utf8_opt_arg, (void *)1);
break;
case opt_keep_changelists:
opt_state.keep_changelists = TRUE;
@@ -2157,31 +2195,35 @@ sub_main(int argc, const char *argv[], a
opt_state.use_merge_history = TRUE;
break;
case opt_accept:
- opt_state.accept_which = svn_cl__accept_from_word(opt_arg);
+ SVN_INT_ERR(svn_utf_cstring_to_utf8(&utf8_opt_arg, opt_arg, pool));
+ opt_state.accept_which = svn_cl__accept_from_word(utf8_opt_arg);
if (opt_state.accept_which == svn_cl__accept_invalid)
return EXIT_ERROR
(svn_error_createf(SVN_ERR_CL_ARG_PARSING_ERROR, NULL,
_("'%s' is not a valid --accept value"),
- opt_arg));
+ utf8_opt_arg));
break;
case opt_show_revs:
- opt_state.show_revs = svn_cl__show_revs_from_word(opt_arg);
+ SVN_INT_ERR(svn_utf_cstring_to_utf8(&utf8_opt_arg, opt_arg, pool));
+ opt_state.show_revs = svn_cl__show_revs_from_word(utf8_opt_arg);
if (opt_state.show_revs == svn_cl__show_revs_invalid)
return EXIT_ERROR
(svn_error_createf(SVN_ERR_CL_ARG_PARSING_ERROR, NULL,
_("'%s' is not a valid --show-revs value"),
- opt_arg));
+ utf8_opt_arg));
break;
case opt_reintegrate:
opt_state.reintegrate = TRUE;
break;
case opt_strip:
{
- err = svn_cstring_atoi(&opt_state.strip, opt_arg);
+ SVN_INT_ERR(svn_utf_cstring_to_utf8(&utf8_opt_arg, opt_arg, pool));
+ err = svn_cstring_atoi(&opt_state.strip, utf8_opt_arg);
if (err)
{
err = svn_error_createf(SVN_ERR_CL_ARG_PARSING_ERROR, err,
- _("Invalid strip count '%s'"), opt_arg);
+ _("Invalid strip count '%s'"),
+ utf8_opt_arg);
return EXIT_ERROR(err);
}
if (opt_state.strip < 0)
@@ -2226,10 +2268,12 @@ sub_main(int argc, const char *argv[], a
opt_state.diff.properties_only = TRUE;
break;
case opt_search:
- add_search_pattern_group(&opt_state, opt_arg, pool);
+ SVN_INT_ERR(svn_utf_cstring_to_utf8(&utf8_opt_arg, opt_arg, pool));
+ add_search_pattern_group(&opt_state, utf8_opt_arg, pool);
break;
case opt_search_and:
- add_search_pattern_to_latest_group(&opt_state, opt_arg, pool);
+ SVN_INT_ERR(svn_utf_cstring_to_utf8(&utf8_opt_arg, opt_arg, pool));
+ add_search_pattern_to_latest_group(&opt_state, utf8_opt_arg, pool);
default:
/* Hmmm. Perhaps this would be a good place to squirrel away
opts that commands like svn diff might need. Hmmm indeed. */
@@ -2297,7 +2341,7 @@ sub_main(int argc, const char *argv[], a
svn_error_clear
(svn_cmdline_fprintf(stderr, pool,
_("Subcommand argument required\n")));
- svn_cl__help(NULL, NULL, pool);
+ svn_error_clear(svn_cl__help(NULL, NULL, pool));
return EXIT_FAILURE;
}
}
@@ -2315,7 +2359,7 @@ sub_main(int argc, const char *argv[], a
(svn_cmdline_fprintf(stderr, pool,
_("Unknown subcommand: '%s'\n"),
first_arg_utf8));
- svn_cl__help(NULL, NULL, pool);
+ svn_error_clear(svn_cl__help(NULL, NULL, pool));
/* Be kind to people who try 'svn undo'. */
if (strcmp(first_arg_utf8, "undo") == 0)
@@ -2353,7 +2397,7 @@ sub_main(int argc, const char *argv[], a
subcommand, pool);
svn_opt_format_option(&optstr, badopt, FALSE, pool);
if (subcommand->name[0] == '-')
- svn_cl__help(NULL, NULL, pool);
+ svn_error_clear(svn_cl__help(NULL, NULL, pool));
else
svn_error_clear
(svn_cmdline_fprintf
@@ -2408,6 +2452,24 @@ sub_main(int argc, const char *argv[], a
return EXIT_ERROR(err);
}
+#ifdef SVN_CL__OPTION_WITH_REVPROP_CAN_SET_PROPERTIES_IN_SVN_NAMESPACE
+ /* XXX This is incomplete, since we do not yet check for --force, nor
+ do all the commands that accept --with-revprop also accept --force. */
+
+ /* Check the spelling of the revision properties given by --with-revprop. */
+ if (opt_state.revprop_table)
+ {
+ apr_hash_index_t *hi;
+ for (hi = apr_hash_first(pool, opt_state.revprop_table);
+ hi; hi = apr_hash_next(hi))
+ {
+ SVN_INT_ERR(svn_cl__check_svn_prop_name(svn__apr_hash_index_key(hi),
+ TRUE, svn_cl__prop_use_use,
+ pool));
+ }
+ }
+#endif /* SVN_CL__OPTION_WITH_REVPROP_CAN_SET_PROPERTIES_IN_SVN_NAMESPACE */
+
/* Disallow simultaneous use of both -m and -F, when they are
both used to pass a commit message or lock comment. ('propset'
takes the property value, not a commit message, from -F.)
@@ -2529,8 +2591,7 @@ sub_main(int argc, const char *argv[], a
}
}
- cfg_config = apr_hash_get(cfg_hash, SVN_CONFIG_CATEGORY_CONFIG,
- APR_HASH_KEY_STRING);
+ cfg_config = svn_hash_gets(cfg_hash, SVN_CONFIG_CATEGORY_CONFIG);
/* Update the options in the config */
if (opt_state.config_options)
@@ -2599,8 +2660,8 @@ sub_main(int argc, const char *argv[], a
if (!err)
{
- err = svn_wc_read_kind(&kind, ctx->wc_ctx, local_abspath, FALSE,
- pool);
+ err = svn_wc_read_kind2(&kind, ctx->wc_ctx, local_abspath, TRUE,
+ FALSE, pool);
if (!err && kind != svn_node_none && kind != svn_node_unknown)
{
@@ -2626,10 +2687,10 @@ sub_main(int argc, const char *argv[], a
/* If the -m argument is a file at all, that's probably not what
the user intended. */
- if (dash_m_arg)
+ if (opt_state.message)
{
apr_finfo_t finfo;
- if (apr_stat(&finfo, dash_m_arg,
+ if (apr_stat(&finfo, opt_state.message /* not converted to UTF-8 */,
APR_FINFO_MIN, pool) == APR_SUCCESS)
{
if (subcommand->cmd_func != svn_cl__lock)
@@ -2723,7 +2784,7 @@ sub_main(int argc, const char *argv[], a
if (use_notifier)
{
SVN_INT_ERR(svn_cl__get_notifier(&ctx->notify_func2, &ctx->notify_baton2,
- pool));
+ conflict_stats, pool));
}
/* Set up our cancellation support. */
@@ -2767,14 +2828,6 @@ sub_main(int argc, const char *argv[], a
ctx->auth_baton = ab;
- /* Install the default conflict handler which postpones all conflicts
- * and remembers the list of conflicted paths to be resolved later.
- * This is overridden only within the 'resolve' subcommand. */
- ctx->conflict_func = NULL;
- ctx->conflict_baton = NULL;
- ctx->conflict_func2 = svn_cl__conflict_func_postpone;
- ctx->conflict_baton2 = svn_cl__get_conflict_func_postpone_baton(pool);
-
if (opt_state.non_interactive)
{
if (opt_state.accept_which == svn_cl__accept_edit)
@@ -2816,6 +2869,22 @@ sub_main(int argc, const char *argv[], a
opt_state.accept_which = svn_cl__accept_postpone;
}
+ /* Install the default conflict handler. */
+ {
+ svn_cl__interactive_conflict_baton_t *b;
+
+ ctx->conflict_func = NULL;
+ ctx->conflict_baton = NULL;
+
+ ctx->conflict_func2 = svn_cl__conflict_func_interactive;
+ SVN_INT_ERR(svn_cl__get_conflict_func_interactive_baton(
+ &b,
+ opt_state.accept_which,
+ ctx->config, opt_state.editor_cmd, conflict_stats,
+ ctx->cancel_func, ctx->cancel_baton, pool));
+ ctx->conflict_baton2 = b;
+ }
+
/* And now we finally run the subcommand. */
err = (*subcommand->cmd_func)(os, &command_baton, pool);
if (err)
@@ -2836,6 +2905,20 @@ sub_main(int argc, const char *argv[], a
_("Please see the 'svn upgrade' command"));
}
+ if (err->apr_err == SVN_ERR_AUTHN_FAILED && opt_state.non_interactive)
+ {
+ err = svn_error_quick_wrap(err,
+ _("Authentication failed and interactive"
+ " prompting is disabled; see the"
+ " --force-interactive option"));
+ if (reading_file_from_stdin)
+ err = svn_error_quick_wrap(err,
+ _("Reading file from standard input "
+ "because of -F option; this can "
+ "interfere with interactive "
+ "prompting"));
+ }
+
/* Tell the user about 'svn cleanup' if any error on the stack
was about locked working copies. */
if (svn_error_find_cause(err, SVN_ERR_WC_LOCKED))
@@ -2857,6 +2940,16 @@ sub_main(int argc, const char *argv[], a
"on the file server"));
}
+ if (svn_error_find_cause(err, SVN_ERR_RA_CANNOT_CREATE_TUNNEL) &&
+ (opt_state.auth_username || opt_state.auth_password))
+ {
+ err = svn_error_quick_wrap(
+ err, _("When using svn+ssh:// URLs, keep in mind that the "
+ "--username and --password options are ignored "
+ "because authentication is performed by SSH, not "
+ "Subversion"));
+ }
+
return EXIT_ERROR(err);
}
else
Modified: subversion/branches/master-passphrase/subversion/svn/switch-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/master-passphrase/subversion/svn/switch-cmd.c?rev=1481041&r1=1481040&r2=1481041&view=diff
==============================================================================
--- subversion/branches/master-passphrase/subversion/svn/switch-cmd.c (original)
+++ subversion/branches/master-passphrase/subversion/svn/switch-cmd.c Fri May 10 14:58:47 2013
@@ -157,9 +157,6 @@ svn_cl__switch(apr_getopt_t *os,
ctx->notify_func2 = svn_cl__check_externals_failed_notify_wrapper;
ctx->notify_baton2 = &nwb;
- /* Postpone conflict resolution during the switch operation.
- * If any conflicts occur we'll run the conflict resolver later. */
-
/* Do the 'switch' update. */
err = svn_client_switch3(NULL, target, switch_url, &peg_revision,
&(opt_state->start_revision), depth,
@@ -198,11 +195,5 @@ svn_cl__switch(apr_getopt_t *os,
return svn_error_compose_create(externals_err, err);
}
- err = svn_cl__resolve_postponed_conflicts(NULL,
- ctx->conflict_baton2,
- opt_state->accept_which,
- opt_state->editor_cmd,
- ctx, scratch_pool);
-
return svn_error_compose_create(externals_err, err);
}
Modified: subversion/branches/master-passphrase/subversion/svn/update-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/master-passphrase/subversion/svn/update-cmd.c?rev=1481041&r1=1481040&r2=1481041&view=diff
==============================================================================
--- subversion/branches/master-passphrase/subversion/svn/update-cmd.c (original)
+++ subversion/branches/master-passphrase/subversion/svn/update-cmd.c Fri May 10 14:58:47 2013
@@ -163,9 +163,6 @@ svn_cl__update(apr_getopt_t *os,
ctx->notify_func2 = svn_cl__check_externals_failed_notify_wrapper;
ctx->notify_baton2 = &nwb;
- /* Postpone conflict resolution during the update operation.
- * If any conflicts occur we'll run the conflict resolver later. */
-
SVN_ERR(svn_client_update4(&result_revs, targets,
&(opt_state->start_revision),
depth, depth_is_sticky,
@@ -195,11 +192,5 @@ svn_cl__update(apr_getopt_t *os,
return svn_error_compose_create(externals_err, err);
}
- err = svn_cl__resolve_postponed_conflicts(NULL,
- ctx->conflict_baton2,
- opt_state->accept_which,
- opt_state->editor_cmd,
- ctx, scratch_pool);
-
return svn_error_compose_create(externals_err, err);
}
Modified: subversion/branches/master-passphrase/subversion/svn/util.c
URL: http://svn.apache.org/viewvc/subversion/branches/master-passphrase/subversion/svn/util.c?rev=1481041&r1=1481040&r2=1481041&view=diff
==============================================================================
--- subversion/branches/master-passphrase/subversion/svn/util.c (original)
+++ subversion/branches/master-passphrase/subversion/svn/util.c Fri May 10 14:58:47 2013
@@ -112,8 +112,7 @@ svn_cl__merge_file_externally(const char
{
struct svn_config_t *cfg;
merge_tool = NULL;
- cfg = config ? apr_hash_get(config, SVN_CONFIG_CATEGORY_CONFIG,
- APR_HASH_KEY_STRING) : NULL;
+ cfg = config ? svn_hash_gets(config, SVN_CONFIG_CATEGORY_CONFIG) : NULL;
/* apr_env_get wants char **, this wants const char ** */
svn_config_get(cfg, (const char **)&merge_tool,
SVN_CONFIG_SECTION_HELPERS,
@@ -225,8 +224,7 @@ svn_cl__make_log_msg_baton(void **baton,
}
else if (config)
{
- svn_config_t *cfg = apr_hash_get(config, SVN_CONFIG_CATEGORY_CONFIG,
- APR_HASH_KEY_STRING);
+ svn_config_t *cfg = svn_hash_gets(config, SVN_CONFIG_CATEGORY_CONFIG);
svn_config_get(cfg, &(lmb->message_encoding),
SVN_CONFIG_SECTION_MISCELLANY,
SVN_CONFIG_OPTION_LOG_ENCODING,
@@ -345,22 +343,17 @@ svn_cl__get_log_message(const char **log
*tmp_file = NULL;
if (lmb->message)
{
- svn_stringbuf_t *log_msg_buf = svn_stringbuf_create(lmb->message, pool);
- svn_string_t *log_msg_str = apr_pcalloc(pool, sizeof(*log_msg_str));
+ svn_string_t *log_msg_str = svn_string_create(lmb->message, pool);
- /* Trim incoming messages of the EOF marker text and the junk
- that follows it. */
- truncate_buffer_at_prefix(&(log_msg_buf->len), log_msg_buf->data,
- EDITOR_EOF_PREFIX);
-
- /* Make a string from a stringbuf, sharing the data allocation. */
- log_msg_str->data = log_msg_buf->data;
- log_msg_str->len = log_msg_buf->len;
SVN_ERR_W(svn_subst_translate_string2(&log_msg_str, FALSE, FALSE,
log_msg_str, lmb->message_encoding,
FALSE, pool, pool),
_("Error normalizing log message to internal format"));
+ /* Strip off the EOF marker text and the junk that follows it. */
+ truncate_buffer_at_prefix(&(log_msg_str->len), (char *)log_msg_str->data,
+ EDITOR_EOF_PREFIX);
+
*log_msg = log_msg_str->data;
return SVN_NO_ERROR;
}
@@ -468,7 +461,7 @@ svn_cl__get_log_message(const char **log
if (msg_string)
message = svn_stringbuf_create_from_string(msg_string, pool);
- /* Strip the prefix from the buffer. */
+ /* Strip off the EOF marker text and the junk that follows it. */
if (message)
truncate_buffer_at_prefix(&message->len, message->data,
EDITOR_EOF_PREFIX);
@@ -1100,7 +1093,7 @@ svn_cl__propset_print_binary_mime_type_w
"operations will stop working on this file\n"),
canon_propval->data,
svn_dirent_local_style(local_abspath, iterpool)));
-
+
}
}
svn_pool_destroy(iterpool);