Author: rinrab
Date: Sun Oct 27 20:14:11 2024
New Revision: 1921605

URL: http://svn.apache.org/viewvc?rev=1921605&view=rev
Log:
Also return the produced diff driver info object from the
svn_client__get_diff_writer_svn function to allow the drivers to
manipulate with it.

* subversion/include/private/svn_client_private.h
  (svn_client__get_diff_writer_svn): Declare ddi_p argument with type of
   svn_client__diff_driver_info_t, which were recently moved here.
* subversion/libsvn_client/diff.c
  (svn_client__get_diff_writer_svn): Set the value of ddi_p with one returned
   from get_diff_processor().

* subversion/svn/shelf-cmd.c
  (shelf_diff): Declare ddi variable and pass its pointer to
   svn_client__get_diff_writer_svn().
* subversion/svn/shelf2-cmd.c
  (shelf_diff): Ditto.

The get_diff_processor() function can be inlined into
svn_client__get_diff_writer_svn soon...

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=1921605&r1=1921604&r2=1921605&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:14:11 2024
@@ -359,6 +359,7 @@ svn_client__mergeinfo_log(svn_boolean_t
 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,

Modified: subversion/trunk/subversion/libsvn_client/diff.c
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/diff.c?rev=1921605&r1=1921604&r2=1921605&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/diff.c (original)
+++ subversion/trunk/subversion/libsvn_client/diff.c Sun Oct 27 20:14:11 2024
@@ -2679,6 +2679,7 @@ get_diff_processor(svn_diff_tree_process
 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,
@@ -2717,6 +2718,7 @@ svn_client__get_diff_writer_svn(
   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=1921605&r1=1921604&r2=1921605&view=diff
==============================================================================
--- subversion/trunk/subversion/svn/shelf-cmd.c (original)
+++ subversion/trunk/subversion/svn/shelf-cmd.c Sun Oct 27 20:14:11 2024
@@ -717,6 +717,7 @@ shelf_diff(const char *name,
   svn_client__shelf_version_t *shelf_version;
   svn_stream_t *stream, *errstream;
   svn_diff_tree_processor_t *diff_processor;
+  svn_client__diff_driver_info_t *ddi;
 
   SVN_ERR(svn_client__shelf_open_existing(&shelf, name, local_abspath,
                                          ctx, scratch_pool));
@@ -757,7 +758,7 @@ shelf_diff(const char *name,
   else
     {
       SVN_ERR(svn_client__get_diff_writer_svn(
-                &diff_processor,
+                &diff_processor, &ddi,
                 NULL /*anchor*/,
                 "", "", /*orig_path_1, orig_path_2,*/
                 NULL /*options*/,

Modified: subversion/trunk/subversion/svn/shelf2-cmd.c
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/svn/shelf2-cmd.c?rev=1921605&r1=1921604&r2=1921605&view=diff
==============================================================================
--- subversion/trunk/subversion/svn/shelf2-cmd.c (original)
+++ subversion/trunk/subversion/svn/shelf2-cmd.c Sun Oct 27 20:14:11 2024
@@ -717,6 +717,7 @@ shelf_diff(const char *name,
   svn_client__shelf2_version_t *shelf_version;
   svn_stream_t *stream, *errstream;
   svn_diff_tree_processor_t *diff_processor;
+  svn_client__diff_driver_info_t *ddi;
 
   SVN_ERR(svn_client__shelf2_open_existing(&shelf, name, local_abspath,
                                          ctx, scratch_pool));
@@ -757,7 +758,7 @@ shelf_diff(const char *name,
   else
     {
       SVN_ERR(svn_client__get_diff_writer_svn(
-                &diff_processor,
+                &diff_processor, &ddi,
                 NULL /*anchor*/,
                 "", "", /*orig_path_1, orig_path_2,*/
                 NULL /*options*/,


Reply via email to