[PATCH] --invoke-diff-cmd
From: Gabriela Gibson <gabriela.gibson_at_gmail.com>
Date: Mon, 16 Jun 2014 15:21:05 +0100
Hi,
I'm not sure how to update my branch because the underlying base has
So, just to keep things simple, I just post it as a patch for now.
Gabriela
Ps.: I'll take a look at the --invoke-diff3-cmd part this week sometime.
======================================================================
--invoke-diff-cmd allows command line selection of an external diff
Currently this capability is provided by user written shell scripts
--invoke-diff-cmd is currently implemented for 'diff', 'log',
See: http://subversion.tigris.org/issues/show_bug.cgi?id=2044 for the
What --invoke-diff-cmd provides
Users can type 'free-style' command lines for their selected
from 'svn help diff':
--invoke-diff-cmd ARG:
use ARG as format string for external diff command
Substitutions: %svn_new new file
Structure of the feature:
API components
./subversion/libsvn_subr/io.c __create_custom_diff_cmd()
transforms the user input 'invoke-diff-cmd' into a command line
./subversion/libsvn_subr/io.c svn_io_run_external_diff()
calls __create_custom_diff_cmd() and does all the error checking
UI components
--invoke-diff-cmd and its user interface components for the command
Tests
The test for the 'invoke-diff-cmd' feature is
/subversion/tests/cmdline/diff_tests.py diff_invoke_external_diffcmd
[[[
* subversion/include/private/svn_io_private.h
(svn_io__create_custom_diff_cmd): New function declaration.
* subversion/include/svn_config.h
(SVN_CONFIG_OPTION_INVOKE_DIFF_CMD): New definition.
* subversion/include/svn_error_codes.h
(SVN_CLIENT_DIFF_CMD): New macro.
* subversion/include/svn_io.h
(svn_io_run_external_diff): New function.
* subversion/libsvn_client/diff.c
(diff_writer_info_t): New member: 'invoke_diff_cmd'.
(create_diff_writer_info): Add routine to read invoke_diff_cmd
(diff_content_changed): Raise an error if both diff_cmd and
* subversion/libsvn_subr/config_file.c
(svn_config_ensure,"invoke-diff-cmd"): New entry: invoke-diff-cmd.
* subversion/libsvn_subr/io.c
(svn_io__create_custom_diff_cmd): New function.
(svn_io_run_external_diff): New function.
* subversion/svn/cl.h
(struct svn_cl__opt_state_t.diff): New member: 'invoke_diff_cmd'.
* subversion/svn/log-cmd.c
(log_receiver_baton): New struct member invoke_diff_cmd.
(svn_cl__log): Ensure mutual exclusions between invoke_diff_cmd and
* subversion/svnlook/svnlook.c
(enum): New variable svnlook__invoke_diff_cmd.
(options_table[]): New entry 'invoke-diff-cmd'.
(cmd_tablcmd[]): Add svnlook__invoke_diff_cmd to diff cmd table
(svnlook_opt_state): New member variable "invoke_diff_cmd". Adjust
(svnlook_ctxt_t): New member variable "invoke_diff_cmd".
(print_diff_tree): Modify 'if condition' to include new
(get_ctxt_baton): Assign invoke_diff_cmd data.
(main): Add case svnlook__invoke_diff_cmd. Assign opt_arg to
* subversion/svn/svn.c
(svn_cl__longopt_t): New enum opt_invoke_diff_cmd.
(svn_cl__options "invoke-diff-cmd"): Add help information. Add new
(svn_cl__cmd_table[]): New option: 'invoke-diff-cmd', help info. Add
(sub_main): Add case opt_invoke_diff_cmd. Prohibit simultaneous
* subversion/tests/cmdline/diff_tests.py
(diff_invoke_external_diffcmd): New function.
(test_list): Add new entry 'diff_invoke_external_diffcmd'.
* subversion/tests/cmdline/getopt_tests_data/svn_help_log_switch_stdout
(--invoke-diff-cmd): Add new entry to 'help' output data.
]]]
|
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.