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 2010/05/27 14:24:26 UTC
svn commit: r948802 - in /subversion/trunk/subversion: include/svn_client.h
libsvn_client/deprecated.c libsvn_client/diff.c svn/diff-cmd.c
svn/log-cmd.c svn/main.c
Author: stylesen
Date: Thu May 27 12:24:25 2010
New Revision: 948802
URL: http://svn.apache.org/viewvc?rev=948802&view=rev
Log:
Follow up r948785.
Solve issue #3071 with simple and cleaner approach without revving the
diff APIs.
* subversion/include/svn_client.h
(svn_client_diff5, svn_client_diff_peg5): Remove the parameter added
for --force-internal-diff
* subversion/svn/diff-cmd.c
(svn_cl__diff): Adjust for above change.
* subversion/svn/log-cmd.c
(log_entry_receiver): Adjust for above change.
* subversion/svn/main.c
(main): Set config option of diff command to NULL if the user wants
to force internal diff.
* subversion/libsvn_client/deprecated.c
(svn_client_diff4, svn_client_diff_peg4): Do not pass the extra
argument for diff APIs.
* subversion/libsvn_client/diff.c
(set_up_diff_cmd_and_options): Remove the extra argument and related
logic.
(svn_client_diff5, svn_client_diff_peg5): Remove the extra argument.
Suggested by: rhuijben
Modified:
subversion/trunk/subversion/include/svn_client.h
subversion/trunk/subversion/libsvn_client/deprecated.c
subversion/trunk/subversion/libsvn_client/diff.c
subversion/trunk/subversion/svn/diff-cmd.c
subversion/trunk/subversion/svn/log-cmd.c
subversion/trunk/subversion/svn/main.c
Modified: subversion/trunk/subversion/include/svn_client.h
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/include/svn_client.h?rev=948802&r1=948801&r2=948802&view=diff
==============================================================================
--- subversion/trunk/subversion/include/svn_client.h (original)
+++ subversion/trunk/subversion/include/svn_client.h Thu May 27 12:24:25 2010
@@ -2335,9 +2335,6 @@ svn_client_blame(const char *path_or_url
* If @a no_diff_deleted is TRUE, then no diff output will be
* generated on deleted files.
*
- * If @a force_internal_diff is TRUE, then diff-cmd specified in config file
- * will be overriden and subversion internal diff logic is used.
- *
* If @a show_copies_as_adds is TRUE, then copied files will not be diffed
* against their copyfrom source, and will appear in the diff output
* in their entirety, as if they were newly added.
@@ -2382,7 +2379,6 @@ svn_client_diff5(const apr_array_header_
svn_depth_t depth,
svn_boolean_t ignore_ancestry,
svn_boolean_t no_diff_deleted,
- svn_boolean_t force_internal_diff,
svn_boolean_t show_copies_as_adds,
svn_boolean_t ignore_content_type,
const char *header_encoding,
@@ -2516,7 +2512,6 @@ svn_client_diff_peg5(const apr_array_hea
svn_depth_t depth,
svn_boolean_t ignore_ancestry,
svn_boolean_t no_diff_deleted,
- svn_boolean_t force_internal_diff,
svn_boolean_t show_copies_as_adds,
svn_boolean_t ignore_content_type,
const char *header_encoding,
Modified: subversion/trunk/subversion/libsvn_client/deprecated.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/deprecated.c?rev=948802&r1=948801&r2=948802&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/deprecated.c (original)
+++ subversion/trunk/subversion/libsvn_client/deprecated.c Thu May 27 12:24:25 2010
@@ -637,7 +637,7 @@ svn_client_diff4(const apr_array_header_
{
return svn_client_diff5(options, path1, revision1, path2,
revision2, relative_to_dir, depth,
- ignore_ancestry, no_diff_deleted, FALSE, FALSE,
+ ignore_ancestry, no_diff_deleted, FALSE,
ignore_content_type, header_encoding,
outfile, errfile, changelists, ctx, pool);
}
@@ -734,7 +734,6 @@ svn_client_diff_peg4(const apr_array_hea
ignore_ancestry,
no_diff_deleted,
FALSE,
- FALSE,
ignore_content_type,
header_encoding,
outfile,
Modified: subversion/trunk/subversion/libsvn_client/diff.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/diff.c?rev=948802&r1=948801&r2=948802&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/diff.c (original)
+++ subversion/trunk/subversion/libsvn_client/diff.c Thu May 27 12:24:25 2010
@@ -1594,32 +1594,30 @@ do_diff_summarize(const struct diff_para
/* Initialize DIFF_CMD_BATON.diff_cmd and DIFF_CMD_BATON.options,
* according to OPTIONS and CONFIG. CONFIG may be null.
- * If FORCE_INTERNAL_DIFF is true then make use of subversion's builtin
- * diff functionality.
* Allocate the fields in POOL, which should be at least as long-lived
* as the pool DIFF_CMD_BATON itself is allocated in.
*/
static svn_error_t *
set_up_diff_cmd_and_options(struct diff_cmd_baton *diff_cmd_baton,
const apr_array_header_t *options,
- apr_hash_t *config,
- svn_boolean_t force_internal_diff,
- apr_pool_t *pool)
+ apr_hash_t *config, apr_pool_t *pool)
{
const char *diff_cmd = NULL;
- diff_cmd_baton->diff_cmd = NULL;
-
- /* See if there is a command only if force_internal_diff is false. */
- if (! force_internal_diff && config)
+
+ /* See if there is a command. */
+ if (config)
{
svn_config_t *cfg = apr_hash_get(config, SVN_CONFIG_CATEGORY_CONFIG,
APR_HASH_KEY_STRING);
svn_config_get(cfg, &diff_cmd, SVN_CONFIG_SECTION_HELPERS,
SVN_CONFIG_OPTION_DIFF_CMD, NULL);
- if (diff_cmd)
- SVN_ERR(svn_path_cstring_to_utf8(&diff_cmd_baton->diff_cmd, diff_cmd,
- pool));
}
+
+ if (diff_cmd)
+ SVN_ERR(svn_path_cstring_to_utf8(&diff_cmd_baton->diff_cmd, diff_cmd,
+ pool));
+ else
+ diff_cmd_baton->diff_cmd = NULL;
/* If there was a command, arrange options to pass to it. */
if (diff_cmd_baton->diff_cmd)
@@ -1694,7 +1692,6 @@ svn_client_diff5(const apr_array_header_
svn_depth_t depth,
svn_boolean_t ignore_ancestry,
svn_boolean_t no_diff_deleted,
- svn_boolean_t force_internal_diff,
svn_boolean_t show_copies_as_adds,
svn_boolean_t ignore_content_type,
const char *header_encoding,
@@ -1739,8 +1736,8 @@ svn_client_diff5(const apr_array_header_
diff_cmd_baton.orig_path_1 = path1;
diff_cmd_baton.orig_path_2 = path2;
- SVN_ERR(set_up_diff_cmd_and_options(&diff_cmd_baton, options, ctx->config,
- force_internal_diff, pool));
+ SVN_ERR(set_up_diff_cmd_and_options(&diff_cmd_baton, options,
+ ctx->config, pool));
diff_cmd_baton.pool = pool;
diff_cmd_baton.outfile = outfile;
diff_cmd_baton.errfile = errfile;
@@ -1765,7 +1762,6 @@ svn_client_diff_peg5(const apr_array_hea
svn_depth_t depth,
svn_boolean_t ignore_ancestry,
svn_boolean_t no_diff_deleted,
- svn_boolean_t force_internal_diff,
svn_boolean_t show_copies_as_adds,
svn_boolean_t ignore_content_type,
const char *header_encoding,
@@ -1806,8 +1802,8 @@ svn_client_diff_peg5(const apr_array_hea
diff_cmd_baton.orig_path_1 = path;
diff_cmd_baton.orig_path_2 = path;
- SVN_ERR(set_up_diff_cmd_and_options(&diff_cmd_baton, options, ctx->config,
- force_internal_diff, pool));
+ SVN_ERR(set_up_diff_cmd_and_options(&diff_cmd_baton, options,
+ ctx->config, pool));
diff_cmd_baton.pool = pool;
diff_cmd_baton.outfile = outfile;
diff_cmd_baton.errfile = errfile;
Modified: subversion/trunk/subversion/svn/diff-cmd.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/svn/diff-cmd.c?rev=948802&r1=948801&r2=948802&view=diff
==============================================================================
--- subversion/trunk/subversion/svn/diff-cmd.c (original)
+++ subversion/trunk/subversion/svn/diff-cmd.c Thu May 27 12:24:25 2010
@@ -348,7 +348,6 @@ svn_cl__diff(apr_getopt_t *os,
opt_state->depth,
! opt_state->notice_ancestry,
opt_state->no_diff_deleted,
- opt_state->force_internal_diff,
opt_state->show_copies_as_adds,
opt_state->force,
svn_cmdline_output_encoding(pool),
@@ -393,7 +392,6 @@ svn_cl__diff(apr_getopt_t *os,
opt_state->depth,
! opt_state->notice_ancestry,
opt_state->no_diff_deleted,
- opt_state->force_internal_diff,
opt_state->show_copies_as_adds,
opt_state->force,
svn_cmdline_output_encoding(pool),
Modified: subversion/trunk/subversion/svn/log-cmd.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/svn/log-cmd.c?rev=948802&r1=948801&r2=948802&view=diff
==============================================================================
--- subversion/trunk/subversion/svn/log-cmd.c (original)
+++ subversion/trunk/subversion/svn/log-cmd.c Thu May 27 12:24:25 2010
@@ -302,7 +302,6 @@ log_entry_receiver(void *baton,
svn_depth_infinity,
FALSE, /* ignore ancestry */
TRUE, /* no diff deleted */
- FALSE, /* override diff-cmd */
FALSE, /* show copies as adds */
FALSE, /* ignore content type */
svn_cmdline_output_encoding(pool),
@@ -335,7 +334,6 @@ log_entry_receiver(void *baton,
svn_depth_infinity,
FALSE, /* ignore ancestry */
TRUE, /* no diff deleted */
- FALSE, /* override diff-cmd */
FALSE, /* show copies as adds */
FALSE, /* ignore content type */
svn_cmdline_output_encoding(iterpool),
Modified: subversion/trunk/subversion/svn/main.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/svn/main.c?rev=948802&r1=948801&r2=948802&view=diff
==============================================================================
--- subversion/trunk/subversion/svn/main.c (original)
+++ subversion/trunk/subversion/svn/main.c Thu May 27 12:24:25 2010
@@ -2116,6 +2116,9 @@ main(int argc, const char *argv[])
if (opt_state.merge_cmd)
svn_config_set(cfg_config, SVN_CONFIG_SECTION_HELPERS,
SVN_CONFIG_OPTION_DIFF3_CMD, opt_state.merge_cmd);
+ if (opt_state.force_internal_diff)
+ svn_config_set(cfg_config, SVN_CONFIG_SECTION_HELPERS,
+ SVN_CONFIG_OPTION_DIFF_CMD, NULL);
/* Check for mutually exclusive args --auto-props and --no-auto-props */
if (opt_state.autoprops && opt_state.no_autoprops)