Author: rinrab
Date: Sun Oct 27 20:37:18 2024
New Revision: 1921608

URL: http://svn.apache.org/viewvc?rev=1921608&view=rev
Log:
Remove anchor, orig_path_1, and orig_path_2 arguments from the
svn_client__get_diff_writer_svn function, but initialize them later
in svn_client__diff_driver_info_t, if needed.

* subversion/include/private/svn_client_private.h
  (svn_client__get_diff_writer_svn): Remove anchor, orig_path_1, and
   orig_path_2 arguments.
* subversion/libsvn_client/diff.c
  (svn_client__get_diff_writer_svn): Ditto, with passing ddi_p straight to
   get_diff_processor, without a temporary structure.

* subversion/svn/shelf-cmd.c
  (shelf_diff): Do not pass anything to svn_client__get_diff_writer_svn
   as the removed arguments, but set orig_path_1/2 in ddi with an empty
   string.
* 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/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=1921608&r1=1921607&r2=1921608&view=diff
==============================================================================
--- subversion/trunk/subversion/include/private/svn_client_private.h (original)
+++ subversion/trunk/subversion/include/private/svn_client_private.h Sun Oct 27 
20:37:18 2024
@@ -352,21 +352,12 @@ 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=1921608&r1=1921607&r2=1921608&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/diff.c (original)
+++ subversion/trunk/subversion/libsvn_client/diff.c Sun Oct 27 20:37:18 2024
@@ -2680,9 +2680,6 @@ 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,
@@ -2699,9 +2696,7 @@ svn_client__get_diff_writer_svn(
                 svn_client_ctx_t *ctx,
                 apr_pool_t *pool)
 {
-  svn_client__diff_driver_info_t *ddi;
-
-  SVN_ERR(get_diff_processor(diff_processor, &ddi,
+  SVN_ERR(get_diff_processor(diff_processor, ddi_p,
                              options,
                              relative_to_dir,
                              no_diff_added,
@@ -2715,10 +2710,6 @@ svn_client__get_diff_writer_svn(
                              header_encoding,
                              outstream, errstream,
                              ctx, pool));
-  ddi->anchor = anchor;
-  ddi->orig_path_1 = orig_path_1;
-  ddi->orig_path_2 = orig_path_2;
-  *ddi_p = ddi;
   return SVN_NO_ERROR;
 }
 

Modified: subversion/trunk/subversion/svn/shelf-cmd.c
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/svn/shelf-cmd.c?rev=1921608&r1=1921607&r2=1921608&view=diff
==============================================================================
--- subversion/trunk/subversion/svn/shelf-cmd.c (original)
+++ subversion/trunk/subversion/svn/shelf-cmd.c Sun Oct 27 20:37:18 2024
@@ -759,8 +759,6 @@ 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*/,
@@ -774,6 +772,9 @@ 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=1921608&r1=1921607&r2=1921608&view=diff
==============================================================================
--- subversion/trunk/subversion/svn/shelf2-cmd.c (original)
+++ subversion/trunk/subversion/svn/shelf2-cmd.c Sun Oct 27 20:37:18 2024
@@ -759,8 +759,6 @@ 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*/,
@@ -774,6 +772,9 @@ 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, "",


Reply via email to