You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by st...@apache.org on 2013/02/04 21:48:13 UTC
svn commit: r1442344 [27/39] - in /subversion/branches/fsfs-format7: ./
build/ build/ac-macros/ build/generator/ build/generator/templates/
build/win32/ contrib/client-side/emacs/
contrib/server-side/fsfsfixer/fixer/ contrib/server-side/svncutter/ doc/...
Modified: subversion/branches/fsfs-format7/subversion/svn/blame-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/svn/blame-cmd.c?rev=1442344&r1=1442343&r2=1442344&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/svn/blame-cmd.c (original)
+++ subversion/branches/fsfs-format7/subversion/svn/blame-cmd.c Mon Feb 4 20:48:05 2013
@@ -375,7 +375,9 @@ svn_cl__blame(apr_getopt_t *os,
{
svn_error_clear(err);
SVN_ERR(svn_cmdline_fprintf(stderr, subpool,
- _("Skipping binary file: '%s'\n"),
+ _("Skipping binary file "
+ "(use --force to treat as text): "
+ "'%s'\n"),
target));
}
else if (err->apr_err == SVN_ERR_WC_PATH_NOT_FOUND ||
Modified: subversion/branches/fsfs-format7/subversion/svn/cl.h
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/svn/cl.h?rev=1442344&r1=1442343&r2=1442344&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/svn/cl.h (original)
+++ subversion/branches/fsfs-format7/subversion/svn/cl.h Mon Feb 4 20:48:05 2013
@@ -65,15 +65,11 @@ typedef enum svn_cl__accept_t
svn_cl__accept_working,
/* Resolve the conflicted hunks by choosing the corresponding text
- from the pre-conflict working copy file.
-
- Note: this is a placeholder, not actually implemented in 1.5. */
+ from the pre-conflict working copy file. */
svn_cl__accept_mine_conflict,
/* Resolve the conflicted hunks by choosing the corresponding text
- from the post-conflict base copy file.
-
- Note: this is a placeholder, not actually implemented in 1.5. */
+ from the post-conflict base copy file. */
svn_cl__accept_theirs_conflict,
/* Resolve the conflict by taking the entire pre-conflict working
@@ -186,6 +182,7 @@ typedef struct svn_cl__opt_state_t
{
const char *diff_cmd; /* the external diff command to use */
svn_boolean_t internal_diff; /* override diff_cmd in config file */
+ svn_boolean_t no_diff_added; /* do not show diffs for deleted files */
svn_boolean_t no_diff_deleted; /* do not show diffs for deleted files */
svn_boolean_t show_copies_as_adds; /* do not diff copies with their source */
svn_boolean_t notice_ancestry; /* notice ancestry for diff-y operations */
@@ -288,13 +285,13 @@ svn_opt_subcommand_t
svn_cl__upgrade;
-/* See definition in main.c for documentation. */
+/* See definition in svn.c for documentation. */
extern const svn_opt_subcommand_desc2_t svn_cl__cmd_table[];
-/* See definition in main.c for documentation. */
+/* See definition in svn.c for documentation. */
extern const int svn_cl__global_options[];
-/* See definition in main.c for documentation. */
+/* See definition in svn.c for documentation. */
extern const apr_getopt_option_t svn_cl__options[];
@@ -358,13 +355,18 @@ svn_cl__conflict_func_interactive(svn_wc
apr_pool_t *result_pool,
apr_pool_t *scratch_pool);
-/* Create an return a baton for use with svn_cl__conflict_func_postpone(),
- * allocated in RESULT_POOL. */
+/* Create and return a baton for use with svn_cl__conflict_func_postpone()
+ * and svn_cl__resolve_postponed_conflicts(), allocated in RESULT_POOL.
+ */
void *
svn_cl__get_conflict_func_postpone_baton(apr_pool_t *result_pool);
/* A conflict-resolution callback which postpones all conflicts and
- * remembers conflicted paths in BATON. */
+ * remembers conflicted paths in BATON. BATON must have been obtained
+ * from svn_cl__get_conflict_func_postpone_baton().
+ *
+ * Implements svn_wc_conflict_resolver_func2_t.
+ */
svn_error_t *
svn_cl__conflict_func_postpone(svn_wc_conflict_result_t **result,
const svn_wc_conflict_description2_t *desc,
@@ -372,9 +374,12 @@ svn_cl__conflict_func_postpone(svn_wc_co
apr_pool_t *result_pool,
apr_pool_t *scratch_pool);
-/* Run the interactive conflict resolver, obtained internally from
- * svn_cl__get_conflict_func_interactive(), on any conflicted paths
- * stored in the BATON obtained from svn_cl__get_conflict_func_postpone(). */
+/* Perform conflict resolver on any conflicted paths stored in the BATON
+ * which was obtained from svn_cl__get_conflict_func_postpone_baton().
+ *
+ * The conflict resolution will be interactive if ACCEPT_WHICH is
+ * svn_cl__accept_unspecified.
+ */
svn_error_t *
svn_cl__resolve_postponed_conflicts(void *baton,
svn_depth_t depth,
@@ -462,33 +467,6 @@ svn_cl__print_status_xml(const char *cwd
svn_client_ctx_t *ctx,
apr_pool_t *pool);
-
-/* Print to stdout a hash that maps property names (char *) to property
- values (svn_string_t *). The names are assumed to be in UTF-8 format;
- the values are either in UTF-8 (the special Subversion props) or
- plain binary values.
-
- If OUT is not NULL, then write to it rather than stdout.
-
- If NAMES_ONLY is true, print just names, else print names and
- values. */
-svn_error_t *
-svn_cl__print_prop_hash(svn_stream_t *out,
- apr_hash_t *prop_hash,
- svn_boolean_t names_only,
- apr_pool_t *pool);
-
-/* Similar to svn_cl__print_prop_hash(), only output xml to *OUTSTR.
- If INHERITED_PROPS is true, then PROP_HASH contains inherited properties,
- otherwise PROP_HASH contains explicit properties. If *OUTSTR is NULL,
- allocate it first from POOL, otherwise append to it. */
-svn_error_t *
-svn_cl__print_xml_prop_hash(svn_stringbuf_t **outstr,
- apr_hash_t *prop_hash,
- svn_boolean_t names_only,
- svn_boolean_t inherited_props,
- apr_pool_t *pool);
-
/* Output a commit xml element to *OUTSTR. If *OUTSTR is NULL, allocate it
first from POOL, otherwise append to it. If AUTHOR or DATE is
NULL, it will be omitted. */
@@ -520,60 +498,6 @@ svn_cl__revprop_prepare(const svn_opt_re
svn_client_ctx_t *ctx,
apr_pool_t *pool);
-/* Search for a text editor command in standard environment variables,
- and invoke it to edit CONTENTS (using a temporary file created in
- directory BASE_DIR). Return the new contents in *EDITED_CONTENTS,
- or set *EDITED_CONTENTS to NULL if no edit was performed.
-
- If EDITOR_CMD is not NULL, it is the name of the external editor
- command to use, overriding anything else that might determine the
- editor.
-
- If TMPFILE_LEFT is NULL, the temporary file will be destroyed.
- Else, the file will be left on disk, and its path returned in
- *TMPFILE_LEFT.
-
- CONFIG is a hash of svn_config_t * items keyed on a configuration
- category (SVN_CONFIG_CATEGORY_CONFIG et al), and may be NULL.
-
- If AS_TEXT is TRUE, recode CONTENTS and convert to native eol-style before
- editing and back again afterwards. In this case, ENCODING determines the
- encoding used during editing. If non-NULL, use the named encoding, else
- use the system encoding. If AS_TEXT is FALSE, don't do any translation.
- In that case, ENCODING is ignored.
-
- Use POOL for all allocations. Use PREFIX as the prefix for the
- temporary file used by the editor.
-
- If return error, *EDITED_CONTENTS is not touched. */
-svn_error_t *
-svn_cl__edit_string_externally(svn_string_t **edited_contents,
- const char **tmpfile_left,
- const char *editor_cmd,
- const char *base_dir,
- const svn_string_t *contents,
- const char *prefix,
- apr_hash_t *config,
- svn_boolean_t as_text,
- const char *encoding,
- apr_pool_t *pool);
-
-
-/* Search for a text editor command in standard environment variables,
- and invoke it to edit PATH. Use POOL for all allocations.
-
- If EDITOR_CMD is not NULL, it is the name of the external editor
- command to use, overriding anything else that might determine the
- editor.
-
- CONFIG is a hash of svn_config_t * items keyed on a configuration
- category (SVN_CONFIG_CATEGORY_CONFIG et al), and may be NULL. */
-svn_error_t *
-svn_cl__edit_file_externally(const char *path,
- const char *editor_cmd,
- apr_hash_t *config,
- apr_pool_t *pool);
-
/* Search for a merge tool command in environment variables,
and use it to perform the merge of the four given files.
WC_PATH is the path of the file that is in conflict, relative
@@ -820,15 +744,6 @@ svn_cl__args_to_target_array_print_reser
svn_boolean_t keep_dest_origpath_on_truepath_collision,
apr_pool_t *pool);
-/* Return a string allocated in POOL that is a copy of STR but with each
- * line prefixed with INDENT. A line is all characters up to the first
- * CR-LF, LF-CR, CR or LF, or the end of STR if sooner. */
-const char *
-svn_cl__indent_string(const char *str,
- const char *indent,
- apr_pool_t *pool);
-
-
/* Return a string showing NODE's kind, URL and revision, to the extent that
* that information is available in NODE. If NODE itself is NULL, this prints
* just a 'none' node kind.
@@ -902,6 +817,18 @@ svn_cl__check_related_source_and_target(
svn_client_ctx_t *ctx,
apr_pool_t *pool);
+/* If the user is setting a mime-type to mark one of the TARGETS as binary,
+ * as determined by property name PROPNAME and value PROPVAL, then check
+ * whether Subversion's own binary-file detection recognizes the target as
+ * a binary file. If Subversion doesn't consider the target to be a binary
+ * file, assume the user is making an error and print a warning to inform
+ * the user that some operations might fail on the file in the future. */
+svn_error_t *
+svn_cl__propset_print_binary_mime_type_warning(apr_array_header_t *targets,
+ const char *propname,
+ const svn_string_t *propval,
+ apr_pool_t *scratch_pool);
+
#ifdef __cplusplus
}
#endif /* __cplusplus */
Modified: subversion/branches/fsfs-format7/subversion/svn/conflict-callbacks.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/svn/conflict-callbacks.c?rev=1442344&r1=1442343&r2=1442344&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/svn/conflict-callbacks.c (original)
+++ subversion/branches/fsfs-format7/subversion/svn/conflict-callbacks.c Mon Feb 4 20:48:05 2013
@@ -24,7 +24,6 @@
#include <apr_xlate.h> /* for APR_LOCALE_CHARSET */
-#define APR_WANT_STDIO
#define APR_WANT_STRFUNC
#include <apr_want.h>
@@ -36,10 +35,14 @@
#include "svn_sorts.h"
#include "cl.h"
-#include "tree-conflicts.h"
+#include "cl-conflicts.h"
+
+#include "private/svn_cmdline_private.h"
#include "svn_private_config.h"
+#define ARRAY_LEN(ary) ((sizeof (ary)) / (sizeof ((ary)[0])))
+
struct svn_cl__interactive_conflict_baton_t {
@@ -112,8 +115,8 @@ svn_cl__accept_from_word(const char *wor
}
-/* Print on stdout a diff between the 'base' and 'merged' files, if both of
- * those are available, else between 'their' and 'my' files, of DESC. */
+/* Print on stdout a diff that shows incoming conflicting changes
+ * corresponding to the conflict described in DESC. */
static svn_error_t *
show_diff(const svn_wc_conflict_description2_t *desc,
apr_pool_t *pool)
@@ -123,15 +126,29 @@ show_diff(const svn_wc_conflict_descript
svn_stream_t *output;
svn_diff_file_options_t *options;
- if (desc->merged_file && desc->base_abspath)
+ if (desc->merged_file)
{
- /* Show the conflict markers to the user */
- path1 = desc->base_abspath;
+ /* For conflicts recorded by the 'merge' operation, show a diff between
+ * 'mine' (the working version of the file as it appeared before the
+ * 'merge' operation was run) and 'merged' (the version of the file
+ * 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
+ * file) and 'merged' (the version of the file as it appears with
+ * local changes merged with the new pristine version).
+ *
+ * This way, the diff is always minimal and clearly identifies changes
+ * brought into the working copy by the update/switch/merge operation. */
+ if (desc->operation == svn_wc_operation_merge)
+ path1 = desc->my_abspath;
+ else
+ path1 = desc->their_abspath;
path2 = desc->merged_file;
}
else
{
- /* There's no base file, but we can show the
+ /* There's no merged file, but we can show the
difference between mine and theirs. */
path1 = desc->their_abspath;
path2 = desc->my_abspath;
@@ -203,8 +220,8 @@ open_editor(svn_boolean_t *performed_edi
if (desc->merged_file)
{
- err = svn_cl__edit_file_externally(desc->merged_file, b->editor_cmd,
- b->config, pool);
+ err = svn_cmdline__edit_file_externally(desc->merged_file, b->editor_cmd,
+ b->config, pool);
if (err && (err->apr_err == SVN_ERR_CL_NO_EXTERNAL_EDITOR))
{
svn_error_t *root_err = svn_error_root_cause(err);
@@ -281,6 +298,218 @@ launch_resolver(svn_boolean_t *performed
return SVN_NO_ERROR;
}
+
+/* Maximum line length for the prompt string. */
+#define MAX_PROMPT_WIDTH 70
+
+/* Description of a resolver option */
+typedef struct resolver_option_t
+{
+ const char *code; /* one or two characters */
+ const char *short_desc; /* short description */
+ const char *long_desc; /* longer description (localized) */
+ svn_wc_conflict_choice_t choice; /* or -1 if not a simple choice */
+} resolver_option_t;
+
+/* Resolver options for a text conflict */
+/* (opt->code == "" causes a blank line break in help_string()) */
+static const resolver_option_t text_conflict_options[] =
+{
+ { "e", "edit", N_("change merged file in an editor"), -1 },
+ { "df", "diff-full", N_("show all changes made to merged file"), -1 },
+ { "r", "resolved", N_("accept merged version of file"),
+ svn_wc_conflict_choose_merged },
+ { "" },
+ { "dc", "display-conflict", N_("show all conflicts (ignoring merged version)"), -1 },
+ { "mc", "mine-conflict", N_("accept my version for all conflicts (same)"),
+ svn_wc_conflict_choose_mine_conflict },
+ { "tc", "theirs-conflict", N_("accept their version for all conflicts (same)"),
+ svn_wc_conflict_choose_theirs_conflict },
+ { "" },
+ { "mf", "mine-full", N_("accept my version of entire file (even "
+ "non-conflicts)"),
+ svn_wc_conflict_choose_mine_full },
+ { "tf", "theirs-full", N_("accept their version of entire file (same)"),
+ svn_wc_conflict_choose_theirs_full },
+ { "" },
+ { "p", "postpone", N_("mark the conflict to be resolved later"),
+ svn_wc_conflict_choose_postpone },
+ { "m", "merge", N_("use internal merge tool to resolve conflict"), -1 },
+ { "l", "launch", N_("launch external tool to resolve conflict"), -1 },
+ { "q", "quit", N_("postpone all remaining conflicts"),
+ svn_cl__accept_postpone },
+ { "s", "show all options", N_("show this list (also 'h', '?')"), -1 },
+ { NULL }
+};
+
+/* Resolver options for a property conflict */
+static const resolver_option_t prop_conflict_options[] =
+{
+ { "p", "postpone", N_("mark the conflict to be resolved later"),
+ svn_wc_conflict_choose_postpone },
+ { "mf", "mine-full", N_("accept my version of entire file (even "
+ "non-conflicts)"),
+ svn_wc_conflict_choose_mine_full },
+ { "tf", "theirs-full", N_("accept their version of entire file (same)"),
+ svn_wc_conflict_choose_theirs_full },
+ { "q", "quit", N_("postpone all remaining conflicts"),
+ svn_cl__accept_postpone },
+ { "h", "help", N_("show this help (also '?')"), -1 },
+ { NULL }
+};
+
+/* Resolver options for an obstructued addition */
+static const resolver_option_t obstructed_add_options[] =
+{
+ { "p", "postpone", N_("resolve the conflict later"),
+ svn_wc_conflict_choose_postpone },
+ { "mf", "mine-full", N_("accept pre-existing item (ignore upstream addition)"),
+ svn_wc_conflict_choose_mine_full },
+ { "tf", "theirs-full", N_("accept incoming item (overwrite pre-existing item)"),
+ svn_wc_conflict_choose_theirs_full },
+ { "q", "quit", N_("postpone all remaining conflicts"),
+ svn_cl__accept_postpone },
+ { "h", "help", N_("show this help (also '?')"), -1 },
+ { NULL }
+};
+
+/* Resolver options for a tree conflict */
+static const resolver_option_t tree_conflict_options[] =
+{
+ { "p", "postpone", N_("resolve the conflict later"),
+ svn_wc_conflict_choose_postpone },
+ { "r", "resolved", N_("accept current working copy state"),
+ svn_wc_conflict_choose_merged },
+ { "mc", "mine-conflict", N_("prefer local change"),
+ svn_wc_conflict_choose_mine_conflict },
+ { "tc", "theirs-conflict", N_("prefer incoming change"),
+ svn_wc_conflict_choose_theirs_conflict },
+ { "q", "quit", N_("postpone all remaining conflicts"),
+ svn_cl__accept_postpone },
+ { "h", "help", N_("show this help (also '?')"), -1 },
+ { NULL }
+};
+
+/* Return a pointer to the option description in OPTIONS matching the
+ * one- or two-character OPTION_CODE. Return NULL if not found. */
+static const resolver_option_t *
+find_option(const resolver_option_t *options,
+ const char *option_code)
+{
+ const resolver_option_t *opt;
+
+ for (opt = options; opt->code; opt++)
+ {
+ if (strcmp(opt->code, option_code) == 0)
+ return opt;
+ }
+ return NULL;
+}
+
+/* Return a prompt string listing the options OPTIONS. If OPTION_CODES is
+ * non-null, select only the options whose codes are mentioned in it. */
+static const char *
+prompt_string(const resolver_option_t *options,
+ const char *const *option_codes,
+ apr_pool_t *pool)
+{
+ const char *result = "Select:";
+ int this_line_len = strlen(result);
+ svn_boolean_t first = TRUE;
+
+ while (1)
+ {
+ const resolver_option_t *opt;
+ const char *s;
+
+ if (option_codes)
+ {
+ if (! *option_codes)
+ break;
+ opt = find_option(options, *option_codes++);
+ }
+ else
+ {
+ opt = options++;
+ if (! opt->code)
+ break;
+ }
+
+ if (! first)
+ result = apr_pstrcat(pool, result, ",", (char *)NULL);
+ /* Break the line if adding the next option would make it too long */
+ if ((this_line_len + strlen(opt->short_desc) + 6) > MAX_PROMPT_WIDTH)
+ {
+ result = apr_pstrcat(pool, result, "\n ", (char *)NULL);
+ this_line_len = 7;
+ }
+ s = apr_psprintf(pool, " (%s) %s",
+ opt->code, opt->short_desc);
+ result = apr_pstrcat(pool, result, s, (char *)NULL);
+ this_line_len += strlen(s);
+ first = FALSE;
+ }
+ return apr_pstrcat(pool, result, ": ", (char *)NULL);
+}
+
+/* Return a help string listing the OPTIONS. */
+static const char *
+help_string(const resolver_option_t *options,
+ apr_pool_t *pool)
+{
+ const char *result = "";
+ const resolver_option_t *opt;
+
+ for (opt = options; opt->code; opt++)
+ {
+ /* Append a line describing OPT, or a blank line if its code is "". */
+ if (opt->code[0])
+ {
+ const char *s = apr_psprintf(pool, " (%s)", opt->code);
+
+ result = apr_psprintf(pool, "%s%-6s %-16s - %s\n",
+ result, s, opt->short_desc, opt->long_desc);
+ }
+ else
+ {
+ result = apr_pstrcat(pool, result, "\n", (char *)NULL);
+ }
+ }
+ return result;
+}
+
+/* Prompt the user with CONFLICT_OPTIONS, restricted to the options listed
+ * in OPTIONS_TO_SHOW if that is non-null. Set *OPT to point to the chosen
+ * one of CONFLICT_OPTIONS (not necessarily one of OPTIONS_TO_SHOW), or to
+ * NULL if the answer was not one of them.
+ *
+ * If the answer is the (globally recognized) 'help' option, then display
+ * the help (on stderr) and return with *OPT == NULL.
+ */
+static svn_error_t *
+prompt_user(const resolver_option_t **opt,
+ const resolver_option_t *conflict_options,
+ const char *const *options_to_show,
+ void *prompt_baton,
+ apr_pool_t *scratch_pool)
+{
+ const char *prompt
+ = prompt_string(conflict_options, options_to_show, scratch_pool);
+ const char *answer;
+
+ SVN_ERR(svn_cmdline_prompt_user2(&answer, prompt, prompt_baton, scratch_pool));
+ *opt = find_option(conflict_options, answer);
+
+ if (strcmp(answer, "h") == 0 || strcmp(answer, "?") == 0)
+ {
+ SVN_ERR(svn_cmdline_fprintf(stderr, scratch_pool, "\n%s\n",
+ help_string(conflict_options,
+ scratch_pool)));
+ *opt = NULL;
+ }
+ return SVN_NO_ERROR;
+}
+
/* Ask the user what to do about the text conflict described by DESC.
* Return the answer in RESULT. B is the conflict baton for this
* conflict resolution session.
@@ -291,8 +520,7 @@ handle_text_conflict(svn_wc_conflict_res
svn_cl__interactive_conflict_baton_t *b,
apr_pool_t *scratch_pool)
{
- const char *answer;
- char *prompt;
+ apr_pool_t *iterpool = svn_pool_create(scratch_pool);
svn_boolean_t diff_allowed = FALSE;
/* Have they done something that might have affected the merged
file (so that we need to save a .edited copy)? */
@@ -319,129 +547,60 @@ handle_text_conflict(svn_wc_conflict_res
while (TRUE)
{
- svn_pool_clear(scratch_pool);
+ const char *options[ARRAY_LEN(text_conflict_options)];
+ const char **next_option = options;
+ const resolver_option_t *opt;
- prompt = apr_pstrdup(scratch_pool, _("Select: (p) postpone"));
+ svn_pool_clear(iterpool);
+ *next_option++ = "p";
if (diff_allowed)
{
- prompt = apr_pstrcat(scratch_pool, prompt,
- _(", (df) diff-full, (e) edit, (m) merge"),
- (char *)NULL);
+ *next_option++ = "df";
+ *next_option++ = "e";
+ *next_option++ = "m";
if (knows_something)
- prompt = apr_pstrcat(scratch_pool, prompt, _(", (r) resolved"),
- (char *)NULL);
+ *next_option++ = "r";
if (! desc->is_binary)
- prompt = apr_pstrcat(scratch_pool, prompt,
- _(",\n (mc) mine-conflict, "
- "(tc) theirs-conflict"),
- (char *)NULL);
+ {
+ *next_option++ = "mc";
+ *next_option++ = "tc";
+ }
}
else
{
if (knows_something)
- prompt = apr_pstrcat(scratch_pool, prompt, _(", (r) resolved"),
- (char *)NULL);
- prompt = apr_pstrcat(scratch_pool, prompt,
- _(",\n "
- "(mf) mine-full, (tf) theirs-full"),
- (char *)NULL);
- }
-
- prompt = apr_pstrcat(scratch_pool, prompt, ",\n ", (char *)NULL);
- prompt = apr_pstrcat(scratch_pool, prompt,
- _("(s) show all options: "),
- (char *)NULL);
-
- SVN_ERR(svn_cmdline_prompt_user2(&answer, prompt, b->pb, scratch_pool));
-
- if (strcmp(answer, "s") == 0)
- {
- /* These are used in svn_cl__accept_from_word(). */
- SVN_ERR(svn_cmdline_fprintf(stderr, scratch_pool,
- _("\n"
- " (e) edit - change merged file in an editor\n"
- " (df) diff-full - show all changes made to merged "
- "file\n"
- " (r) resolved - accept merged version of file\n"
- "\n"
- " (dc) display-conflict - show all conflicts "
- "(ignoring merged version)\n"
- " (mc) mine-conflict - accept my version for all "
- "conflicts (same)\n"
- " (tc) theirs-conflict - accept their version for all "
- "conflicts (same)\n"
- "\n"
- " (mf) mine-full - accept my version of entire file "
- "(even non-conflicts)\n"
- " (tf) theirs-full - accept their version of entire "
- "file (same)\n"
- "\n"
- " (p) postpone - mark the conflict to be "
- "resolved later\n"
- " (m) merge - use internal merge tool to "
- "resolve conflict\n"
- " (l) launch - launch external tool to "
- "resolve conflict\n"
- " (s) show all - show this list\n\n")));
- }
- else if (strcmp(answer, "p") == 0 || strcmp(answer, ":-P") == 0)
+ *next_option++ = "r";
+ *next_option++ = "mf";
+ *next_option++ = "tf";
+ }
+ *next_option++ = "s";
+ *next_option++ = NULL;
+
+ SVN_ERR(prompt_user(&opt, text_conflict_options, options, b->pb,
+ iterpool));
+ if (! opt)
+ continue;
+
+ if (strcmp(opt->code, "q") == 0)
{
- /* Do nothing, let file be marked conflicted. */
- result->choice = svn_wc_conflict_choose_postpone;
+ result->choice = opt->choice;
+ b->accept_which = opt->choice;
break;
}
- else if (strcmp(answer, "mc") == 0 || strcmp(answer, "X-)") == 0)
+ else if (strcmp(opt->code, "s") == 0)
{
- if (desc->is_binary)
- {
- SVN_ERR(svn_cmdline_fprintf(stderr, scratch_pool,
- _("Invalid option; cannot choose "
- "based on conflicts in a "
- "binary file.\n\n")));
- continue;
- }
- result->choice = svn_wc_conflict_choose_mine_conflict;
- if (performed_edit)
- result->save_merged = TRUE;
- break;
+ SVN_ERR(svn_cmdline_fprintf(stderr, scratch_pool, "\n%s\n",
+ help_string(text_conflict_options,
+ iterpool)));
}
- else if (strcmp(answer, "tc") == 0 || strcmp(answer, "X-(") == 0)
+ else if (strcmp(opt->code, "dc") == 0)
{
if (desc->is_binary)
{
- SVN_ERR(svn_cmdline_fprintf(stderr, scratch_pool,
- _("Invalid option; cannot choose "
- "based on conflicts in a "
- "binary file.\n\n")));
- continue;
- }
- result->choice = svn_wc_conflict_choose_theirs_conflict;
- if (performed_edit)
- result->save_merged = TRUE;
- break;
- }
- else if (strcmp(answer, "mf") == 0 || strcmp(answer, ":-)") == 0)
- {
- result->choice = svn_wc_conflict_choose_mine_full;
- if (performed_edit)
- result->save_merged = TRUE;
- break;
- }
- else if (strcmp(answer, "tf") == 0 || strcmp(answer, ":-(") == 0)
- {
- result->choice = svn_wc_conflict_choose_theirs_full;
- if (performed_edit)
- result->save_merged = TRUE;
- break;
- }
- else if (strcmp(answer, "dc") == 0)
- {
- if (desc->is_binary)
- {
- SVN_ERR(svn_cmdline_fprintf(stderr, scratch_pool,
+ SVN_ERR(svn_cmdline_fprintf(stderr, iterpool,
_("Invalid option; cannot "
"display conflicts for a "
"binary file.\n\n")));
@@ -450,39 +609,39 @@ handle_text_conflict(svn_wc_conflict_res
else if (! (desc->my_abspath && desc->base_abspath &&
desc->their_abspath))
{
- SVN_ERR(svn_cmdline_fprintf(stderr, scratch_pool,
+ SVN_ERR(svn_cmdline_fprintf(stderr, iterpool,
_("Invalid option; original "
"files not available.\n\n")));
continue;
}
- SVN_ERR(show_conflicts(desc, scratch_pool));
+ SVN_ERR(show_conflicts(desc, iterpool));
knows_something = TRUE;
}
- else if (strcmp(answer, "df") == 0)
+ else if (strcmp(opt->code, "df") == 0)
{
if (! diff_allowed)
{
- SVN_ERR(svn_cmdline_fprintf(stderr, scratch_pool,
+ SVN_ERR(svn_cmdline_fprintf(stderr, iterpool,
_("Invalid option; there's no "
"merged version to diff.\n\n")));
continue;
}
- SVN_ERR(show_diff(desc, scratch_pool));
+ SVN_ERR(show_diff(desc, iterpool));
knows_something = TRUE;
}
- else if (strcmp(answer, "e") == 0 || strcmp(answer, ":-E") == 0)
+ else if (strcmp(opt->code, "e") == 0 || strcmp(opt->code, ":-E") == 0)
{
- SVN_ERR(open_editor(&performed_edit, desc, b, scratch_pool));
+ SVN_ERR(open_editor(&performed_edit, desc, b, iterpool));
if (performed_edit)
knows_something = TRUE;
}
- else if (strcmp(answer, "m") == 0 || strcmp(answer, ":-g") == 0 ||
- strcmp(answer, "=>-") == 0 || strcmp(answer, ":>.") == 0)
+ else if (strcmp(opt->code, "m") == 0 || strcmp(opt->code, ":-g") == 0 ||
+ strcmp(opt->code, "=>-") == 0 || strcmp(opt->code, ":>.") == 0)
{
if (desc->kind != svn_wc_conflict_kind_text)
{
- SVN_ERR(svn_cmdline_fprintf(stderr, scratch_pool,
+ SVN_ERR(svn_cmdline_fprintf(stderr, iterpool,
_("Invalid option; can only "
"resolve text conflicts with "
"the internal merge tool."
@@ -504,41 +663,57 @@ handle_text_conflict(svn_wc_conflict_res
b->editor_cmd,
b->config,
&remains_in_conflict,
- scratch_pool));
+ iterpool));
knows_something = !remains_in_conflict;
}
else
- SVN_ERR(svn_cmdline_fprintf(stderr, scratch_pool,
+ SVN_ERR(svn_cmdline_fprintf(stderr, iterpool,
_("Invalid option.\n\n")));
}
- else if (strcmp(answer, "l") == 0 || strcmp(answer, ":-l") == 0)
+ else if (strcmp(opt->code, "l") == 0 || strcmp(opt->code, ":-l") == 0)
{
if (desc->base_abspath && desc->their_abspath &&
desc->my_abspath && desc->merged_file)
{
- SVN_ERR(launch_resolver(&performed_edit, desc, b, scratch_pool));
+ SVN_ERR(launch_resolver(&performed_edit, desc, b, iterpool));
if (performed_edit)
knows_something = TRUE;
}
else
- SVN_ERR(svn_cmdline_fprintf(stderr, scratch_pool,
+ SVN_ERR(svn_cmdline_fprintf(stderr, iterpool,
_("Invalid option.\n\n")));
}
- else if (strcmp(answer, "r") == 0)
+ else if (opt->choice != -1)
{
+ if ((opt->choice == svn_wc_conflict_choose_mine_conflict
+ || opt->choice == svn_wc_conflict_choose_theirs_conflict)
+ && desc->is_binary)
+ {
+ SVN_ERR(svn_cmdline_fprintf(stderr, iterpool,
+ _("Invalid option; cannot choose "
+ "based on conflicts in a "
+ "binary file.\n\n")));
+ continue;
+ }
+
/* We only allow the user accept the merged version of
the file if they've edited it, or at least looked at
the diff. */
- if (knows_something)
+ if (result->choice == svn_wc_conflict_choose_merged
+ && ! knows_something)
{
- result->choice = svn_wc_conflict_choose_merged;
- break;
+ SVN_ERR(svn_cmdline_fprintf(stderr, iterpool,
+ _("Invalid option.\n\n")));
+ continue;
}
- else
- SVN_ERR(svn_cmdline_fprintf(stderr, scratch_pool,
- _("Invalid option.\n\n")));
+
+ result->choice = opt->choice;
+ if (performed_edit)
+ result->save_merged = TRUE;
+ break;
}
}
+ svn_pool_destroy(iterpool);
return SVN_NO_ERROR;
}
@@ -553,9 +728,6 @@ handle_prop_conflict(svn_wc_conflict_res
svn_cl__interactive_conflict_baton_t *b,
apr_pool_t *scratch_pool)
{
- const char *answer;
- const char *prompt;
- svn_stringbuf_t *prop_reject;
apr_pool_t *iterpool;
SVN_ERR_ASSERT(desc->kind == svn_wc_conflict_kind_property);
@@ -575,6 +747,8 @@ handle_prop_conflict(svn_wc_conflict_res
* ### This needs to be fixed so we can present better options here. */
if (desc->their_abspath)
{
+ svn_stringbuf_t *prop_reject;
+
/* ### The library dumps an svn_string_t into a temp file, and
* ### we read it back from the file into an svn_stringbuf_t here.
* ### That's rather silly. We should be passed svn_string_t's
@@ -596,26 +770,125 @@ handle_prop_conflict(svn_wc_conflict_res
iterpool = svn_pool_create(scratch_pool);
while (TRUE)
{
+ const resolver_option_t *opt;
+
svn_pool_clear(iterpool);
- prompt = _("Select: (p) postpone, (mf) mine-full, (tf) theirs-full: ");
+ SVN_ERR(prompt_user(&opt, prop_conflict_options, NULL, b->pb,
+ iterpool));
+ if (! opt)
+ continue;
+
+ if (strcmp(opt->code, "q") == 0)
+ {
+ result->choice = opt->choice;
+ b->accept_which = opt->choice;
+ break;
+ }
+ else if (opt->choice != -1)
+ {
+ result->choice = opt->choice;
+ break;
+ }
+ }
+ svn_pool_destroy(iterpool);
+
+ return SVN_NO_ERROR;
+}
+
+/* Ask the user what to do about the tree conflict described by DESC.
+ * Return the answer in RESULT. B is the conflict baton for this
+ * conflict resolution session.
+ * SCRATCH_POOL is used for temporary allocations. */
+static svn_error_t *
+handle_tree_conflict(svn_wc_conflict_result_t *result,
+ const svn_wc_conflict_description2_t *desc,
+ svn_cl__interactive_conflict_baton_t *b,
+ apr_pool_t *scratch_pool)
+{
+ const char *readable_desc;
+ apr_pool_t *iterpool;
+
+ SVN_ERR(svn_cl__get_human_readable_tree_conflict_description(
+ &readable_desc, desc, scratch_pool));
+ SVN_ERR(svn_cmdline_fprintf(
+ stderr, scratch_pool,
+ _("Tree conflict on '%s'\n > %s\n"),
+ svn_cl__local_style_skip_ancestor(b->path_prefix,
+ desc->local_abspath,
+ scratch_pool),
+ readable_desc));
+
+ iterpool = svn_pool_create(scratch_pool);
+ while (1)
+ {
+ const resolver_option_t *opt;
+
+ svn_pool_clear(iterpool);
- SVN_ERR(svn_cmdline_prompt_user2(&answer, prompt, b->pb, iterpool));
+ SVN_ERR(prompt_user(&opt, tree_conflict_options, NULL, b->pb,
+ iterpool));
+ if (! opt)
+ continue;
- if (strcmp(answer, "p") == 0 || strcmp(answer, ":-P") == 0)
+ if (strcmp(opt->code, "q") == 0)
{
- /* Do nothing, let property be marked conflicted. */
- result->choice = svn_wc_conflict_choose_postpone;
+ result->choice = opt->choice;
+ b->accept_which = opt->choice;
break;
}
- else if (strcmp(answer, "mf") == 0 || strcmp(answer, ":-)") == 0)
+ else if (opt->choice != -1)
{
- result->choice = svn_wc_conflict_choose_mine_full;
+ result->choice = opt->choice;
break;
}
- else if (strcmp(answer, "tf") == 0 || strcmp(answer, ":-(") == 0)
+ }
+ svn_pool_destroy(iterpool);
+
+ return SVN_NO_ERROR;
+}
+
+/* Ask the user what to do about the obstructed add described by DESC.
+ * Return the answer in RESULT. B is the conflict baton for this
+ * conflict resolution session.
+ * SCRATCH_POOL is used for temporary allocations. */
+static svn_error_t *
+handle_obstructed_add(svn_wc_conflict_result_t *result,
+ const svn_wc_conflict_description2_t *desc,
+ svn_cl__interactive_conflict_baton_t *b,
+ apr_pool_t *scratch_pool)
+{
+ apr_pool_t *iterpool;
+
+ SVN_ERR(svn_cmdline_fprintf(
+ stderr, scratch_pool,
+ _("Conflict discovered when trying to add '%s'.\n"
+ "An object of the same name already exists.\n"),
+ svn_cl__local_style_skip_ancestor(b->path_prefix,
+ desc->local_abspath,
+ scratch_pool)));
+
+ iterpool = svn_pool_create(scratch_pool);
+ while (1)
+ {
+ const resolver_option_t *opt;
+
+ svn_pool_clear(iterpool);
+
+ SVN_ERR(prompt_user(&opt, obstructed_add_options, NULL, b->pb,
+ iterpool));
+ if (! opt)
+ continue;
+
+ if (strcmp(opt->code, "q") == 0)
+ {
+ result->choice = opt->choice;
+ b->accept_which = opt->choice;
+ break;
+ }
+ else if (opt->choice != -1)
{
- result->choice = svn_wc_conflict_choose_theirs_full;
+ result->choice = opt->choice;
break;
}
}
@@ -635,7 +908,6 @@ svn_cl__conflict_func_interactive(svn_wc
{
svn_cl__interactive_conflict_baton_t *b = baton;
svn_error_t *err;
- apr_pool_t *subpool;
/* Start out assuming we're going to postpone the conflict. */
*result = svn_wc_create_conflict_result(svn_wc_conflict_choose_postpone,
@@ -654,6 +926,10 @@ svn_cl__conflict_func_interactive(svn_wc
(*result)->choice = svn_wc_conflict_choose_base;
return SVN_NO_ERROR;
case svn_cl__accept_working:
+ /* If the caller didn't merge the property values, then I guess
+ * 'choose working' means 'choose mine'... */
+ if (! desc->merged_file)
+ (*result)->merged_file = desc->my_abspath;
(*result)->choice = svn_wc_conflict_choose_merged;
return SVN_NO_ERROR;
case svn_cl__accept_mine_conflict:
@@ -677,9 +953,9 @@ svn_cl__conflict_func_interactive(svn_wc
return SVN_NO_ERROR;
}
- err = svn_cl__edit_file_externally(desc->merged_file,
- b->editor_cmd, b->config,
- scratch_pool);
+ err = svn_cmdline__edit_file_externally(desc->merged_file,
+ b->editor_cmd, b->config,
+ scratch_pool);
if (err && (err->apr_err == SVN_ERR_CL_NO_EXTERNAL_EDITOR))
{
SVN_ERR(svn_cmdline_fprintf(stderr, scratch_pool, "%s\n",
@@ -758,7 +1034,6 @@ svn_cl__conflict_func_interactive(svn_wc
/* We're in interactive mode and either the user gave no --accept
option or the option did not apply; let's prompt. */
- subpool = svn_pool_create(scratch_pool);
/* Handle the most common cases, which is either:
@@ -768,9 +1043,9 @@ svn_cl__conflict_func_interactive(svn_wc
if (((desc->node_kind == svn_node_file)
&& (desc->action == svn_wc_conflict_action_edit)
&& (desc->reason == svn_wc_conflict_reason_edited)))
- SVN_ERR(handle_text_conflict(*result, desc, b, subpool));
+ SVN_ERR(handle_text_conflict(*result, desc, b, scratch_pool));
else if (desc->kind == svn_wc_conflict_kind_property)
- SVN_ERR(handle_prop_conflict(*result, desc, b, subpool));
+ SVN_ERR(handle_prop_conflict(*result, desc, b, scratch_pool));
/*
Dealing with obstruction of additions can be tricky. The
@@ -792,122 +1067,19 @@ svn_cl__conflict_func_interactive(svn_wc
*/
else if ((desc->action == svn_wc_conflict_action_add)
&& (desc->reason == svn_wc_conflict_reason_obstructed))
- {
- const char *answer;
- const char *prompt;
-
- SVN_ERR(svn_cmdline_fprintf(
- stderr, subpool,
- _("Conflict discovered when trying to add '%s'.\n"
- "An object of the same name already exists.\n"),
- svn_cl__local_style_skip_ancestor(b->path_prefix,
- desc->local_abspath,
- subpool)));
- prompt = _("Select: (p) postpone, (mf) mine-full, "
- "(tf) theirs-full, (h) help: ");
-
- while (1)
- {
- svn_pool_clear(subpool);
-
- SVN_ERR(svn_cmdline_prompt_user2(&answer, prompt, b->pb, subpool));
-
- if (strcmp(answer, "h") == 0 || strcmp(answer, "?") == 0)
- {
- SVN_ERR(svn_cmdline_fprintf(stderr, subpool,
- _(" (p) postpone - resolve the conflict later\n"
- " (mf) mine-full - accept pre-existing item "
- "(ignore upstream addition)\n"
- " (tf) theirs-full - accept incoming item "
- "(overwrite pre-existing item)\n"
- " (h) help - show this help\n\n")));
- }
- if (strcmp(answer, "p") == 0 || strcmp(answer, ":-P") == 0)
- {
- (*result)->choice = svn_wc_conflict_choose_postpone;
- break;
- }
- if (strcmp(answer, "mf") == 0 || strcmp(answer, ":-)") == 0)
- {
- (*result)->choice = svn_wc_conflict_choose_mine_full;
- break;
- }
- if (strcmp(answer, "tf") == 0 || strcmp(answer, ":-(") == 0)
- {
- (*result)->choice = svn_wc_conflict_choose_theirs_full;
- break;
- }
- }
- }
+ SVN_ERR(handle_obstructed_add(*result, desc, b, scratch_pool));
else if (desc->kind == svn_wc_conflict_kind_tree)
- {
- const char *answer;
- const char *prompt;
- const char *readable_desc;
-
- SVN_ERR(svn_cl__get_human_readable_tree_conflict_description(
- &readable_desc, desc, scratch_pool));
- SVN_ERR(svn_cmdline_fprintf(
- stderr, subpool,
- _("Tree conflict on '%s'\n > %s\n"),
- svn_cl__local_style_skip_ancestor(b->path_prefix,
- desc->local_abspath,
- scratch_pool),
- readable_desc));
-
- prompt = _("Select: (p) postpone, (r) mark-resolved, "
- "(mc) mine-conflict,\n"
- " (tc) theirs-conflict, (h) help: ");
-
- while (1)
- {
- svn_pool_clear(subpool);
-
- SVN_ERR(svn_cmdline_prompt_user2(&answer, prompt, b->pb, subpool));
-
- if (strcmp(answer, "h") == 0 || strcmp(answer, "?") == 0)
- {
- SVN_ERR(svn_cmdline_fprintf(stderr, subpool,
- _(" (p) postpone - resolve the conflict later\n"
- " (r) resolved - accept current working copy state\n"
- " (mc) mine-conflict - prefer local change\n"
- " (tc) theirs-conflict - prefer incoming change\n")));
- }
- if (strcmp(answer, "p") == 0 || strcmp(answer, ":-p") == 0)
- {
- (*result)->choice = svn_wc_conflict_choose_postpone;
- break;
- }
- else if (strcmp(answer, "r") == 0)
- {
- (*result)->choice = svn_wc_conflict_choose_merged;
- break;
- }
- else if (strcmp(answer, "mc") == 0)
- {
- (*result)->choice = svn_wc_conflict_choose_mine_conflict;
- break;
- }
- else if (strcmp(answer, "tc") == 0)
- {
- (*result)->choice = svn_wc_conflict_choose_theirs_conflict;
- break;
- }
- }
- }
+ SVN_ERR(handle_tree_conflict(*result, desc, b, scratch_pool));
else /* other types of conflicts -- do nothing about them. */
{
(*result)->choice = svn_wc_conflict_choose_postpone;
}
- svn_pool_destroy(subpool);
return SVN_NO_ERROR;
}
-/* Implement svn_wc_conflict_resolver_func2_t; postpones all conflicts
- * and remembers conflicted paths in BATON. */
svn_error_t *
svn_cl__conflict_func_postpone(svn_wc_conflict_result_t **result,
const svn_wc_conflict_description2_t *desc,
Modified: subversion/branches/fsfs-format7/subversion/svn/copy-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/svn/copy-cmd.c?rev=1442344&r1=1442343&r2=1442344&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/svn/copy-cmd.c (original)
+++ subversion/branches/fsfs-format7/subversion/svn/copy-cmd.c Mon Feb 4 20:48:05 2013
@@ -68,7 +68,42 @@ svn_cl__copy(apr_getopt_t *os,
svn_opt_revision_t *peg_revision = apr_palloc(pool,
sizeof(*peg_revision));
- SVN_ERR(svn_opt_parse_path(peg_revision, &src, target, pool));
+ err = svn_opt_parse_path(peg_revision, &src, target, pool);
+
+ if (err)
+ {
+ /* Issue #3606: 'svn cp .@HEAD target' gives
+ svn: '@HEAD' is just a peg revision. Maybe try '@HEAD@' instead?
+
+ This is caused by a first round of canonicalization in
+ svn_cl__args_to_target_array_print_reserved(). Undo that in an
+ attempt to fix this issue without revving many apis.
+ */
+ if (*target == '@' && err->apr_err == SVN_ERR_BAD_FILENAME)
+ {
+ svn_error_t *err2;
+
+ err2 = svn_opt_parse_path(peg_revision, &src,
+ apr_pstrcat(pool, ".", target,
+ (const char *)NULL), pool);
+
+ if (err2)
+ {
+ /* Fix attempt failed; return original error */
+ svn_error_clear(err2);
+ }
+ else
+ {
+ /* Error resolved. Use path */
+ svn_error_clear(err);
+ err = NULL;
+ }
+ }
+
+ if (err)
+ return svn_error_trace(err);
+ }
+
source->path = src;
source->revision = &(opt_state->start_revision);
source->peg_revision = peg_revision;
Modified: subversion/branches/fsfs-format7/subversion/svn/diff-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/svn/diff-cmd.c?rev=1442344&r1=1442343&r2=1442344&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/svn/diff-cmd.c (original)
+++ subversion/branches/fsfs-format7/subversion/svn/diff-cmd.c Mon Feb 4 20:48:05 2013
@@ -77,6 +77,12 @@ kind_to_word(svn_client_diff_summarize_k
}
}
+/* Baton for summarize_xml and summarize_regular */
+struct summarize_baton_t
+{
+ const char *anchor;
+};
+
/* Print summary information about a given change as XML, implements the
* svn_client_diff_summarize_func_t interface. The @a baton is a 'char *'
* representing the either the path to the working copy root or the url
@@ -86,9 +92,10 @@ summarize_xml(const svn_client_diff_summ
void *baton,
apr_pool_t *pool)
{
+ struct summarize_baton_t *b = baton;
/* Full path to the object being diffed. This is created by taking the
* baton, and appending the target's relative path. */
- const char *path = *(const char **)baton;
+ const char *path = b->anchor;
svn_stringbuf_t *sb = svn_stringbuf_create_empty(pool);
/* Tack on the target path, so we can differentiate between different parts
@@ -125,7 +132,8 @@ summarize_regular(const svn_client_diff_
void *baton,
apr_pool_t *pool)
{
- const char *path = *(const char **)baton;
+ struct summarize_baton_t *b = baton;
+ const char *path = b->anchor;
/* Tack on the target path, so we can differentiate between different parts
* of the output when we're given multiple targets. */
@@ -176,6 +184,7 @@ 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);
@@ -266,6 +275,17 @@ svn_cl__diff(apr_getopt_t *os,
if (new_rev.kind != svn_opt_revision_unspecified)
opt_state->end_revision = new_rev;
+ if (opt_state->new_target
+ && opt_state->start_revision.kind == svn_opt_revision_unspecified
+ && opt_state->end_revision.kind == svn_opt_revision_unspecified
+ && ! svn_path_is_url(old_target)
+ && ! svn_path_is_url(new_target))
+ {
+ /* We want the arbitrary_nodes_diff instead of just working nodes */
+ opt_state->start_revision.kind = svn_opt_revision_working;
+ opt_state->end_revision.kind = svn_opt_revision_working;
+ }
+
if (opt_state->start_revision.kind == svn_opt_revision_unspecified)
opt_state->start_revision.kind = svn_path_is_url(old_target)
? svn_opt_revision_head : svn_opt_revision_base;
@@ -350,16 +370,20 @@ svn_cl__diff(apr_getopt_t *os,
target2 = svn_dirent_join(new_target, path, iterpool);
if (opt_state->diff.summarize)
- SVN_ERR(svn_client_diff_summarize2
- (target1,
- &opt_state->start_revision,
- target2,
- &opt_state->end_revision,
- opt_state->depth,
- ! opt_state->diff.notice_ancestry,
- opt_state->changelists,
- summarize_func, &target1,
- ctx, iterpool));
+ {
+ summarize_baton.anchor = target1;
+
+ SVN_ERR(svn_client_diff_summarize2(
+ target1,
+ &opt_state->start_revision,
+ target2,
+ &opt_state->end_revision,
+ opt_state->depth,
+ ! opt_state->diff.notice_ancestry,
+ opt_state->changelists,
+ summarize_func, &summarize_baton,
+ ctx, iterpool));
+ }
else
SVN_ERR(svn_client_diff6(
options,
@@ -370,6 +394,7 @@ svn_cl__diff(apr_getopt_t *os,
NULL,
opt_state->depth,
! opt_state->diff.notice_ancestry,
+ opt_state->diff.no_diff_added,
opt_state->diff.no_diff_deleted,
show_copies_as_adds,
opt_state->force,
@@ -397,16 +422,19 @@ svn_cl__diff(apr_getopt_t *os,
? svn_opt_revision_head : svn_opt_revision_working;
if (opt_state->diff.summarize)
- SVN_ERR(svn_client_diff_summarize_peg2
- (truepath,
- &peg_revision,
- &opt_state->start_revision,
- &opt_state->end_revision,
- opt_state->depth,
- ! opt_state->diff.notice_ancestry,
- opt_state->changelists,
- summarize_func, &truepath,
- ctx, iterpool));
+ {
+ summarize_baton.anchor = truepath;
+ SVN_ERR(svn_client_diff_summarize_peg2(
+ truepath,
+ &peg_revision,
+ &opt_state->start_revision,
+ &opt_state->end_revision,
+ opt_state->depth,
+ ! opt_state->diff.notice_ancestry,
+ opt_state->changelists,
+ summarize_func, &summarize_baton,
+ ctx, iterpool));
+ }
else
SVN_ERR(svn_client_diff_peg6(
options,
@@ -417,6 +445,7 @@ svn_cl__diff(apr_getopt_t *os,
NULL,
opt_state->depth,
! opt_state->diff.notice_ancestry,
+ opt_state->diff.no_diff_added,
opt_state->diff.no_diff_deleted,
show_copies_as_adds,
opt_state->force,
Modified: subversion/branches/fsfs-format7/subversion/svn/file-merge.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/svn/file-merge.c?rev=1442344&r1=1442343&r2=1442344&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/svn/file-merge.c (original)
+++ subversion/branches/fsfs-format7/subversion/svn/file-merge.c Mon Feb 4 20:48:05 2013
@@ -37,6 +37,7 @@
#include "svn_private_config.h"
#include "private/svn_utf_private.h"
+#include "private/svn_cmdline_private.h"
#include "private/svn_dep_compat.h"
#if APR_HAVE_SYS_IOCTL_H
@@ -491,8 +492,8 @@ edit_chunk(apr_array_header_t **merged_c
}
SVN_ERR(svn_io_file_flush_to_disk(temp_file, scratch_pool));
- err = svn_cl__edit_file_externally(temp_file_name, editor_cmd,
- config, scratch_pool);
+ err = svn_cmdline__edit_file_externally(temp_file_name, editor_cmd,
+ config, scratch_pool);
if (err && (err->apr_err == SVN_ERR_CL_NO_EXTERNAL_EDITOR))
{
svn_error_t *root_err = svn_error_root_cause(err);
@@ -861,13 +862,13 @@ svn_cl__merge_file(const char *base_path
scratch_pool)));
SVN_ERR(svn_io_file_open(&original_file, base_path,
- APR_READ|APR_BUFFERED|APR_BINARY,
+ APR_READ | APR_BUFFERED,
APR_OS_DEFAULT, scratch_pool));
SVN_ERR(svn_io_file_open(&modified_file, their_path,
- APR_READ|APR_BUFFERED|APR_BINARY,
+ APR_READ | APR_BUFFERED,
APR_OS_DEFAULT, scratch_pool));
SVN_ERR(svn_io_file_open(&latest_file, my_path,
- APR_READ|APR_BUFFERED|APR_BINARY,
+ APR_READ | APR_BUFFERED,
APR_OS_DEFAULT, scratch_pool));
SVN_ERR(svn_io_open_unique_file3(&merged_file, &merged_file_name,
NULL, svn_io_file_del_none,
Modified: subversion/branches/fsfs-format7/subversion/svn/help-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/svn/help-cmd.c?rev=1442344&r1=1442343&r2=1442344&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/svn/help-cmd.c (original)
+++ subversion/branches/fsfs-format7/subversion/svn/help-cmd.c Mon Feb 4 20:48:05 2013
@@ -28,6 +28,7 @@
/*** Includes. ***/
#include "svn_string.h"
+#include "svn_config.h"
#include "svn_error.h"
#include "svn_version.h"
#include "cl.h"
@@ -43,7 +44,8 @@ svn_cl__help(apr_getopt_t *os,
void *baton,
apr_pool_t *pool)
{
- svn_cl__opt_state_t *opt_state;
+ svn_cl__opt_state_t *opt_state = NULL;
+ svn_stringbuf_t *version_footer = NULL;
/* xgettext: the %s is for SVN_VER_NUMBER. */
char help_header_template[] =
@@ -69,14 +71,72 @@ svn_cl__help(apr_getopt_t *os,
const char *ra_desc_start
= _("The following repository access (RA) modules are available:\n\n");
- svn_stringbuf_t *version_footer;
-
if (baton)
- opt_state = ((svn_cl__cmd_baton_t *) baton)->opt_state;
- else
- opt_state = NULL;
+ {
+ svn_cl__cmd_baton_t *const cmd_baton = baton;
+#ifndef SVN_DISABLE_PLAINTEXT_PASSWORD_STORAGE
+ /* Windows never actually stores plaintext passwords, it
+ encrypts the contents using CryptoAPI. ...
+
+ ... If CryptoAPI is available ... but it should be on all
+ versions of Windows that are even remotely interesting two
+ days before the scheduled end of the world, when this comment
+ is being written. */
+# ifndef WIN32
+ svn_boolean_t store_auth_creds =
+ SVN_CONFIG_DEFAULT_OPTION_STORE_AUTH_CREDS;
+ svn_boolean_t store_passwords =
+ SVN_CONFIG_DEFAULT_OPTION_STORE_PASSWORDS;
+ svn_boolean_t store_plaintext_passwords = FALSE;
+ svn_config_t *cfg;
+
+ if (cmd_baton->ctx->config)
+ {
+ cfg = apr_hash_get(cmd_baton->ctx->config,
+ SVN_CONFIG_CATEGORY_CONFIG,
+ APR_HASH_KEY_STRING);
+ if (cfg)
+ {
+ SVN_ERR(svn_config_get_bool(cfg, &store_auth_creds,
+ SVN_CONFIG_SECTION_AUTH,
+ SVN_CONFIG_OPTION_STORE_AUTH_CREDS,
+ store_auth_creds));
+ SVN_ERR(svn_config_get_bool(cfg, &store_passwords,
+ SVN_CONFIG_SECTION_AUTH,
+ SVN_CONFIG_OPTION_STORE_PASSWORDS,
+ store_passwords));
+ }
+ cfg = apr_hash_get(cmd_baton->ctx->config,
+ SVN_CONFIG_CATEGORY_SERVERS,
+ APR_HASH_KEY_STRING);
+ if (cfg)
+ {
+ const char *value;
+ SVN_ERR(svn_config_get_yes_no_ask
+ (cfg, &value,
+ SVN_CONFIG_SECTION_GLOBAL,
+ SVN_CONFIG_OPTION_STORE_PLAINTEXT_PASSWORDS,
+ SVN_CONFIG_DEFAULT_OPTION_STORE_PLAINTEXT_PASSWORDS));
+ if (0 == svn_cstring_casecmp(value, SVN_CONFIG_TRUE))
+ store_plaintext_passwords = TRUE;
+ }
+ }
+
+ if (store_plaintext_passwords && store_auth_creds && store_passwords)
+ {
+ version_footer = svn_stringbuf_create(
+ _("WARNING: Plaintext password storage is enabled!\n\n"),
+ pool);
+ svn_stringbuf_appendcstr(version_footer, ra_desc_start);
+ }
+# endif /* !WIN32 */
+#endif /* !SVN_DISABLE_PLAINTEXT_PASSWORD_STORAGE */
+
+ opt_state = cmd_baton->opt_state;
+ }
- version_footer = svn_stringbuf_create(ra_desc_start, pool);
+ if (!version_footer)
+ version_footer = svn_stringbuf_create(ra_desc_start, pool);
SVN_ERR(svn_ra_print_modules(version_footer, pool));
return svn_opt_print_help4(os,
Modified: subversion/branches/fsfs-format7/subversion/svn/info-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/svn/info-cmd.c?rev=1442344&r1=1442343&r2=1442344&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/svn/info-cmd.c (original)
+++ subversion/branches/fsfs-format7/subversion/svn/info-cmd.c Mon Feb 4 20:48:05 2013
@@ -40,7 +40,7 @@
#include "cl.h"
#include "svn_private_config.h"
-#include "tree-conflicts.h"
+#include "cl-conflicts.h"
/*** Code. ***/
@@ -102,8 +102,22 @@ print_info_xml(void *baton,
"revision", rev_str,
NULL);
+ /* "<url> xx </url>" */
svn_cl__xml_tagged_cdata(&sb, pool, "url", info->URL);
+ if (info->repos_root_URL)
+ {
+ /* "<relative-url> xx </relative-url>" */
+ svn_cl__xml_tagged_cdata(&sb, pool, "relative-url",
+ apr_pstrcat(pool, "^/",
+ svn_path_uri_encode(
+ svn_uri_skip_ancestor(
+ info->repos_root_URL,
+ info->URL, pool),
+ pool),
+ NULL));
+ }
+
if (info->repos_root_URL || info->repos_UUID)
{
/* "<repository>" */
@@ -226,47 +240,7 @@ print_info_xml(void *baton,
APR_ARRAY_IDX(info->wc_info->conflicts, i,
const svn_wc_conflict_description2_t *);
- switch (conflict->kind)
- {
- case svn_wc_conflict_kind_text:
- /* "<conflict>" */
- svn_xml_make_open_tag(&sb, pool, svn_xml_normal, "conflict",
- NULL);
-
- /* "<prev-base-file> xx </prev-base-file>" */
- svn_cl__xml_tagged_cdata(&sb, pool, "prev-base-file",
- conflict->base_abspath);
-
- /* "<prev-wc-file> xx </prev-wc-file>" */
- svn_cl__xml_tagged_cdata(&sb, pool, "prev-wc-file",
- conflict->my_abspath);
-
- /* "<cur-base-file> xx </cur-base-file>" */
- svn_cl__xml_tagged_cdata(&sb, pool, "cur-base-file",
- conflict->their_abspath);
-
- /* "</conflict>" */
- svn_xml_make_close_tag(&sb, pool, "conflict");
- break;
-
- case svn_wc_conflict_kind_property:
- /* "<conflict>" */
- svn_xml_make_open_tag(&sb, pool, svn_xml_normal, "conflict",
- NULL);
-
- /* "<prop-file> xx </prop-file>" */
- svn_cl__xml_tagged_cdata(&sb, pool, "prop-file",
- conflict->their_abspath);
-
- /* "</conflict>" */
- svn_xml_make_close_tag(&sb, pool, "conflict");
- break;
-
- case svn_wc_conflict_kind_tree:
- SVN_ERR(svn_cl__append_tree_conflict_info_xml(sb, conflict,
- pool));
- break;
- }
+ SVN_ERR(svn_cl__append_conflict_info_xml(sb, conflict, pool));
}
}
@@ -308,6 +282,13 @@ print_info(void *baton,
if (info->URL)
SVN_ERR(svn_cmdline_printf(pool, _("URL: %s\n"), info->URL));
+ if (info->URL && info->repos_root_URL)
+ SVN_ERR(svn_cmdline_printf(pool, _("Relative URL: ^/%s\n"),
+ svn_path_uri_encode(
+ svn_uri_skip_ancestor(info->repos_root_URL,
+ info->URL, pool),
+ pool)));
+
if (info->repos_root_URL)
SVN_ERR(svn_cmdline_printf(pool, _("Repository Root: %s\n"),
info->repos_root_URL));
@@ -461,12 +442,10 @@ print_info(void *baton,
for (i = 0; i < info->wc_info->conflicts->nelts; i++)
{
- const svn_wc_conflict_description2_t *conflict =
- APR_ARRAY_IDX(info->wc_info->conflicts, i,
- const svn_wc_conflict_description2_t *);
- const char *desc;
- const char *src_left_version;
- const char *src_right_version;
+ const svn_wc_conflict_description2_t *conflict =
+ APR_ARRAY_IDX(info->wc_info->conflicts, i,
+ const svn_wc_conflict_description2_t *);
+ const char *desc;
switch (conflict->kind)
{
@@ -505,33 +484,45 @@ print_info(void *baton,
svn_cl__get_human_readable_tree_conflict_description(
&desc, conflict, pool));
- src_left_version =
- svn_cl__node_description(conflict->src_left_version,
- info->repos_root_URL, pool);
-
- src_right_version =
- svn_cl__node_description(conflict->src_right_version,
- info->repos_root_URL, pool);
-
SVN_ERR(svn_cmdline_printf(pool, "%s: %s\n",
_("Tree conflict"), desc));
-
- if (src_left_version)
- SVN_ERR(svn_cmdline_printf(pool, " %s: %s\n",
- _("Source left"), /* (1) */
- src_left_version));
- /* (1): Sneaking in a space in "Source left" so that
- * it is the same length as "Source right" while it still
- * starts in the same column. That's just a tiny tweak in
- * the English `svn'. */
-
- if (src_right_version)
- SVN_ERR(svn_cmdline_printf(pool, " %s: %s\n",
- _("Source right"),
- src_right_version));
break;
}
}
+
+ /* We only store one left and right version for all conflicts, which is
+ referenced from all conflicts.
+ Print it after the conflicts to match the 1.6/1.7 output where it is
+ only available for tree conflicts */
+ {
+ const char *src_left_version;
+ const char *src_right_version;
+ const svn_wc_conflict_description2_t *conflict =
+ APR_ARRAY_IDX(info->wc_info->conflicts, 0,
+ const svn_wc_conflict_description2_t *);
+
+ src_left_version =
+ svn_cl__node_description(conflict->src_left_version,
+ info->repos_root_URL, pool);
+
+ src_right_version =
+ svn_cl__node_description(conflict->src_right_version,
+ info->repos_root_URL, pool);
+
+ if (src_left_version)
+ SVN_ERR(svn_cmdline_printf(pool, " %s: %s\n",
+ _("Source left"), /* (1) */
+ src_left_version));
+ /* (1): Sneaking in a space in "Source left" so that
+ * it is the same length as "Source right" while it still
+ * starts in the same column. That's just a tiny tweak in
+ * the English `svn'. */
+
+ if (src_right_version)
+ SVN_ERR(svn_cmdline_printf(pool, " %s: %s\n",
+ _("Source right"),
+ src_right_version));
+ }
}
}
Modified: subversion/branches/fsfs-format7/subversion/svn/list-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/svn/list-cmd.c?rev=1442344&r1=1442343&r2=1442344&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/svn/list-cmd.c (original)
+++ subversion/branches/fsfs-format7/subversion/svn/list-cmd.c Mon Feb 4 20:48:05 2013
@@ -59,7 +59,7 @@ print_dirent(void *baton,
const char *abs_path,
const char *external_parent_url,
const char *external_target,
- apr_pool_t *pool)
+ apr_pool_t *scratch_pool)
{
struct print_baton *pb = baton;
const char *entryname;
@@ -80,7 +80,7 @@ print_dirent(void *baton,
if (strcmp(path, "") == 0)
{
if (dirent->kind == svn_node_file)
- entryname = svn_dirent_basename(abs_path, pool);
+ entryname = svn_dirent_basename(abs_path, scratch_pool);
else if (pb->verbose)
entryname = ".";
else
@@ -97,7 +97,7 @@ print_dirent(void *baton,
|| (strcmp(pb->last_external_parent_url, external_parent_url) != 0
|| strcmp(pb->last_external_target, external_target) != 0))
{
- SVN_ERR(svn_cmdline_printf(pool,
+ SVN_ERR(svn_cmdline_printf(scratch_pool,
_("Listing external '%s'"
" defined on '%s':\n"),
external_target,
@@ -138,12 +138,13 @@ print_dirent(void *baton,
timestr[0] = '\0';
/* we need it in UTF-8. */
- SVN_ERR(svn_utf_cstring_to_utf8(&utf8_timestr, timestr, pool));
+ SVN_ERR(svn_utf_cstring_to_utf8(&utf8_timestr, timestr, scratch_pool));
- sizestr = apr_psprintf(pool, "%" SVN_FILESIZE_T_FMT, dirent->size);
+ sizestr = apr_psprintf(scratch_pool, "%" SVN_FILESIZE_T_FMT,
+ dirent->size);
return svn_cmdline_printf
- (pool, "%7ld %-8.8s %c %10s %12s %s%s\n",
+ (scratch_pool, "%7ld %-8.8s %c %10s %12s %s%s\n",
dirent->created_rev,
dirent->last_author ? dirent->last_author : " ? ",
lock ? 'O' : ' ',
@@ -154,7 +155,7 @@ print_dirent(void *baton,
}
else
{
- return svn_cmdline_printf(pool, "%s%s\n", entryname,
+ return svn_cmdline_printf(scratch_pool, "%s%s\n", entryname,
(dirent->kind == svn_node_dir)
? "/" : "");
}
@@ -171,11 +172,11 @@ print_dirent_xml(void *baton,
const char *abs_path,
const char *external_parent_url,
const char *external_target,
- apr_pool_t *pool)
+ apr_pool_t *scratch_pool)
{
struct print_baton *pb = baton;
const char *entryname;
- svn_stringbuf_t *sb = svn_stringbuf_create_empty(pool);
+ svn_stringbuf_t *sb = svn_stringbuf_create_empty(scratch_pool);
SVN_ERR_ASSERT((external_parent_url == NULL && external_target == NULL) ||
(external_parent_url && external_target));
@@ -183,7 +184,7 @@ print_dirent_xml(void *baton,
if (strcmp(path, "") == 0)
{
if (dirent->kind == svn_node_file)
- entryname = svn_dirent_basename(abs_path, pool);
+ entryname = svn_dirent_basename(abs_path, scratch_pool);
else
/* Don't bother to list if no useful information will be shown. */
return SVN_NO_ERROR;
@@ -205,11 +206,11 @@ print_dirent_xml(void *baton,
{
/* The external item being listed is different from the previous
one, so close the tag. */
- svn_xml_make_close_tag(&sb, pool, "external");
+ svn_xml_make_close_tag(&sb, scratch_pool, "external");
pb->in_external = FALSE;
}
- svn_xml_make_open_tag(&sb, pool, svn_xml_normal, "external",
+ svn_xml_make_open_tag(&sb, scratch_pool, svn_xml_normal, "external",
"parent_url", external_parent_url,
"target", external_target,
NULL);
@@ -220,46 +221,46 @@ print_dirent_xml(void *baton,
}
}
- svn_xml_make_open_tag(&sb, pool, svn_xml_normal, "entry",
+ svn_xml_make_open_tag(&sb, scratch_pool, svn_xml_normal, "entry",
"kind", svn_cl__node_kind_str_xml(dirent->kind),
NULL);
- svn_cl__xml_tagged_cdata(&sb, pool, "name", entryname);
+ svn_cl__xml_tagged_cdata(&sb, scratch_pool, "name", entryname);
if (dirent->kind == svn_node_file)
{
svn_cl__xml_tagged_cdata
- (&sb, pool, "size",
- apr_psprintf(pool, "%" SVN_FILESIZE_T_FMT, dirent->size));
+ (&sb, scratch_pool, "size",
+ apr_psprintf(scratch_pool, "%" SVN_FILESIZE_T_FMT, dirent->size));
}
- svn_xml_make_open_tag(&sb, pool, svn_xml_normal, "commit",
+ svn_xml_make_open_tag(&sb, scratch_pool, svn_xml_normal, "commit",
"revision",
- apr_psprintf(pool, "%ld", dirent->created_rev),
+ apr_psprintf(scratch_pool, "%ld", dirent->created_rev),
NULL);
- svn_cl__xml_tagged_cdata(&sb, pool, "author", dirent->last_author);
+ svn_cl__xml_tagged_cdata(&sb, scratch_pool, "author", dirent->last_author);
if (dirent->time)
- svn_cl__xml_tagged_cdata(&sb, pool, "date",
- svn_time_to_cstring(dirent->time, pool));
- svn_xml_make_close_tag(&sb, pool, "commit");
+ svn_cl__xml_tagged_cdata(&sb, scratch_pool, "date",
+ svn_time_to_cstring(dirent->time, scratch_pool));
+ svn_xml_make_close_tag(&sb, scratch_pool, "commit");
if (lock)
{
- svn_xml_make_open_tag(&sb, pool, svn_xml_normal, "lock", NULL);
- svn_cl__xml_tagged_cdata(&sb, pool, "token", lock->token);
- svn_cl__xml_tagged_cdata(&sb, pool, "owner", lock->owner);
- svn_cl__xml_tagged_cdata(&sb, pool, "comment", lock->comment);
- svn_cl__xml_tagged_cdata(&sb, pool, "created",
+ svn_xml_make_open_tag(&sb, scratch_pool, svn_xml_normal, "lock", NULL);
+ svn_cl__xml_tagged_cdata(&sb, scratch_pool, "token", lock->token);
+ svn_cl__xml_tagged_cdata(&sb, scratch_pool, "owner", lock->owner);
+ svn_cl__xml_tagged_cdata(&sb, scratch_pool, "comment", lock->comment);
+ svn_cl__xml_tagged_cdata(&sb, scratch_pool, "created",
svn_time_to_cstring(lock->creation_date,
- pool));
+ scratch_pool));
if (lock->expiration_date != 0)
- svn_cl__xml_tagged_cdata(&sb, pool, "expires",
+ svn_cl__xml_tagged_cdata(&sb, scratch_pool, "expires",
svn_time_to_cstring
- (lock->expiration_date, pool));
- svn_xml_make_close_tag(&sb, pool, "lock");
+ (lock->expiration_date, scratch_pool));
+ svn_xml_make_close_tag(&sb, scratch_pool, "lock");
}
- svn_xml_make_close_tag(&sb, pool, "entry");
+ svn_xml_make_close_tag(&sb, scratch_pool, "entry");
return svn_cl__error_checked_fputs(sb->data, stdout);
}
@@ -416,11 +417,8 @@ svn_cl__list(apr_getopt_t *os,
SVN_ERR(svn_cl__xml_print_footer("lists", pool));
if (seen_nonexistent_target)
- {
- err = svn_error_create(SVN_ERR_ILLEGAL_TARGET, NULL,
- _("Could not list all targets because some targets don't exist"));
- return svn_error_compose_create(externals_err, err);
- }
- else
- return svn_error_compose_create(externals_err, err);
+ err = svn_error_create(SVN_ERR_ILLEGAL_TARGET, NULL,
+ _("Could not list all targets because some targets don't exist"));
+
+ return svn_error_compose_create(externals_err, err);
}
Modified: subversion/branches/fsfs-format7/subversion/svn/log-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/svn/log-cmd.c?rev=1442344&r1=1442343&r2=1442344&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/svn/log-cmd.c (original)
+++ subversion/branches/fsfs-format7/subversion/svn/log-cmd.c Mon Feb 4 20:48:05 2013
@@ -21,9 +21,6 @@
* ====================================================================
*/
-#define APR_WANT_STRFUNC
-#define APR_WANT_STDIO
-#include <apr_want.h>
#include <apr_fnmatch.h>
#include "svn_client.h"
@@ -39,6 +36,8 @@
#include "svn_props.h"
#include "svn_pools.h"
+#include "private/svn_cmdline_private.h"
+
#include "cl.h"
#include "svn_private_config.h"
@@ -129,13 +128,14 @@ display_diff(const svn_log_entry_t *log_
&start_revision, &end_revision,
NULL,
depth,
- FALSE, /* ignore ancestry */
- TRUE, /* no diff deleted */
- FALSE, /* show copies as adds */
- FALSE, /* ignore content type */
- FALSE, /* ignore prop diff */
- FALSE, /* properties only */
- FALSE, /* use git diff format */
+ FALSE /* ignore ancestry */,
+ FALSE /* no diff added */,
+ TRUE /* no diff deleted */,
+ FALSE /* show copies as adds */,
+ FALSE /* ignore content type */,
+ FALSE /* ignore prop diff */,
+ FALSE /* properties only */,
+ FALSE /* use git diff format */,
svn_cmdline_output_encoding(pool),
outstream,
errstream,
@@ -653,9 +653,9 @@ log_entry_receiver_xml(void *baton,
if (log_entry->revprops && apr_hash_count(log_entry->revprops) > 0)
{
svn_xml_make_open_tag(&sb, pool, svn_xml_normal, "revprops", NULL);
- SVN_ERR(svn_cl__print_xml_prop_hash(&sb, log_entry->revprops,
- FALSE, /* name_only */
- FALSE, pool));
+ SVN_ERR(svn_cmdline__print_xml_prop_hash(&sb, log_entry->revprops,
+ FALSE, /* name_only */
+ FALSE, pool));
svn_xml_make_close_tag(&sb, pool, "revprops");
}