You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by rh...@apache.org on 2018/11/07 12:30:11 UTC
svn commit: r1846002 [29/44] - in /subversion/branches/ra-git: ./ build/
build/ac-macros/ build/generator/ build/generator/swig/
build/generator/templates/ build/generator/util/ build/win32/
contrib/client-side/ contrib/client-side/svn_load_dirs/ contr...
Modified: subversion/branches/ra-git/subversion/svn/auth-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/ra-git/subversion/svn/auth-cmd.c?rev=1846002&r1=1846001&r2=1846002&view=diff
==============================================================================
--- subversion/branches/ra-git/subversion/svn/auth-cmd.c (original)
+++ subversion/branches/ra-git/subversion/svn/auth-cmd.c Wed Nov 7 12:30:06 2018
@@ -455,12 +455,15 @@ svn_cl__auth(apr_getopt_t *os, void *bat
{
if (b.patterns->nelts == 0)
SVN_ERR(svn_cmdline_printf(pool,
- _("Credentials cache in '%s' contains %d credentials\n"),
+ Q_("Credentials cache in '%s' contains %d credential\n",
+ "Credentials cache in '%s' contains %d credentials\n",
+ b.matches),
svn_dirent_local_style(config_path, pool), b.matches));
else
SVN_ERR(svn_cmdline_printf(pool,
- _("Credentials cache in '%s' contains %d matching "
- "credentials\n"),
+ Q_("Credentials cache in '%s' contains %d matching credential\n",
+ "Credentials cache in '%s' contains %d matching credentials\n",
+ b.matches),
svn_dirent_local_style(config_path, pool), b.matches));
}
@@ -474,9 +477,11 @@ svn_cl__auth(apr_getopt_t *os, void *bat
"no matching credentials"),
svn_dirent_local_style(config_path, pool));
else
- SVN_ERR(svn_cmdline_printf(pool, _("Deleted %d matching credentials "
- "from '%s'\n"), b.matches,
- svn_dirent_local_style(config_path, pool)));
+ SVN_ERR(svn_cmdline_printf(pool,
+ Q_("Deleted %d matching credential from '%s'\n",
+ "Deleted %d matching credentials from '%s'\n",
+ b.matches),
+ b.matches, svn_dirent_local_style(config_path, pool)));
}
return SVN_NO_ERROR;
Modified: subversion/branches/ra-git/subversion/svn/cl.h
URL: http://svn.apache.org/viewvc/subversion/branches/ra-git/subversion/svn/cl.h?rev=1846002&r1=1846001&r2=1846002&view=diff
==============================================================================
--- subversion/branches/ra-git/subversion/svn/cl.h (original)
+++ subversion/branches/ra-git/subversion/svn/cl.h Wed Nov 7 12:30:06 2018
@@ -83,7 +83,10 @@ typedef enum svn_cl__accept_t
svn_cl__accept_edit,
/* Launch user's resolver and resolve conflict with edited file. */
- svn_cl__accept_launch
+ svn_cl__accept_launch,
+
+ /* Use recommended resolution if available, else leave the conflict alone. */
+ svn_cl__accept_recommended
} svn_cl__accept_t;
@@ -97,6 +100,7 @@ typedef enum svn_cl__accept_t
#define SVN_CL__ACCEPT_THEIRS_FULL "theirs-full"
#define SVN_CL__ACCEPT_EDIT "edit"
#define SVN_CL__ACCEPT_LAUNCH "launch"
+#define SVN_CL__ACCEPT_RECOMMENDED "recommended"
/* Return the svn_cl__accept_t value corresponding to WORD, using exact
* case-sensitive string comparison. Return svn_cl__accept_invalid if WORD
@@ -174,6 +178,7 @@ typedef struct svn_cl__opt_state_t
svn_boolean_t help; /* print usage message */
const char *auth_username; /* auth username */
const char *auth_password; /* auth password */
+ svn_boolean_t auth_password_from_stdin; /* read password from stdin */
const char *extensions; /* subprocess extension args */
apr_array_header_t *targets; /* target list from file */
svn_boolean_t xml; /* output in xml, e.g., "svn log --xml" */
@@ -250,6 +255,13 @@ typedef struct svn_cl__opt_state_t
svn_boolean_t pin_externals; /* pin externals to last-changed revisions */
const char *show_item; /* print only the given item */
svn_boolean_t adds_as_modification; /* update 'add vs add' no tree conflict */
+ svn_boolean_t vacuum_pristines; /* remove unreferenced pristines */
+ svn_boolean_t drop; /* drop shelf after successful unshelve */
+ enum svn_cl__viewspec_t {
+ svn_cl__viewspec_unspecified = 0 /* default */,
+ svn_cl__viewspec_classic,
+ svn_cl__viewspec_svn11
+ } viewspec; /* value of --x-viewspec */
} svn_cl__opt_state_t;
/* Conflict stats for operations such as update and merge. */
@@ -297,6 +309,14 @@ svn_opt_subcommand_t
svn_cl__revert,
svn_cl__resolve,
svn_cl__resolved,
+ svn_cl__shelf_diff,
+ svn_cl__shelf_drop,
+ svn_cl__shelf_list,
+ svn_cl__shelf_list_by_paths,
+ svn_cl__shelf_log,
+ svn_cl__shelf_save,
+ svn_cl__shelf_shelve,
+ svn_cl__shelf_unshelve,
svn_cl__status,
svn_cl__switch,
svn_cl__unlock,
@@ -305,7 +325,7 @@ svn_opt_subcommand_t
/* See definition in svn.c for documentation. */
-extern const svn_opt_subcommand_desc2_t svn_cl__cmd_table[];
+extern const svn_opt_subcommand_desc3_t svn_cl__cmd_table[];
/* See definition in svn.c for documentation. */
extern const int svn_cl__global_options[];
@@ -384,14 +404,12 @@ svn_cl__print_conflict_stats(svn_cl__con
* TODO: more docs
*/
svn_error_t *
-svn_cl__resolve_conflict(svn_boolean_t *resolved,
- svn_boolean_t *quit,
+svn_cl__resolve_conflict(svn_boolean_t *quit,
svn_boolean_t *external_failed,
svn_boolean_t *printed_summary,
svn_client_conflict_t *conflict,
svn_cl__accept_t accept_which,
const char *editor_cmd,
- apr_hash_t *config,
const char *path_prefix,
svn_cmdline_prompt_baton_t *pb,
svn_cl__conflict_stats_t *conflict_stats,
@@ -907,6 +925,20 @@ svn_cl__similarity_check(const char *key
apr_size_t token_count,
apr_pool_t *scratch_pool);
+/* Return in FUNC_P and BATON_P a callback that prints a summary diff,
+ * according to the options XML and IGNORE_PROPERTIES.
+ *
+ * ANCHOR is a URL or local path to be prefixed to the printed paths.
+ */
+svn_error_t *
+svn_cl__get_diff_summary_writer(svn_client_diff_summarize_func_t *func_p,
+ void **baton_p,
+ svn_boolean_t xml,
+ svn_boolean_t ignore_properties,
+ const char *anchor,
+ apr_pool_t *result_pool,
+ apr_pool_t *scratch_pool);
+
#ifdef __cplusplus
}
#endif /* __cplusplus */
Modified: subversion/branches/ra-git/subversion/svn/cleanup-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/ra-git/subversion/svn/cleanup-cmd.c?rev=1846002&r1=1846001&r2=1846002&view=diff
==============================================================================
--- subversion/branches/ra-git/subversion/svn/cleanup-cmd.c (original)
+++ subversion/branches/ra-git/subversion/svn/cleanup-cmd.c Wed Nov 7 12:30:06 2018
@@ -72,13 +72,14 @@ svn_cl__cleanup(apr_getopt_t *os,
SVN_ERR(svn_dirent_get_absolute(&target_abspath, target, iterpool));
- if (opt_state->remove_unversioned || opt_state->remove_ignored)
+ if (opt_state->remove_unversioned || opt_state->remove_ignored ||
+ opt_state->vacuum_pristines)
{
svn_error_t *err = svn_client_vacuum(target_abspath,
opt_state->remove_unversioned,
opt_state->remove_ignored,
TRUE /* fix_timestamps */,
- FALSE /* vacuum_pristines */,
+ opt_state->vacuum_pristines,
opt_state->include_externals,
ctx, iterpool);
Modified: subversion/branches/ra-git/subversion/svn/conflict-callbacks.c
URL: http://svn.apache.org/viewvc/subversion/branches/ra-git/subversion/svn/conflict-callbacks.c?rev=1846002&r1=1846001&r2=1846002&view=diff
==============================================================================
--- subversion/branches/ra-git/subversion/svn/conflict-callbacks.c (original)
+++ subversion/branches/ra-git/subversion/svn/conflict-callbacks.c Wed Nov 7 12:30:06 2018
@@ -78,6 +78,9 @@ svn_cl__accept_from_word(const char *wor
if (strcmp(word, SVN_CL__ACCEPT_LAUNCH) == 0
|| strcmp(word, "l") == 0 || strcmp(word, ":-l") == 0)
return svn_cl__accept_launch;
+ if (strcmp(word, SVN_CL__ACCEPT_RECOMMENDED) == 0
+ || strcmp(word, "r") == 0)
+ return svn_cl__accept_recommended;
/* word is an invalid action. */
return svn_cl__accept_invalid;
}
@@ -112,7 +115,7 @@ show_diff(svn_client_conflict_t *conflic
* as it appears after the merge operation).
*
* For conflicts recorded by the 'update' and 'switch' operations,
- * show a diff beween 'theirs' (the new pristine version of the
+ * show a diff between 'theirs' (the new pristine version of the
* file) and 'merged' (the version of the file as it appears with
* local changes merged with the new pristine version).
*
@@ -387,6 +390,7 @@ typedef struct client_option_t
svn_client_conflict_option_id_t choice;
/* or ..._undefined if not from libsvn_client */
const char *accept_arg; /* --accept option argument (NOT localized) */
+ svn_boolean_t is_recommended; /* if TRUE, try this option before prompting */
} client_option_t;
/* Resolver options for conflict options offered by libsvn_client. */
@@ -436,6 +440,11 @@ static const resolver_option_t builtin_r
/* Options for local move vs incoming edit. */
{ "m", svn_client_conflict_option_local_move_file_text_merge },
+ { "m", svn_client_conflict_option_local_move_dir_merge },
+
+ /* Options for local missing vs incoming edit. */
+ { "m", svn_client_conflict_option_sibling_move_file_text_merge },
+ { "m", svn_client_conflict_option_sibling_move_dir_merge },
{ NULL }
};
@@ -533,11 +542,29 @@ find_option(const apr_array_header_t *op
return NULL;
}
-/* Return a pointer to the option description in OPTIONS matching the
- * conflict option ID CHOICE. @a out will be set to NULL if the
+/* Find the first recommended option in OPTIONS. */
+static const client_option_t *
+find_recommended_option(const apr_array_header_t *options)
+{
+ int i;
+
+ for (i = 0; i < options->nelts; i++)
+ {
+ const client_option_t *opt = APR_ARRAY_IDX(options, i, client_option_t *);
+
+ /* Ignore code "" (blank lines) which is not a valid answer. */
+ if (opt->code[0] && opt->is_recommended)
+ return opt;
+ }
+ return NULL;
+}
+
+/* Return a pointer to the client_option_t in OPTIONS matching the ID of
+ * conflict option BUILTIN_OPTION. @a out will be set to NULL if the
* option was not found. */
static svn_error_t *
find_option_by_builtin(client_option_t **out,
+ svn_client_conflict_t *conflict,
const resolver_option_t *options,
svn_client_conflict_option_t *builtin_option,
apr_pool_t *result_pool,
@@ -545,8 +572,10 @@ find_option_by_builtin(client_option_t *
{
const resolver_option_t *opt;
svn_client_conflict_option_id_t id;
+ svn_client_conflict_option_id_t recommended_id;
id = svn_client_conflict_option_get_id(builtin_option);
+ recommended_id = svn_client_conflict_get_recommended_option_id(conflict);
for (opt = options; opt->code; opt++)
{
@@ -564,6 +593,9 @@ find_option_by_builtin(client_option_t *
builtin_option,
result_pool);
client_opt->accept_arg = opt->accept_arg;
+ client_opt->is_recommended =
+ (recommended_id != svn_client_conflict_option_unspecified &&
+ id == recommended_id);
*out = client_opt;
@@ -731,7 +763,7 @@ build_text_conflict_options(apr_array_he
{
const client_option_t *o;
apr_array_header_t *builtin_options;
- apr_size_t nopt;
+ int nopt;
int i;
apr_pool_t *iterpool;
@@ -753,7 +785,7 @@ build_text_conflict_options(apr_array_he
svn_pool_clear(iterpool);
builtin_option = APR_ARRAY_IDX(builtin_options, i,
svn_client_conflict_option_t *);
- SVN_ERR(find_option_by_builtin(&opt,
+ SVN_ERR(find_option_by_builtin(&opt, conflict,
builtin_resolver_options,
builtin_option,
result_pool,
@@ -1192,7 +1224,7 @@ build_prop_conflict_options(apr_array_he
{
const client_option_t *o;
apr_array_header_t *builtin_options;
- apr_size_t nopt;
+ int nopt;
int i;
apr_pool_t *iterpool;
@@ -1213,7 +1245,7 @@ build_prop_conflict_options(apr_array_he
svn_pool_clear(iterpool);
builtin_option = APR_ARRAY_IDX(builtin_options, i,
svn_client_conflict_option_t *);
- SVN_ERR(find_option_by_builtin(&opt,
+ SVN_ERR(find_option_by_builtin(&opt, conflict,
builtin_resolver_options,
builtin_option,
result_pool,
@@ -1444,8 +1476,9 @@ build_tree_conflict_options(
{
const client_option_t *o;
apr_array_header_t *builtin_options;
- apr_size_t nopt;
+ int nopt;
int i;
+ int next_unknown_option_code = 1;
apr_pool_t *iterpool;
if (all_options_are_dumb != NULL)
@@ -1471,13 +1504,24 @@ build_tree_conflict_options(
svn_pool_clear(iterpool);
builtin_option = APR_ARRAY_IDX(builtin_options, i,
svn_client_conflict_option_t *);
- SVN_ERR(find_option_by_builtin(&opt,
+ SVN_ERR(find_option_by_builtin(&opt, conflict,
builtin_resolver_options,
builtin_option,
result_pool,
iterpool));
if (opt == NULL)
- continue; /* ### unknown option -- assign a code dynamically? */
+ {
+ /* Unkown option. Assign a dynamic option code. */
+ opt = apr_pcalloc(result_pool, sizeof(*opt));
+ opt->code = apr_psprintf(result_pool, "%d", next_unknown_option_code);
+ next_unknown_option_code++;
+ opt->label = svn_client_conflict_option_get_label(builtin_option,
+ result_pool);
+ opt->long_desc = svn_client_conflict_option_get_description(
+ builtin_option, result_pool);
+ opt->choice = svn_client_conflict_option_get_id(builtin_option);
+ opt->accept_arg = NULL;
+ }
APR_ARRAY_PUSH(*options, client_option_t *) = opt;
@@ -1490,17 +1534,16 @@ build_tree_conflict_options(
id != svn_client_conflict_option_accept_current_wc_state)
*all_options_are_dumb = FALSE;
- if (id == svn_client_conflict_option_incoming_move_file_text_merge ||
- id == svn_client_conflict_option_incoming_move_dir_merge)
- {
- SVN_ERR(
- svn_client_conflict_option_get_moved_to_repos_relpath_candidates(
- possible_moved_to_repos_relpaths, builtin_option,
- result_pool, iterpool));
- SVN_ERR(svn_client_conflict_option_get_moved_to_abspath_candidates(
- possible_moved_to_abspaths, builtin_option,
- result_pool, iterpool));
- }
+ if (*possible_moved_to_repos_relpaths == NULL)
+ SVN_ERR(
+ svn_client_conflict_option_get_moved_to_repos_relpath_candidates2(
+ possible_moved_to_repos_relpaths, builtin_option,
+ result_pool, iterpool));
+
+ if (*possible_moved_to_abspaths == NULL)
+ SVN_ERR(svn_client_conflict_option_get_moved_to_abspath_candidates2(
+ possible_moved_to_abspaths, builtin_option,
+ result_pool, iterpool));
}
svn_pool_destroy(iterpool);
@@ -1615,8 +1658,8 @@ prompt_move_target_path(int *preferred_m
{
char buf[1024];
- svn_cmdline_fprintf(stderr, iterpool, "%s\n",
- svn_err_best_message(err, buf, sizeof(buf)));
+ SVN_ERR(svn_cmdline_fprintf(stderr, iterpool, "%s\n",
+ svn_err_best_message(err, buf, sizeof(buf))));
svn_error_clear(err);
continue;
}
@@ -1626,7 +1669,71 @@ prompt_move_target_path(int *preferred_m
svn_pool_destroy(iterpool);
- *preferred_move_target_idx = (idx - 1);
+ SVN_ERR_ASSERT((idx - 1) == (int)(idx - 1));
+ *preferred_move_target_idx = (int)(idx - 1);
+ return SVN_NO_ERROR;
+}
+
+static svn_error_t *
+find_conflict_option_with_repos_move_targets(
+ svn_client_conflict_option_t **option_with_move_targets,
+ apr_array_header_t *options,
+ apr_pool_t *scratch_pool)
+{
+ apr_pool_t *iterpool = svn_pool_create(scratch_pool);
+ int i;
+ apr_array_header_t *possible_moved_to_repos_relpaths = NULL;
+
+ *option_with_move_targets = NULL;
+
+ for (i = 0; i < options->nelts; i++)
+ {
+ svn_client_conflict_option_t *option;
+
+ svn_pool_clear(iterpool);
+ option = APR_ARRAY_IDX(options, i, svn_client_conflict_option_t *);
+ SVN_ERR(svn_client_conflict_option_get_moved_to_repos_relpath_candidates2(
+ &possible_moved_to_repos_relpaths, option, iterpool, iterpool));
+ if (possible_moved_to_repos_relpaths)
+ {
+ *option_with_move_targets = option;
+ break;
+ }
+ }
+ svn_pool_destroy(iterpool);
+
+ return SVN_NO_ERROR;
+}
+
+static svn_error_t *
+find_conflict_option_with_working_copy_move_targets(
+ svn_client_conflict_option_t **option_with_move_targets,
+ apr_array_header_t *options,
+ apr_pool_t *scratch_pool)
+{
+ apr_pool_t *iterpool = svn_pool_create(scratch_pool);
+ int i;
+ apr_array_header_t *possible_moved_to_abspaths = NULL;
+
+ *option_with_move_targets = NULL;
+
+ for (i = 0; i < options->nelts; i++)
+ {
+ svn_client_conflict_option_t *option;
+
+ svn_pool_clear(iterpool);
+ option = APR_ARRAY_IDX(options, i, svn_client_conflict_option_t *);
+ SVN_ERR(svn_client_conflict_option_get_moved_to_abspath_candidates2(
+ &possible_moved_to_abspaths, option, scratch_pool,
+ iterpool));
+ if (possible_moved_to_abspaths)
+ {
+ *option_with_move_targets = option;
+ break;
+ }
+ }
+ svn_pool_destroy(iterpool);
+
return SVN_NO_ERROR;
}
@@ -1655,6 +1762,9 @@ handle_tree_conflict(svn_boolean_t *reso
apr_array_header_t *possible_moved_to_repos_relpaths;
apr_array_header_t *possible_moved_to_abspaths;
svn_boolean_t all_options_are_dumb;
+ const struct client_option_t *recommended_option;
+ svn_boolean_t repos_move_target_chosen = FALSE;
+ svn_boolean_t wc_move_target_chosen = FALSE;
option_id = svn_client_conflict_option_unspecified;
local_abspath = svn_client_conflict_get_local_abspath(conflict);
@@ -1682,12 +1792,43 @@ handle_tree_conflict(svn_boolean_t *reso
conflict, ctx,
scratch_pool, scratch_pool));
+ /* Try a recommended resolution option before prompting. */
+ recommended_option = find_recommended_option(tree_conflict_options);
+ if (recommended_option)
+ {
+ svn_error_t *err;
+ apr_status_t root_cause;
+
+ SVN_ERR(svn_cmdline_printf(scratch_pool,
+ _("Applying recommended resolution '%s':\n"),
+ recommended_option->label));
+
+ err = mark_conflict_resolved(conflict, recommended_option->choice,
+ FALSE, NULL, TRUE,
+ path_prefix, conflict_stats,
+ ctx, scratch_pool);
+ if (!err)
+ {
+ *resolved = TRUE;
+ return SVN_NO_ERROR;
+ }
+
+ root_cause = svn_error_root_cause(err)->apr_err;
+ if (root_cause != SVN_ERR_WC_CONFLICT_RESOLVER_FAILURE &&
+ root_cause != SVN_ERR_WC_OBSTRUCTED_UPDATE &&
+ root_cause != SVN_ERR_WC_FOUND_CONFLICT)
+ return svn_error_trace(err);
+
+ /* Fall back to interactive prompting. */
+ svn_error_clear(err);
+ }
+
if (all_options_are_dumb)
SVN_ERR(svn_cmdline_fprintf(stderr, scratch_pool,
_("\nSubversion is not smart enough to resolve "
"this tree conflict automatically!\nSee 'svn "
"help resolve' for more information.\n\n")));
-
+
iterpool = svn_pool_create(scratch_pool);
while (1)
{
@@ -1695,6 +1836,18 @@ handle_tree_conflict(svn_boolean_t *reso
svn_pool_clear(iterpool);
+ if (!repos_move_target_chosen &&
+ possible_moved_to_repos_relpaths &&
+ possible_moved_to_repos_relpaths->nelts > 1)
+ SVN_ERR(svn_cmdline_printf(scratch_pool,
+ _("Ambiguous move destinations exist in the repository; "
+ "try the 'd' option\n")));
+ if (!wc_move_target_chosen && possible_moved_to_abspaths &&
+ possible_moved_to_abspaths->nelts > 1)
+ SVN_ERR(svn_cmdline_printf(scratch_pool,
+ _("Ambiguous move destinations exist in the working copy; "
+ "try the 'w' option\n")));
+
SVN_ERR(prompt_user(&opt, tree_conflict_options, NULL,
conflict_description, pb, iterpool));
*printed_description = TRUE;
@@ -1711,7 +1864,7 @@ handle_tree_conflict(svn_boolean_t *reso
{
int preferred_move_target_idx;
apr_array_header_t *options;
- svn_client_conflict_option_t *conflict_option;
+ svn_client_conflict_option_t *option;
SVN_ERR(prompt_move_target_path(&preferred_move_target_idx,
possible_moved_to_repos_relpaths,
@@ -1724,21 +1877,14 @@ handle_tree_conflict(svn_boolean_t *reso
ctx,
iterpool,
iterpool));
- conflict_option =
- svn_client_conflict_option_find_by_id(
- options,
- svn_client_conflict_option_incoming_move_file_text_merge);
- if (conflict_option == NULL)
+ SVN_ERR(find_conflict_option_with_repos_move_targets(
+ &option, options, iterpool));
+ if (option)
{
- conflict_option =
- svn_client_conflict_option_find_by_id(
- options, svn_client_conflict_option_incoming_move_dir_merge);
- }
-
- if (conflict_option)
- {
- SVN_ERR(svn_client_conflict_option_set_moved_to_repos_relpath(
- conflict_option, preferred_move_target_idx, iterpool));
+ SVN_ERR(svn_client_conflict_option_set_moved_to_repos_relpath2(
+ option, preferred_move_target_idx, ctx, iterpool));
+ repos_move_target_chosen = TRUE;
+ wc_move_target_chosen = FALSE;
/* Update option description. */
SVN_ERR(build_tree_conflict_options(
@@ -1747,6 +1893,14 @@ handle_tree_conflict(svn_boolean_t *reso
&possible_moved_to_abspaths,
NULL, conflict, ctx,
scratch_pool, scratch_pool));
+
+ /* Update conflict description. */
+ SVN_ERR(svn_client_conflict_tree_get_description(
+ &incoming_change_description, &local_change_description,
+ conflict, ctx, scratch_pool, scratch_pool));
+ conflict_description = apr_psprintf(scratch_pool, "%s\n%s",
+ incoming_change_description,
+ local_change_description);
}
continue;
}
@@ -1754,7 +1908,7 @@ handle_tree_conflict(svn_boolean_t *reso
{
int preferred_move_target_idx;
apr_array_header_t *options;
- svn_client_conflict_option_t *conflict_option;
+ svn_client_conflict_option_t *option;
SVN_ERR(prompt_move_target_path(&preferred_move_target_idx,
possible_moved_to_abspaths, TRUE,
@@ -1766,21 +1920,13 @@ handle_tree_conflict(svn_boolean_t *reso
ctx,
iterpool,
iterpool));
- conflict_option =
- svn_client_conflict_option_find_by_id(
- options,
- svn_client_conflict_option_incoming_move_file_text_merge);
- if (conflict_option == NULL)
- {
- conflict_option =
- svn_client_conflict_option_find_by_id(
- options, svn_client_conflict_option_incoming_move_dir_merge);
- }
-
- if (conflict_option)
+ SVN_ERR(find_conflict_option_with_working_copy_move_targets(
+ &option, options, iterpool));
+ if (option)
{
- SVN_ERR(svn_client_conflict_option_set_moved_to_abspath(
- conflict_option, preferred_move_target_idx, ctx, iterpool));
+ SVN_ERR(svn_client_conflict_option_set_moved_to_abspath2(
+ option, preferred_move_target_idx, ctx, iterpool));
+ wc_move_target_chosen = TRUE;
/* Update option description. */
SVN_ERR(build_tree_conflict_options(
@@ -1831,7 +1977,6 @@ resolve_conflict_interactively(svn_boole
svn_cmdline_prompt_baton_t *pb,
svn_cl__conflict_stats_t *conflict_stats,
svn_client_ctx_t *ctx,
- apr_pool_t *result_pool,
apr_pool_t *scratch_pool)
{
svn_boolean_t text_conflicted;
@@ -1865,7 +2010,7 @@ resolve_conflict_interactively(svn_boole
if (props_conflicted->nelts > 0)
SVN_ERR(handle_prop_conflicts(resolved, postponed, quit, &merged_propval,
path_prefix, pb, editor_cmd, config, conflict,
- conflict_stats, ctx, result_pool, scratch_pool));
+ conflict_stats, ctx, scratch_pool, scratch_pool));
if (tree_conflicted)
SVN_ERR(handle_tree_conflict(resolved, postponed, quit, printed_description,
conflict, path_prefix, pb, conflict_stats, ctx,
@@ -1875,14 +2020,12 @@ resolve_conflict_interactively(svn_boole
}
svn_error_t *
-svn_cl__resolve_conflict(svn_boolean_t *resolved,
- svn_boolean_t *quit,
+svn_cl__resolve_conflict(svn_boolean_t *quit,
svn_boolean_t *external_failed,
svn_boolean_t *printed_summary,
svn_client_conflict_t *conflict,
svn_cl__accept_t accept_which,
const char *editor_cmd,
- apr_hash_t *config,
const char *path_prefix,
svn_cmdline_prompt_baton_t *pb,
svn_cl__conflict_stats_t *conflict_stats,
@@ -2006,7 +2149,8 @@ svn_cl__resolve_conflict(svn_boolean_t *
svn_error_t *err;
err = svn_cmdline__edit_file_externally(local_abspath,
- editor_cmd, config,
+ editor_cmd,
+ ctx->config,
scratch_pool);
if (err && (err->apr_err == SVN_ERR_CL_NO_EXTERNAL_EDITOR ||
err->apr_err == SVN_ERR_EXTERNAL_PROGRAM))
@@ -2054,7 +2198,7 @@ svn_cl__resolve_conflict(svn_boolean_t *
err = svn_cl__merge_file_externally(base_abspath, their_abspath,
my_abspath, local_abspath,
- local_abspath, config,
+ local_abspath, ctx->config,
&remains_in_conflict,
scratch_pool);
if (err && (err->apr_err == SVN_ERR_CL_NO_EXTERNAL_MERGE_TOOL ||
@@ -2079,6 +2223,19 @@ svn_cl__resolve_conflict(svn_boolean_t *
}
}
}
+ else if (accept_which == svn_cl__accept_recommended)
+ {
+ svn_client_conflict_option_id_t recommended_id;
+
+ if (tree_conflicted)
+ SVN_ERR(svn_client_conflict_tree_get_details(conflict, ctx,
+ scratch_pool));
+ recommended_id = svn_client_conflict_get_recommended_option_id(conflict);
+ if (recommended_id != svn_client_conflict_option_unspecified)
+ option_id = recommended_id;
+ else
+ option_id = svn_client_conflict_option_postpone;
+ }
else
SVN_ERR_MALFUNCTION();
@@ -2086,23 +2243,27 @@ svn_cl__resolve_conflict(svn_boolean_t *
* option or the option did not apply, then prompt. */
if (option_id == svn_client_conflict_option_unspecified)
{
+ svn_boolean_t resolved = FALSE;
svn_boolean_t postponed = FALSE;
svn_boolean_t printed_description = FALSE;
svn_error_t *err;
+ apr_pool_t *iterpool;
*quit = FALSE;
- while (!*resolved && !postponed && !*quit)
+ iterpool = svn_pool_create(scratch_pool);
+ while (!resolved && !postponed && !*quit)
{
- err = resolve_conflict_interactively(resolved, &postponed, quit,
+ svn_pool_clear(iterpool);
+ err = resolve_conflict_interactively(&resolved, &postponed, quit,
external_failed,
printed_summary,
&printed_description,
conflict,
- editor_cmd, config,
+ editor_cmd, ctx->config,
path_prefix, pb,
conflict_stats, ctx,
- scratch_pool, scratch_pool);
+ iterpool);
if (err && err->apr_err == SVN_ERR_WC_CONFLICT_RESOLVER_FAILURE)
{
/* Conflict resolution has failed. Let the user try again.
@@ -2114,21 +2275,15 @@ svn_cl__resolve_conflict(svn_boolean_t *
}
SVN_ERR(err);
}
+ svn_pool_destroy(iterpool);
}
- else if (option_id == svn_client_conflict_option_postpone)
- {
- *resolved = FALSE;
- }
- else
- {
- SVN_ERR(mark_conflict_resolved(conflict, option_id,
- text_conflicted,
- props_conflicted->nelts > 0 ? "" : NULL,
- tree_conflicted,
- path_prefix, conflict_stats,
- ctx, scratch_pool));
- *resolved = TRUE;
- }
+ else if (option_id != svn_client_conflict_option_postpone)
+ SVN_ERR(mark_conflict_resolved(conflict, option_id,
+ text_conflicted,
+ props_conflicted->nelts > 0 ? "" : NULL,
+ tree_conflicted,
+ path_prefix, conflict_stats,
+ ctx, scratch_pool));
return SVN_NO_ERROR;
}
Modified: subversion/branches/ra-git/subversion/svn/diff-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/ra-git/subversion/svn/diff-cmd.c?rev=1846002&r1=1846001&r2=1846002&view=diff
==============================================================================
--- subversion/branches/ra-git/subversion/svn/diff-cmd.c (original)
+++ subversion/branches/ra-git/subversion/svn/diff-cmd.c Wed Nov 7 12:30:06 2018
@@ -181,6 +181,24 @@ summarize_regular(const svn_client_diff_
return svn_cmdline_fflush(stdout);
}
+svn_error_t *
+svn_cl__get_diff_summary_writer(svn_client_diff_summarize_func_t *func_p,
+ void **baton_p,
+ svn_boolean_t xml,
+ svn_boolean_t ignore_properties,
+ const char *anchor,
+ apr_pool_t *result_pool,
+ apr_pool_t *scratch_pool)
+{
+ struct summarize_baton_t *b = apr_pcalloc(result_pool, sizeof(*b));
+
+ b->anchor = anchor;
+ b->ignore_properties = ignore_properties;
+ *func_p = xml ? summarize_xml : summarize_regular;
+ *baton_p = b;
+ return SVN_NO_ERROR;
+}
+
/* An svn_opt_subcommand_t to handle the 'diff' command.
This implements the `svn_opt_subcommand_t' interface. */
svn_error_t *
@@ -203,9 +221,6 @@ svn_cl__diff(apr_getopt_t *os,
svn_boolean_t ignore_properties =
opt_state->diff.patch_compatible || opt_state->diff.ignore_properties;
int i;
- struct summarize_baton_t summarize_baton;
- const svn_client_diff_summarize_func_t summarize_func =
- (opt_state->xml ? summarize_xml : summarize_regular);
if (opt_state->extensions)
options = svn_cstring_split(opt_state->extensions, " \t\n\r", TRUE, pool);
@@ -448,9 +463,13 @@ svn_cl__diff(apr_getopt_t *os,
if (opt_state->diff.summarize)
{
- summarize_baton.anchor = target1;
- summarize_baton.ignore_properties = ignore_properties;
+ svn_client_diff_summarize_func_t summarize_func;
+ void *summarize_baton;
+ SVN_ERR(svn_cl__get_diff_summary_writer(
+ &summarize_func, &summarize_baton,
+ opt_state->xml, ignore_properties, target1,
+ iterpool, iterpool));
SVN_ERR(svn_client_diff_summarize2(
target1,
&opt_state->start_revision,
@@ -459,11 +478,11 @@ svn_cl__diff(apr_getopt_t *os,
opt_state->depth,
! opt_state->diff.notice_ancestry,
opt_state->changelists,
- summarize_func, &summarize_baton,
+ summarize_func, summarize_baton,
ctx, iterpool));
}
else
- SVN_ERR(svn_client_diff6(
+ SVN_ERR(svn_client_diff7(
options,
target1,
&(opt_state->start_revision),
@@ -479,6 +498,7 @@ svn_cl__diff(apr_getopt_t *os,
ignore_properties,
opt_state->diff.properties_only,
opt_state->diff.use_git_diff_format,
+ TRUE /*pretty_print_mergeinfo*/,
svn_cmdline_output_encoding(pool),
outstream,
errstream,
@@ -501,8 +521,13 @@ svn_cl__diff(apr_getopt_t *os,
if (opt_state->diff.summarize)
{
- summarize_baton.anchor = truepath;
- summarize_baton.ignore_properties = ignore_properties;
+ svn_client_diff_summarize_func_t summarize_func;
+ void *summarize_baton;
+
+ SVN_ERR(svn_cl__get_diff_summary_writer(
+ &summarize_func, &summarize_baton,
+ opt_state->xml, ignore_properties, truepath,
+ iterpool, iterpool));
SVN_ERR(svn_client_diff_summarize_peg2(
truepath,
&peg_revision,
@@ -511,11 +536,11 @@ svn_cl__diff(apr_getopt_t *os,
opt_state->depth,
! opt_state->diff.notice_ancestry,
opt_state->changelists,
- summarize_func, &summarize_baton,
+ summarize_func, summarize_baton,
ctx, iterpool));
}
else
- SVN_ERR(svn_client_diff_peg6(
+ SVN_ERR(svn_client_diff_peg7(
options,
truepath,
&peg_revision,
@@ -531,6 +556,7 @@ svn_cl__diff(apr_getopt_t *os,
ignore_properties,
opt_state->diff.properties_only,
opt_state->diff.use_git_diff_format,
+ TRUE /*pretty_print_mergeinfo*/,
svn_cmdline_output_encoding(pool),
outstream,
errstream,
Modified: subversion/branches/ra-git/subversion/svn/help-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/ra-git/subversion/svn/help-cmd.c?rev=1846002&r1=1846001&r2=1846002&view=diff
==============================================================================
--- subversion/branches/ra-git/subversion/svn/help-cmd.c (original)
+++ subversion/branches/ra-git/subversion/svn/help-cmd.c Wed Nov 7 12:30:06 2018
@@ -148,22 +148,25 @@ svn_cl__help(apr_getopt_t *os,
_("\nThe following authentication credential caches are available:\n\n"));
/*### There is no API to query available providers at run time. */
+ if (config_path)
+ {
#if (defined(WIN32) && !defined(__MINGW32__))
- version_footer =
- svn_stringbuf_create(apr_psprintf(pool, _("%s* Wincrypt cache in %s\n"),
- version_footer->data,
- svn_dirent_local_style(config_path,
- pool)),
- pool);
+ version_footer =
+ svn_stringbuf_create(apr_psprintf(pool, _("%s* Wincrypt cache in %s\n"),
+ version_footer->data,
+ svn_dirent_local_style(config_path,
+ pool)),
+ pool);
#elif !defined(SVN_DISABLE_PLAINTEXT_PASSWORD_STORAGE)
- version_footer =
- svn_stringbuf_create(apr_psprintf(pool, _("%s* Plaintext cache in %s\n"),
- version_footer->data,
- svn_dirent_local_style(config_path,
- pool)),
- pool);
+ version_footer =
+ svn_stringbuf_create(apr_psprintf(pool, _("%s* Plaintext cache in %s\n"),
+ version_footer->data,
+ svn_dirent_local_style(config_path,
+ pool)),
+ pool);
#endif
-#ifdef SVN_HAVE_GNOME_KEYRING
+ }
+#if (defined(SVN_HAVE_GNOME_KEYRING) || defined(SVN_HAVE_LIBSECRET))
svn_stringbuf_appendcstr(version_footer, "* Gnome Keyring\n");
#endif
#ifdef SVN_HAVE_GPG_AGENT
@@ -176,13 +179,13 @@ svn_cl__help(apr_getopt_t *os,
svn_stringbuf_appendcstr(version_footer, "* KWallet (KDE)\n");
#endif
- return svn_opt_print_help4(os,
+ return svn_opt_print_help5(os,
"svn", /* ### erm, derive somehow? */
opt_state ? opt_state->version : FALSE,
opt_state ? opt_state->quiet : FALSE,
opt_state ? opt_state->verbose : FALSE,
version_footer->data,
- help_header, /* already gettext()'d */
+ _(help_header),
svn_cl__cmd_table,
svn_cl__options,
svn_cl__global_options,
Modified: subversion/branches/ra-git/subversion/svn/info-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/ra-git/subversion/svn/info-cmd.c?rev=1846002&r1=1846001&r2=1846002&view=diff
==============================================================================
--- subversion/branches/ra-git/subversion/svn/info-cmd.c (original)
+++ subversion/branches/ra-git/subversion/svn/info-cmd.c Wed Nov 7 12:30:06 2018
@@ -21,6 +21,10 @@
* ====================================================================
*/
+/* We define this here to remove any further warnings about the usage of
+ experimental functions in this file. */
+#define SVN_EXPERIMENTAL
+
/* ==================================================================== */
@@ -45,6 +49,254 @@
/*** Code. ***/
+struct layout_list_baton_t
+{
+ svn_boolean_t checkout;
+ const char *target;
+ const char *target_abspath;
+ svn_boolean_t with_revs;
+ int vs_py_format;
+};
+
+/* Output as 'svn' command-line commands.
+ *
+ * Implements svn_client__layout_func_t
+ */
+static svn_error_t *
+output_svn_command_line(void *layout_baton,
+ const char *local_abspath,
+ const char *repos_root_url,
+ svn_boolean_t not_present,
+ svn_boolean_t url_changed,
+ const char *url,
+ svn_boolean_t revision_changed,
+ svn_revnum_t revision,
+ svn_boolean_t depth_changed,
+ svn_depth_t depth,
+ apr_pool_t *scratch_pool)
+{
+ struct layout_list_baton_t *llb = layout_baton;
+ const char *relpath = svn_dirent_skip_ancestor(llb->target_abspath,
+ local_abspath);
+ const char *cmd;
+ const char *depth_str;
+ const char *url_rev_str;
+
+ depth_str = (depth_changed
+ ? apr_psprintf(scratch_pool, " --set-depth=%s",
+ svn_depth_to_word(depth))
+ : "");
+
+ if (llb->checkout)
+ {
+ cmd = "svn checkout";
+ if (depth != svn_depth_infinity)
+ depth_str = apr_psprintf(scratch_pool,
+ " --depth=%s", svn_depth_to_word(depth));
+ url_rev_str = apr_psprintf(scratch_pool, " %s", url);
+ if (llb->with_revs)
+ url_rev_str = apr_psprintf(scratch_pool, "%s@%ld",
+ url_rev_str, revision);
+ llb->checkout = FALSE;
+ }
+ else if (not_present)
+ {
+ /* Easiest way to create a not present node: update to r0 */
+ cmd = "svn update";
+ url_rev_str = " -r0";
+ }
+ else if (url_changed)
+ {
+ cmd = "svn switch";
+ url_rev_str = apr_psprintf(scratch_pool, " ^/%s",
+ svn_uri_skip_ancestor(repos_root_url,
+ url, scratch_pool));
+ if (llb->with_revs)
+ url_rev_str = apr_psprintf(scratch_pool, "%s@%ld",
+ url_rev_str, revision);
+ }
+ else if (llb->with_revs && revision_changed)
+ {
+ cmd = "svn update";
+ url_rev_str = apr_psprintf(scratch_pool, " -r%ld", revision);
+ }
+ else if (depth_changed)
+ {
+ cmd = "svn update";
+ url_rev_str = "";
+ }
+ else
+ return SVN_NO_ERROR;
+
+ SVN_ERR(svn_cmdline_printf(scratch_pool,
+ "%s%-23s%-10s %s\n",
+ cmd, depth_str, url_rev_str,
+ svn_dirent_local_style(
+ svn_dirent_join(llb->target, relpath,
+ scratch_pool), scratch_pool)));
+
+ return SVN_NO_ERROR;
+}
+
+/* */
+static const char *
+depth_to_viewspec_py(svn_depth_t depth,
+ apr_pool_t *result_pool)
+{
+ switch (depth)
+ {
+ case svn_depth_infinity:
+ return "/**";
+ case svn_depth_immediates:
+ return "/*";
+ case svn_depth_files:
+ return "/~";
+ case svn_depth_empty:
+ return "";
+ case svn_depth_exclude:
+ return "!";
+ default:
+ break;
+ }
+ return NULL;
+}
+
+/* Output in the format used by 'tools/client-side/viewspec.py'
+ *
+ * Implements svn_client__layout_func_t
+ */
+static svn_error_t *
+output_svn_viewspec_py(void *layout_baton,
+ const char *local_abspath,
+ const char *repos_root_url,
+ svn_boolean_t not_present,
+ svn_boolean_t url_changed,
+ const char *url,
+ svn_boolean_t revision_changed,
+ svn_revnum_t revision,
+ svn_boolean_t depth_changed,
+ svn_depth_t depth,
+ apr_pool_t *scratch_pool)
+{
+ struct layout_list_baton_t *llb = layout_baton;
+ const char *relpath = svn_dirent_skip_ancestor(llb->target_abspath,
+ local_abspath);
+ const char *depth_str;
+ const char *rev_str = "";
+ const char *repos_rel_url = "";
+
+ depth_str = ((depth_changed || llb->checkout)
+ ? depth_to_viewspec_py(depth, scratch_pool)
+ : "");
+ if (! llb->with_revs)
+ revision_changed = FALSE;
+ if (revision_changed)
+ rev_str = apr_psprintf(scratch_pool, "@%ld", revision);
+
+ if (llb->checkout)
+ {
+ SVN_ERR(svn_cmdline_printf(scratch_pool,
+ "Format: %d\n"
+ "Url: %s\n",
+ llb->vs_py_format, url));
+ if (llb->with_revs)
+ SVN_ERR(svn_cmdline_printf(scratch_pool,
+ "Revision: %ld\n",
+ revision));
+ SVN_ERR(svn_cmdline_printf(scratch_pool, "\n"));
+ llb->checkout = FALSE;
+
+ if (depth == svn_depth_empty)
+ return SVN_NO_ERROR;
+ if (depth_str[0] == '/')
+ depth_str++;
+ }
+ else if (not_present)
+ {
+ /* Easiest way to create a not present node: update to r0 */
+ if (llb->vs_py_format < 2)
+ return svn_error_createf(SVN_ERR_UNSUPPORTED_FEATURE, NULL,
+ _("svn-viewspec.py format 1 does not support "
+ "the 'not-present' state found at '%s'"),
+ relpath);
+ rev_str = "@0";
+ }
+ else if (url_changed)
+ {
+ if (llb->vs_py_format < 2)
+ return svn_error_createf(SVN_ERR_UNSUPPORTED_FEATURE, NULL,
+ _("svn-viewspec.py format 1 does not support "
+ "the 'switched' state found at '%s'"),
+ relpath);
+ repos_rel_url = svn_uri_skip_ancestor(repos_root_url, url,
+ scratch_pool);
+ repos_rel_url = apr_psprintf(scratch_pool, "^/%s", repos_rel_url);
+ }
+ else if (!(revision_changed || depth_changed))
+ return SVN_NO_ERROR;
+
+ SVN_ERR(svn_cmdline_printf(scratch_pool,
+ "%s%s %s%s\n",
+ relpath, depth_str, repos_rel_url, rev_str));
+
+ return SVN_NO_ERROR;
+}
+
+/*
+ * Call svn_client__layout_list(), using a receiver function decided
+ * by VIEWSPEC.
+ */
+static svn_error_t *
+cl_layout_list(apr_array_header_t *targets,
+ enum svn_cl__viewspec_t viewspec,
+ void *baton,
+ svn_client_ctx_t *ctx,
+ apr_pool_t *scratch_pool)
+{
+ const char *list_path, *list_abspath;
+ struct layout_list_baton_t llb;
+
+ /* Add "." if user passed 0 arguments */
+ svn_opt_push_implicit_dot_target(targets, scratch_pool);
+
+ if (targets->nelts > 1)
+ return svn_error_create(SVN_ERR_CL_ARG_PARSING_ERROR, 0, NULL);
+
+ list_path = APR_ARRAY_IDX(targets, 0, const char *);
+
+ SVN_ERR(svn_cl__check_target_is_local_path(list_path));
+
+ SVN_ERR(svn_dirent_get_absolute(&list_abspath, list_path,
+ scratch_pool));
+
+ llb.checkout = TRUE;
+ llb.target = list_path;
+ llb.target_abspath = list_abspath;
+ llb.with_revs = TRUE;
+
+ switch (viewspec)
+ {
+ case svn_cl__viewspec_classic:
+ /* svn-viewspec.py format */
+ llb.vs_py_format = 2;
+
+ SVN_ERR(svn_client__layout_list(list_abspath,
+ output_svn_viewspec_py, &llb,
+ ctx, scratch_pool));
+ break;
+ case svn_cl__viewspec_svn11:
+ /* svn command-line format */
+ SVN_ERR(svn_client__layout_list(list_abspath,
+ output_svn_command_line, &llb,
+ ctx, scratch_pool));
+ break;
+ default:
+ SVN_ERR_MALFUNCTION();
+ }
+
+ return SVN_NO_ERROR;
+}
+
static svn_error_t *
svn_cl__info_print_time(apr_time_t atime,
const char *desc,
@@ -110,7 +362,9 @@ typedef enum
info_item_last_changed_author,
/* Working copy information */
- info_item_wc_root
+ info_item_wc_root,
+ info_item_schedule,
+ info_item_depth
} info_item_t;
/* Mapping between option keywords and info_item_t. */
@@ -133,7 +387,9 @@ static const info_item_map_t info_item_m
info_item_last_changed_rev },
{ MAKE_STRING("last-changed-date"), info_item_last_changed_date },
{ MAKE_STRING("last-changed-author"), info_item_last_changed_author },
- { MAKE_STRING("wc-root"), info_item_wc_root }
+ { MAKE_STRING("wc-root"), info_item_wc_root },
+ { MAKE_STRING("schedule"), info_item_schedule },
+ { MAKE_STRING("depth"), info_item_depth },
};
#undef MAKE_STRING
@@ -888,6 +1144,20 @@ print_info_item(void *baton,
target_path, pool));
break;
+ case info_item_schedule:
+ SVN_ERR(print_info_item_string(
+ (info->wc_info
+ ? schedule_str(info->wc_info->schedule) : NULL),
+ target_path, pool));
+ break;
+
+ case info_item_depth:
+ SVN_ERR(print_info_item_string(
+ ((info->wc_info && info->kind == svn_node_dir)
+ ? svn_depth_to_word(info->wc_info->depth) : NULL),
+ target_path, pool));
+ break;
+
default:
SVN_ERR_MALFUNCTION();
}
@@ -918,6 +1188,12 @@ svn_cl__info(apr_getopt_t *os,
opt_state->targets,
ctx, FALSE, pool));
+ if (opt_state->viewspec)
+ {
+ SVN_ERR(cl_layout_list(targets, opt_state->viewspec, baton, ctx, pool));
+ return SVN_NO_ERROR;
+ }
+
/* Add "." if user passed 0 arguments. */
svn_opt_push_implicit_dot_target(targets, pool);
Modified: subversion/branches/ra-git/subversion/svn/list-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/ra-git/subversion/svn/list-cmd.c?rev=1846002&r1=1846001&r2=1846002&view=diff
==============================================================================
--- subversion/branches/ra-git/subversion/svn/list-cmd.c (original)
+++ subversion/branches/ra-git/subversion/svn/list-cmd.c Wed Nov 7 12:30:06 2018
@@ -385,14 +385,20 @@ svn_cl__list(apr_getopt_t *os,
apr_array_header_t *pattern_group
= APR_ARRAY_IDX(opt_state->search_patterns, k,
apr_array_header_t *);
+ const char *pattern;
/* Should never fail but ... */
if (pattern_group->nelts != 1)
return svn_error_create(SVN_ERR_CL_ARG_PARSING_ERROR, NULL,
_("'search-and' option is not supported"));
- APR_ARRAY_PUSH(patterns, const char *)
- = APR_ARRAY_IDX(pattern_group, 0, const char *);
+ pattern = APR_ARRAY_IDX(pattern_group, 0, const char *);
+#if defined(WIN32)
+ /* As we currently can't pass glob patterns via the Windows
+ CLI, fall back to sub-string search. */
+ pattern = apr_psprintf(subpool, "*%s*", pattern);
+#endif
+ APR_ARRAY_PUSH(patterns, const char *) = pattern;
}
}
Modified: subversion/branches/ra-git/subversion/svn/log-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/ra-git/subversion/svn/log-cmd.c?rev=1846002&r1=1846001&r2=1846002&view=diff
==============================================================================
--- subversion/branches/ra-git/subversion/svn/log-cmd.c (original)
+++ subversion/branches/ra-git/subversion/svn/log-cmd.c Wed Nov 7 12:30:06 2018
@@ -88,7 +88,7 @@ display_diff(const svn_log_entry_t *log_
end_revision.value.number = log_entry->revision;
SVN_ERR(svn_stream_puts(outstream, "\n"));
- SVN_ERR(svn_client_diff_peg6(diff_options,
+ SVN_ERR(svn_client_diff_peg7(diff_options,
target_path_or_url,
target_peg_revision,
&start_revision, &end_revision,
@@ -102,6 +102,7 @@ display_diff(const svn_log_entry_t *log_
FALSE /* ignore prop diff */,
FALSE /* properties only */,
FALSE /* use git diff format */,
+ TRUE /* pretty_print_mergeinfo */,
svn_cmdline_output_encoding(pool),
outstream,
errstream,
@@ -333,7 +334,7 @@ svn_cl__log_entry_receiver(void *baton,
return SVN_NO_ERROR;
}
- /* ### See http://subversion.tigris.org/issues/show_bug.cgi?id=807
+ /* ### See https://issues.apache.org/jira/browse/SVN-807
for more on the fallback fuzzy conversions below. */
if (author == NULL)
Modified: subversion/branches/ra-git/subversion/svn/merge-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/ra-git/subversion/svn/merge-cmd.c?rev=1846002&r1=1846001&r2=1846002&view=diff
==============================================================================
--- subversion/branches/ra-git/subversion/svn/merge-cmd.c (original)
+++ subversion/branches/ra-git/subversion/svn/merge-cmd.c Wed Nov 7 12:30:06 2018
@@ -182,6 +182,7 @@ conflict_func_merge_cmd(svn_wc_conflict_
case svn_cl__accept_postpone:
case svn_cl__accept_invalid:
case svn_cl__accept_unspecified:
+ case svn_cl__accept_recommended:
/* Postpone or no valid --accept option, postpone the conflict. */
choice = svn_wc_conflict_choose_postpone;
break;
@@ -528,6 +529,7 @@ svn_cl__merge(apr_getopt_t *os,
ctx->conflict_baton2 = b;
}
+retry:
merge_err = run_merge(two_sources_specified,
sourcepath1, peg_revision1,
sourcepath2,
@@ -543,12 +545,34 @@ svn_cl__merge(apr_getopt_t *os,
"fix invalid mergeinfo in target with 'svn propset'"));
}
- /* Run the interactive resolver if conflicts were raised. */
- SVN_ERR(svn_cl__conflict_stats_get_paths(&conflicted_paths, conflict_stats,
- pool, pool));
- if (conflicted_paths)
- SVN_ERR(svn_cl__walk_conflicts(conflicted_paths, conflict_stats,
- opt_state, ctx, pool));
+ if (! opt_state->dry_run)
+ {
+ /* Run the interactive resolver if conflicts were raised. */
+ SVN_ERR(svn_cl__conflict_stats_get_paths(&conflicted_paths,
+ conflict_stats, pool, pool));
+ if (conflicted_paths)
+ {
+ SVN_ERR(svn_cl__walk_conflicts(conflicted_paths, conflict_stats,
+ opt_state, ctx, pool));
+ if (merge_err && svn_error_root_cause(merge_err)->apr_err ==
+ SVN_ERR_WC_FOUND_CONFLICT)
+ {
+ svn_error_t *err;
+
+ /* Check if all conflicts were resolved just now. */
+ err = svn_cl__conflict_stats_get_paths(&conflicted_paths,
+ conflict_stats,
+ pool, pool);
+ if (err)
+ merge_err = svn_error_compose_create(merge_err, err);
+ else if (conflicted_paths == NULL)
+ {
+ svn_error_clear(merge_err);
+ goto retry; /* ### conflicts resolved; continue merging */
+ }
+ }
+ }
+ }
if (!opt_state->quiet)
{
Modified: subversion/branches/ra-git/subversion/svn/notify.c
URL: http://svn.apache.org/viewvc/subversion/branches/ra-git/subversion/svn/notify.c?rev=1846002&r1=1846001&r2=1846002&view=diff
==============================================================================
--- subversion/branches/ra-git/subversion/svn/notify.c (original)
+++ subversion/branches/ra-git/subversion/svn/notify.c Wed Nov 7 12:30:06 2018
@@ -54,6 +54,7 @@ struct notify_baton
svn_boolean_t is_wc_to_repos_copy;
svn_boolean_t sent_first_txdelta;
int in_external;
+ svn_revnum_t progress_revision;
svn_boolean_t had_print_error; /* Used to not keep printing error messages
when we've already had one print error. */
@@ -209,7 +210,7 @@ svn_cl__conflict_stats_get_paths(apr_arr
}
}
- svn_hash_keys(conflicted_paths, all_conflicts, result_pool);
+ SVN_ERR(svn_hash_keys(conflicted_paths, all_conflicts, result_pool));
svn_sort__array(*conflicted_paths, svn_sort_compare_paths);
return SVN_NO_ERROR;
@@ -477,14 +478,27 @@ notify_body(struct notify_baton *nb,
_("Searching tree conflict details for '%s' "
"in repository:\n"),
path_local));
+ nb->progress_revision = 0;
break;
case svn_wc_notify_tree_conflict_details_progress:
- SVN_ERR(svn_cmdline_printf(pool, _("\rChecking r%ld..."), n->revision));
+ /* First printf is to obliterate any previous progress printf,
+ assuming no more than 10 digit revisions. Avoid i18n so the
+ text length is known. We only need to do this if the new
+ revision is 4 digits less than the previous revision but that
+ requires counting digits. Dividing by 1000 works well
+ enough: it triggers when needed, it sometimes triggers when
+ not needed, but in typical cases it doesn't trigger as the
+ revisions don't vary much. */
+ if (n->revision < nb->progress_revision / 1000)
+ SVN_ERR(svn_cmdline_printf(pool, "\rChecking r "));
+ SVN_ERR(svn_cmdline_printf(pool, "\rChecking r%ld...", n->revision));
+ nb->progress_revision = n->revision;
break;
case svn_wc_notify_end_search_tree_conflict_details:
SVN_ERR(svn_cmdline_printf(pool, _(" done\n")));
+ nb->progress_revision = 0;
break;
case svn_wc_notify_add:
@@ -1235,6 +1249,7 @@ svn_cl__get_notifier(svn_wc_notify_func2
nb->is_export = FALSE;
nb->is_wc_to_repos_copy = FALSE;
nb->in_external = 0;
+ nb->progress_revision = 0;
nb->had_print_error = FALSE;
nb->conflict_stats = conflict_stats;
SVN_ERR(svn_dirent_get_absolute(&nb->path_prefix, "", pool));
Modified: subversion/branches/ra-git/subversion/svn/propdel-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/ra-git/subversion/svn/propdel-cmd.c?rev=1846002&r1=1846001&r2=1846002&view=diff
==============================================================================
--- subversion/branches/ra-git/subversion/svn/propdel-cmd.c (original)
+++ subversion/branches/ra-git/subversion/svn/propdel-cmd.c Wed Nov 7 12:30:06 2018
@@ -49,13 +49,13 @@ svn_cl__propdel(apr_getopt_t *os,
{
svn_cl__opt_state_t *opt_state = ((svn_cl__cmd_baton_t *) baton)->opt_state;
svn_client_ctx_t *ctx = ((svn_cl__cmd_baton_t *) baton)->ctx;
- const char *pname, *pname_utf8;
+ const char *pname;
apr_array_header_t *args, *targets;
/* Get the property's name (and a UTF-8 version of that name). */
SVN_ERR(svn_opt_parse_num_args(&args, os, 1, pool));
pname = APR_ARRAY_IDX(args, 0, const char *);
- SVN_ERR(svn_utf_cstring_to_utf8(&pname_utf8, pname, pool));
+ SVN_ERR(svn_utf_cstring_to_utf8(&pname, pname, pool));
/* No need to check svn_prop_name_is_valid for *deleting*
properties, and it may even be useful to allow, in case invalid
properties sneaked through somehow. */
@@ -78,7 +78,7 @@ svn_cl__propdel(apr_getopt_t *os,
&URL, ctx, pool));
/* Let libsvn_client do the real work. */
- SVN_ERR(svn_client_revprop_set2(pname_utf8, NULL, NULL,
+ SVN_ERR(svn_client_revprop_set2(pname, NULL, NULL,
URL, &(opt_state->start_revision),
&rev, FALSE, ctx, pool));
}
@@ -94,7 +94,7 @@ svn_cl__propdel(apr_getopt_t *os,
opt_state->depth = svn_depth_empty;
/* For each target, remove the property PNAME. */
- SVN_ERR(svn_client_propset_local(pname_utf8, NULL, targets,
+ SVN_ERR(svn_client_propset_local(pname, NULL, targets,
opt_state->depth, FALSE,
opt_state->changelists, ctx, pool));
}
Modified: subversion/branches/ra-git/subversion/svn/propedit-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/ra-git/subversion/svn/propedit-cmd.c?rev=1846002&r1=1846001&r2=1846002&view=diff
==============================================================================
--- subversion/branches/ra-git/subversion/svn/propedit-cmd.c (original)
+++ subversion/branches/ra-git/subversion/svn/propedit-cmd.c Wed Nov 7 12:30:06 2018
@@ -47,7 +47,7 @@
/*** Code. ***/
struct commit_info_baton
{
- const char *pname_utf8;
+ const char *pname;
const char *target_local;
};
@@ -60,7 +60,7 @@ commit_info_handler(const svn_commit_inf
SVN_ERR(svn_cmdline_printf(pool,
_("Set new value for property '%s' on '%s'\n"),
- cib->pname_utf8, cib->target_local));
+ cib->pname, cib->target_local));
SVN_ERR(svn_cl__print_commit_info(commit_info, NULL, pool));
return SVN_NO_ERROR;
@@ -74,23 +74,23 @@ svn_cl__propedit(apr_getopt_t *os,
{
svn_cl__opt_state_t *opt_state = ((svn_cl__cmd_baton_t *) baton)->opt_state;
svn_client_ctx_t *ctx = ((svn_cl__cmd_baton_t *) baton)->ctx;
- const char *pname, *pname_utf8;
+ const char *pname;
apr_array_header_t *args, *targets;
/* Validate the input and get the property's name (and a UTF-8
version of that name). */
SVN_ERR(svn_opt_parse_num_args(&args, os, 1, pool));
pname = APR_ARRAY_IDX(args, 0, const char *);
- SVN_ERR(svn_utf_cstring_to_utf8(&pname_utf8, pname, pool));
- if (! svn_prop_name_is_valid(pname_utf8))
+ SVN_ERR(svn_utf_cstring_to_utf8(&pname, pname, pool));
+ if (! svn_prop_name_is_valid(pname))
return svn_error_createf(SVN_ERR_CLIENT_PROPERTY_NAME, NULL,
_("'%s' is not a valid Subversion property name"),
- pname_utf8);
+ pname);
if (!opt_state->force)
- SVN_ERR(svn_cl__check_svn_prop_name(pname_utf8, opt_state->revprop,
+ SVN_ERR(svn_cl__check_svn_prop_name(pname, opt_state->revprop,
svn_cl__prop_use_edit, pool));
- if (opt_state->encoding && !svn_prop_needs_translation(pname_utf8))
+ if (opt_state->encoding && !svn_prop_needs_translation(pname))
return svn_error_create
(SVN_ERR_UNSUPPORTED_FEATURE, NULL,
_("--encoding option applies only to textual"
@@ -120,7 +120,7 @@ svn_cl__propedit(apr_getopt_t *os,
&URL, ctx, pool));
/* Fetch the current property. */
- SVN_ERR(svn_client_revprop_get(pname_utf8, &propval,
+ SVN_ERR(svn_client_revprop_get(pname, &propval,
URL, &(opt_state->start_revision),
&rev, ctx, pool));
@@ -145,13 +145,13 @@ svn_cl__propedit(apr_getopt_t *os,
opt_state->editor_cmd, temp_dir,
propval, "svn-prop",
ctx->config,
- svn_prop_needs_translation(pname_utf8),
+ svn_prop_needs_translation(pname),
opt_state->encoding, pool));
/* ...and re-set the property's value accordingly. */
if (propval)
{
- SVN_ERR(svn_client_revprop_set2(pname_utf8,
+ SVN_ERR(svn_client_revprop_set2(pname,
propval, &original_propval,
URL, &(opt_state->start_revision),
&rev, opt_state->force, ctx, pool));
@@ -160,13 +160,13 @@ svn_cl__propedit(apr_getopt_t *os,
(svn_cmdline_printf
(pool,
_("Set new value for property '%s' on revision %ld\n"),
- pname_utf8, rev));
+ pname, rev));
}
else
{
SVN_ERR(svn_cmdline_printf
(pool, _("No changes to property '%s' on revision %ld\n"),
- pname_utf8, rev));
+ pname, rev));
}
}
else if (opt_state->start_revision.kind != svn_opt_revision_unspecified)
@@ -174,7 +174,7 @@ svn_cl__propedit(apr_getopt_t *os,
return svn_error_createf
(SVN_ERR_CL_ARG_PARSING_ERROR, NULL,
_("Cannot specify revision for editing versioned property '%s'"),
- pname_utf8);
+ pname);
}
else /* operate on a normal, versioned property (not a revprop) */
{
@@ -206,7 +206,7 @@ svn_cl__propedit(apr_getopt_t *os,
SVN_ERR(svn_cl__eat_peg_revisions(&targets, targets, pool));
- cib.pname_utf8 = pname_utf8;
+ cib.pname = pname;
/* For each target, edit the property PNAME. */
for (i = 0; i < targets->nelts; i++)
@@ -234,7 +234,7 @@ svn_cl__propedit(apr_getopt_t *os,
peg_revision.kind = svn_opt_revision_unspecified;
/* Fetch the current property. */
- SVN_ERR(svn_client_propget5(&props, NULL, pname_utf8, abspath_or_url,
+ SVN_ERR(svn_client_propget5(&props, NULL, pname, abspath_or_url,
&peg_revision,
&(opt_state->start_revision),
&base_rev, svn_depth_empty,
@@ -282,7 +282,7 @@ svn_cl__propedit(apr_getopt_t *os,
"svn-prop",
ctx->config,
svn_prop_needs_translation
- (pname_utf8),
+ (pname),
opt_state->encoding,
subpool));
@@ -295,7 +295,7 @@ svn_cl__propedit(apr_getopt_t *os,
{
svn_error_t *err = SVN_NO_ERROR;
- svn_cl__check_boolean_prop_val(pname_utf8, edited_propval->data,
+ svn_cl__check_boolean_prop_val(pname, edited_propval->data,
subpool);
if (ctx->log_msg_func3)
@@ -304,7 +304,7 @@ svn_cl__propedit(apr_getopt_t *os,
subpool));
if (svn_path_is_url(target))
{
- err = svn_client_propset_remote(pname_utf8, edited_propval,
+ err = svn_client_propset_remote(pname, edited_propval,
target, opt_state->force,
base_rev,
opt_state->revprop_table,
@@ -319,9 +319,9 @@ svn_cl__propedit(apr_getopt_t *os,
APR_ARRAY_PUSH(targs, const char *) = target;
SVN_ERR(svn_cl__propset_print_binary_mime_type_warning(
- targs, pname_utf8, propval, subpool));
+ targs, pname, propval, subpool));
- err = svn_client_propset_local(pname_utf8, edited_propval,
+ err = svn_client_propset_local(pname, edited_propval,
targs, svn_depth_empty,
opt_state->force, NULL,
ctx, subpool);
@@ -339,14 +339,14 @@ svn_cl__propedit(apr_getopt_t *os,
if (!svn_path_is_url(target))
SVN_ERR(svn_cmdline_printf(
subpool, _("Set new value for property '%s' on '%s'\n"),
- pname_utf8, target_local));
+ pname, target_local));
}
else
{
SVN_ERR
(svn_cmdline_printf
(subpool, _("No changes to property '%s' on '%s'\n"),
- pname_utf8, target_local));
+ pname, target_local));
}
}
svn_pool_destroy(subpool);
Modified: subversion/branches/ra-git/subversion/svn/propget-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/ra-git/subversion/svn/propget-cmd.c?rev=1846002&r1=1846001&r2=1846002&view=diff
==============================================================================
--- subversion/branches/ra-git/subversion/svn/propget-cmd.c (original)
+++ subversion/branches/ra-git/subversion/svn/propget-cmd.c Wed Nov 7 12:30:06 2018
@@ -137,7 +137,7 @@ print_properties_xml(const char *pname,
return SVN_NO_ERROR;
}
-/* Print the property PNAME_UTF with the value PROPVAL set on ABSPATH_OR_URL
+/* Print the property PNAME with the value PROPVAL set on ABSPATH_OR_URL
to the stream OUT.
If INHERITED_PROPERTY is true then the property described is inherited,
@@ -153,7 +153,7 @@ print_single_prop(svn_string_t *propval,
const char *abspath_or_URL,
const char *wc_path_prefix,
svn_stream_t *out,
- const char *pname_utf8,
+ const char *pname,
svn_boolean_t print_filenames,
svn_boolean_t omit_newline,
svn_boolean_t like_proplist,
@@ -211,14 +211,14 @@ 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);
- svn_hash_sets(hash, pname_utf8, propval);
+ svn_hash_sets(hash, pname, propval);
SVN_ERR(svn_cmdline__print_prop_hash(out, hash, FALSE, scratch_pool));
}
else
{
/* If this is a special Subversion property, it is stored as
UTF8, so convert to the native format. */
- if (svn_prop_needs_translation(pname_utf8))
+ if (svn_prop_needs_translation(pname))
SVN_ERR(svn_subst_detranslate_string(&propval, propval,
TRUE, scratch_pool));
@@ -244,7 +244,7 @@ print_single_prop(svn_string_t *propval,
If IS_URL is true, all paths in PROPS are URLs, else all paths are local
paths.
- PNAME_UTF8 is the property name of all the properties.
+ PNAME is the property name of all the properties.
If PRINT_FILENAMES is true, print the item's path before each property.
@@ -255,7 +255,7 @@ print_single_prop(svn_string_t *propval,
static svn_error_t *
print_properties(svn_stream_t *out,
const char *target_abspath_or_url,
- const char *pname_utf8,
+ const char *pname,
apr_hash_t *props,
apr_array_header_t *inherited_props,
svn_boolean_t print_filenames,
@@ -282,7 +282,7 @@ print_properties(svn_stream_t *out,
iprop->prop_hash));
SVN_ERR(print_single_prop(propval, target_abspath_or_url,
iprop->path_or_url,
- path_prefix, out, pname_utf8,
+ path_prefix, out, pname,
print_filenames, omit_newline,
like_proplist, TRUE, iterpool));
}
@@ -298,7 +298,7 @@ print_properties(svn_stream_t *out,
svn_pool_clear(iterpool);
SVN_ERR(print_single_prop(propval, target_abspath_or_url, filename,
- path_prefix, out, pname_utf8, print_filenames,
+ path_prefix, out, pname, print_filenames,
omit_newline, like_proplist, FALSE,
iterpool));
}
@@ -317,7 +317,7 @@ svn_cl__propget(apr_getopt_t *os,
{
svn_cl__opt_state_t *opt_state = ((svn_cl__cmd_baton_t *) baton)->opt_state;
svn_client_ctx_t *ctx = ((svn_cl__cmd_baton_t *) baton)->ctx;
- const char *pname, *pname_utf8;
+ const char *pname;
apr_array_header_t *args, *targets;
svn_stream_t *out;
svn_boolean_t warned = FALSE;
@@ -328,15 +328,14 @@ svn_cl__propget(apr_getopt_t *os,
_("--verbose cannot be used with --revprop or "
"--no-newline or --xml"));
- /* PNAME is first argument (and PNAME_UTF8 will be a UTF-8 version
- thereof) */
+ /* PNAME is first argument */
SVN_ERR(svn_opt_parse_num_args(&args, os, 1, pool));
pname = APR_ARRAY_IDX(args, 0, const char *);
- SVN_ERR(svn_utf_cstring_to_utf8(&pname_utf8, pname, pool));
- if (! svn_prop_name_is_valid(pname_utf8))
+ SVN_ERR(svn_utf_cstring_to_utf8(&pname, pname, pool));
+ if (! svn_prop_name_is_valid(pname))
return svn_error_createf(SVN_ERR_CLIENT_PROPERTY_NAME, NULL,
_("'%s' is not a valid Subversion property name"),
- pname_utf8);
+ pname);
SVN_ERR(svn_cl__args_to_target_array_print_reserved(&targets, os,
opt_state->targets,
@@ -363,7 +362,7 @@ svn_cl__propget(apr_getopt_t *os,
&URL, ctx, pool));
/* Let libsvn_client do the real work. */
- SVN_ERR(svn_client_revprop_get(pname_utf8, &propval,
+ SVN_ERR(svn_client_revprop_get(pname, &propval,
URL, &(opt_state->start_revision),
&rev, ctx, pool));
@@ -372,7 +371,7 @@ svn_cl__propget(apr_getopt_t *os,
return svn_error_createf(SVN_ERR_PROPERTY_NOT_FOUND, NULL,
_("Property '%s' not found on "
"revision %s"),
- pname_utf8,
+ pname,
svn_opt__revision_to_string(
&opt_state->start_revision,
pool));
@@ -390,7 +389,7 @@ svn_cl__propget(apr_getopt_t *os,
"revprops",
"rev", revstr, SVN_VA_NULL);
- svn_cmdline__print_xml_prop(&sb, pname_utf8, propval, FALSE,
+ svn_cmdline__print_xml_prop(&sb, pname, propval, FALSE,
pool);
svn_xml_make_close_tag(&sb, pool, "revprops");
@@ -405,7 +404,7 @@ svn_cl__propget(apr_getopt_t *os,
/* If this is a special Subversion property, it is stored as
UTF8 and LF, so convert to the native locale and eol-style. */
- if (svn_prop_needs_translation(pname_utf8))
+ if (svn_prop_needs_translation(pname))
SVN_ERR(svn_subst_detranslate_string(&printable_val, propval,
TRUE, pool));
@@ -462,7 +461,7 @@ svn_cl__propget(apr_getopt_t *os,
SVN_ERR(svn_client_propget5(
&props,
opt_state->show_inherited_props ? &inherited_props : NULL,
- pname_utf8, truepath,
+ pname, truepath,
&peg_revision,
&(opt_state->start_revision),
NULL, opt_state->depth,
@@ -491,7 +490,7 @@ svn_cl__propget(apr_getopt_t *os,
svn_error_t *err;
err = svn_error_createf(SVN_ERR_PROPERTY_NOT_FOUND, NULL,
_("Property '%s' not found on '%s'"),
- pname_utf8, target);
+ pname, target);
svn_handle_warning2(stderr, err, "svn: ");
svn_error_clear(err);
warned = TRUE;
@@ -499,12 +498,12 @@ svn_cl__propget(apr_getopt_t *os,
if (opt_state->xml)
SVN_ERR(print_properties_xml(
- pname_utf8, props,
+ pname, props,
opt_state->show_inherited_props ? inherited_props : NULL,
subpool));
else
SVN_ERR(print_properties(
- out, truepath, pname_utf8,
+ out, truepath, pname,
props,
opt_state->show_inherited_props ? inherited_props : NULL,
print_filenames,
Modified: subversion/branches/ra-git/subversion/svn/propset-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/ra-git/subversion/svn/propset-cmd.c?rev=1846002&r1=1846001&r2=1846002&view=diff
==============================================================================
--- subversion/branches/ra-git/subversion/svn/propset-cmd.c (original)
+++ subversion/branches/ra-git/subversion/svn/propset-cmd.c Wed Nov 7 12:30:06 2018
@@ -51,7 +51,7 @@ svn_cl__propset(apr_getopt_t *os,
{
svn_cl__opt_state_t *opt_state = ((svn_cl__cmd_baton_t *) baton)->opt_state;
svn_client_ctx_t *ctx = ((svn_cl__cmd_baton_t *) baton)->ctx;
- const char *pname, *pname_utf8;
+ const char *pname;
svn_string_t *propval = NULL;
svn_boolean_t propval_came_from_cmdline;
apr_array_header_t *args, *targets;
@@ -62,13 +62,13 @@ svn_cl__propset(apr_getopt_t *os,
SVN_ERR(svn_opt_parse_num_args(&args, os,
opt_state->filedata ? 1 : 2, scratch_pool));
pname = APR_ARRAY_IDX(args, 0, const char *);
- SVN_ERR(svn_utf_cstring_to_utf8(&pname_utf8, pname, scratch_pool));
- if (! svn_prop_name_is_valid(pname_utf8))
+ SVN_ERR(svn_utf_cstring_to_utf8(&pname, pname, scratch_pool));
+ if (! svn_prop_name_is_valid(pname))
return svn_error_createf(SVN_ERR_CLIENT_PROPERTY_NAME, NULL,
_("'%s' is not a valid Subversion property name"),
- pname_utf8);
+ pname);
if (!opt_state->force)
- SVN_ERR(svn_cl__check_svn_prop_name(pname_utf8, opt_state->revprop,
+ SVN_ERR(svn_cl__check_svn_prop_name(pname, opt_state->revprop,
svn_cl__prop_use_set, scratch_pool));
/* Get the PROPVAL from either an external file, or from the command
@@ -87,7 +87,7 @@ svn_cl__propset(apr_getopt_t *os,
/* We only want special Subversion property values to be in UTF-8
and LF line endings. All other propvals are taken literally. */
- if (svn_prop_needs_translation(pname_utf8))
+ if (svn_prop_needs_translation(pname))
SVN_ERR(svn_subst_translate_string2(&propval, NULL, NULL, propval,
opt_state->encoding, FALSE,
scratch_pool, scratch_pool));
@@ -120,7 +120,7 @@ svn_cl__propset(apr_getopt_t *os,
&URL, ctx, scratch_pool));
/* Let libsvn_client do the real work. */
- SVN_ERR(svn_client_revprop_set2(pname_utf8, propval, NULL,
+ SVN_ERR(svn_client_revprop_set2(pname, propval, NULL,
URL, &(opt_state->start_revision),
&rev, opt_state->force, ctx,
scratch_pool));
@@ -151,7 +151,7 @@ svn_cl__propset(apr_getopt_t *os,
* must always be explicitly provided when setting a versioned
* property. See
*
- * http://subversion.tigris.org/issues/show_bug.cgi?id=924
+ * https://issues.apache.org/jira/browse/SVN-924
*
* for more details.
*/
@@ -174,17 +174,17 @@ svn_cl__propset(apr_getopt_t *os,
}
SVN_ERR(svn_cl__propset_print_binary_mime_type_warning(targets,
- pname_utf8,
+ pname,
propval,
scratch_pool));
- SVN_ERR(svn_client_propset_local(pname_utf8, propval, targets,
+ SVN_ERR(svn_client_propset_local(pname, propval, targets,
opt_state->depth, opt_state->force,
opt_state->changelists, ctx,
scratch_pool));
if (! opt_state->quiet)
- svn_cl__check_boolean_prop_val(pname_utf8, propval->data, scratch_pool);
+ svn_cl__check_boolean_prop_val(pname, propval->data, scratch_pool);
}
return SVN_NO_ERROR;