[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: [PATCH] issue #3071: allow built-in diff to be specified as diff-cmd

From: Daniel Danger Bentley <dtbentley_at_gmail.com>
Date: Mon, 24 Mar 2008 05:05:06 -0400

Ping.

Is there something I can do to help this process along or that I forgot to
do initially? Should I pick a reviewer based on revision history?

Thanks,
-Dan

On Fri, Mar 21, 2008 at 7:42 AM, Daniel Danger Bentley <dtbentley_at_gmail.com>
wrote:

> This is my first attempt to change svn; so please tell me if I did
> anything not-up-to-snuff. I would love to snuff-up.
>
> (BTW, I made this patch with my svn built with this change applied, which
> felt a lot better than running an external program that I'm *pretty sure*
> has the same semantics...)
>
> -Dan Bentley
>
> P.S. One potential objection I could imagine is that this breaks
> parallelism with other options in the "[helpers]" section. Should I expand
> the scope of this patch to fix up every such use of editor-cmd and diff3-cmd
> as well?
>
> [[[
> Fix issue #3071: enhancement to svn diff to indicate that an external
> diff-cmd should NOT be used
>
> * subversion/libsvn_client/diff.c
> (diff_content_changed): Changed to use "" to mean "use built-in diff".
> This allows a default in config to be overridden on command line.
>
> * subversion/svn/main.c:
> (svn_cl__options): Document new meaning of empty string in diff-cmd
> option.
>
> Patch by: Dan Bentley <subversion_at_danbentley.com>
> ]]]
>
> Index: subversion/libsvn_client/diff.c
> ===================================================================
> --- subversion/libsvn_client/diff.c (revision 29979)
> +++ subversion/libsvn_client/diff.c (working copy)
> @@ -566,10 +566,12 @@
> SVN_CONFIG_CATEGORY_CONFIG,
> APR_HASH_KEY_STRING);
> svn_config_get(cfg, &diff_cmd, SVN_CONFIG_SECTION_HELPERS,
> - SVN_CONFIG_OPTION_DIFF_CMD, NULL);
> + SVN_CONFIG_OPTION_DIFF_CMD, "");
> }
>
> - if (diff_cmd)
> + /* "" means use internal diff so that an option in a config file can be
> + overridden by a command-line setting. */
> + if (strlen(diff_cmd))
> {
> /* Print out the diff header. */
> SVN_ERR(svn_stream_printf_from_utf8
> Index: subversion/svn/main.c
> ===================================================================
> --- subversion/svn/main.c (revision 29979)
> +++ subversion/svn/main.c (working copy)
> @@ -211,7 +211,8 @@
> {"ignore-externals", opt_ignore_externals, 0,
> N_("ignore externals definitions")},
> #ifndef AS400
> - {"diff-cmd", opt_diff_cmd, 1, N_("use ARG as diff command")},
> + {"diff-cmd", opt_diff_cmd, 1, N_("use ARG as diff command ('' for
> "
> + "built-in diff)")},
> {"diff3-cmd", opt_merge_cmd, 1, N_("use ARG as merge command")},
> {"editor-cmd", opt_editor_cmd, 1, N_("use ARG as external editor")},
> #endif
>
>

-- 
'Ladislav Sticha, the tall spokesman for Czech Television, told me that the
show's audience was "miniature" — presumably he meant small in number.' -
New York Times, January 24, 2008
Received on 2008-03-24 10:05:22 CET

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.