Author: rinrab
Date: Fri Nov 8 15:36:23 2024
New Revision: 1921819
URL: http://svn.apache.org/viewvc?rev=1921819&view=rev
Log:
Revert changes from r1921608, adding anchor, orig_path_1, and orig_path_2
arguments back to the function, to prevent changing ddi.
We are still modifying ddi from the diff driver.
* subversion/include/private/svn_client_private.h
(svn_client__get_diff_writer_svn): Add the arguments to the function
declaration and update the docstring.
* subversion/libsvn_client/diff.c
(svn_client_diff7, svn_client_diff_peg7): Pass NULLs to the new arguments
of svn_client__get_diff_writer_svn() invocations.
* subversion/libsvn_client/diff_patch.c
(svn_client__get_diff_writer_svn): Update implementation of this function.
* subversion/svn/shelf-cmd.c
(shelf_diff): Setup orig_path_1|2 when creating the processor, instead of
changing ddi later.
* subversion/svn/shelf2-cmd.c
(shelf_diff): Ditto.
Modified:
subversion/trunk/subversion/include/private/svn_client_private.h
subversion/trunk/subversion/libsvn_client/diff.c
subversion/trunk/subversion/libsvn_client/diff_patch.c
subversion/trunk/subversion/svn/shelf-cmd.c
subversion/trunk/subversion/svn/shelf2-cmd.c
Modified: subversion/trunk/subversion/include/private/svn_client_private.h
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/include/private/svn_client_private.h?rev=1921819&r1=1921818&r2=1921819&view=diff
==============================================================================
--- subversion/trunk/subversion/include/private/svn_client_private.h (original)
+++ subversion/trunk/subversion/include/private/svn_client_private.h Fri Nov 8 15:36:23 2024
@@ -352,12 +352,21 @@ svn_client__mergeinfo_log(svn_boolean_t
* which should describe some settings of the diff writer. It can be modified
* in future as required, and the writer should accept with them.
*
+ * @a anchor is optional (may be null), and is the 'anchor' path to prefix
+ * to the diff-processor paths before displaying.
+ *
+ * @a orig_path_1 and @a orig_path_2 are the two main root paths to be
+ * diffed; each may be a URL, a local WC path or a local unversioned path.
+ *
* Other arguments are as for svn_client_diff7() etc.
*/
svn_error_t *
svn_client__get_diff_writer_svn(
svn_diff_tree_processor_t **diff_processor,
svn_client__diff_driver_info_t **ddi_p,
+ const char *anchor,
+ const char *orig_path_1,
+ const char *orig_path_2,
const apr_array_header_t *options,
const char *relative_to_dir,
svn_boolean_t no_diff_added,
Modified: subversion/trunk/subversion/libsvn_client/diff.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/diff.c?rev=1921819&r1=1921818&r2=1921819&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/diff.c (original)
+++ subversion/trunk/subversion/libsvn_client/diff.c Fri Nov 8 15:36:23 2024
@@ -1273,6 +1273,9 @@ svn_client_diff7(const apr_array_header_
ignore_ancestry = FALSE;
SVN_ERR(svn_client__get_diff_writer_svn(&diff_processor, &ddi,
+ NULL /*anchor*/,
+ NULL /*orig_path_1*/,
+ NULL /*orig_path_2*/,
options,
relative_to_dir,
no_diff_added,
@@ -1333,6 +1336,9 @@ svn_client_diff_peg7(const apr_array_hea
ignore_ancestry = FALSE;
SVN_ERR(svn_client__get_diff_writer_svn(&diff_processor, &ddi,
+ NULL /*anchor*/,
+ NULL /*orig_path_1*/,
+ NULL /*orig_path_2*/,
options,
relative_to_dir,
no_diff_added,
Modified: subversion/trunk/subversion/libsvn_client/diff_patch.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/diff_patch.c?rev=1921819&r1=1921818&r2=1921819&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/diff_patch.c (original)
+++ subversion/trunk/subversion/libsvn_client/diff_patch.c Fri Nov 8 15:36:23 2024
@@ -1457,6 +1457,9 @@ svn_error_t *
svn_client__get_diff_writer_svn(
svn_diff_tree_processor_t **diff_processor,
svn_client__diff_driver_info_t **ddi_p,
+ const char *anchor,
+ const char *orig_path_1,
+ const char *orig_path_2,
const apr_array_header_t *options,
const char *relative_to_dir,
svn_boolean_t no_diff_added,
@@ -1500,7 +1503,9 @@ svn_client__get_diff_writer_svn(
dwi->ddi.wc_ctx = ctx->wc_ctx;
dwi->ddi.session_relpath = NULL;
- dwi->ddi.anchor = NULL;
+ dwi->ddi.anchor = anchor;
+ dwi->ddi.orig_path_1 = orig_path_1;
+ dwi->ddi.orig_path_2 = orig_path_2;
processor = svn_diff__tree_processor_create(dwi, pool);
Modified: subversion/trunk/subversion/svn/shelf-cmd.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/svn/shelf-cmd.c?rev=1921819&r1=1921818&r2=1921819&view=diff
==============================================================================
--- subversion/trunk/subversion/svn/shelf-cmd.c (original)
+++ subversion/trunk/subversion/svn/shelf-cmd.c Fri Nov 8 15:36:23 2024
@@ -759,6 +759,8 @@ shelf_diff(const char *name,
{
SVN_ERR(svn_client__get_diff_writer_svn(
&diff_processor, &ddi,
+ NULL /*anchor*/,
+ "", "", /*orig_path_1, orig_path_2,*/
NULL /*options*/,
"" /*relative_to_dir*/,
FALSE /*no_diff_added*/,
@@ -772,9 +774,6 @@ shelf_diff(const char *name,
svn_cmdline_output_encoding(scratch_pool),
stream, errstream,
ctx, scratch_pool));
-
- ddi->orig_path_1 = "";
- ddi->orig_path_2 = "";
}
SVN_ERR(svn_client__shelf_diff(shelf_version, "",
Modified: subversion/trunk/subversion/svn/shelf2-cmd.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/svn/shelf2-cmd.c?rev=1921819&r1=1921818&r2=1921819&view=diff
==============================================================================
--- subversion/trunk/subversion/svn/shelf2-cmd.c (original)
+++ subversion/trunk/subversion/svn/shelf2-cmd.c Fri Nov 8 15:36:23 2024
@@ -759,6 +759,8 @@ shelf_diff(const char *name,
{
SVN_ERR(svn_client__get_diff_writer_svn(
&diff_processor, &ddi,
+ NULL /*anchor*/,
+ "", "", /*orig_path_1, orig_path_2,*/
NULL /*options*/,
"" /*relative_to_dir*/,
FALSE /*no_diff_added*/,
@@ -772,9 +774,6 @@ shelf_diff(const char *name,
svn_cmdline_output_encoding(scratch_pool),
stream, errstream,
ctx, scratch_pool));
-
- ddi->orig_path_1 = "";
- ddi->orig_path_2 = "";
}
SVN_ERR(svn_client__shelf2_diff(shelf_version, "",
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.