svn commit: r1922140 - in /subversion/branches/apply-processor: ./ subversion/libsvn_client/merge_processor.c

[email protected]
Newsgroups gmane.comp.version-control.subversion.svn
Message-ID <[email protected]>
Author: rinrab
Date: Tue Nov 26 21:57:57 2024
New Revision: 1922140

URL: http://svn.apache.org/viewvc?rev=1922140&view=rev
Log:
On the 'apply-processor' branch: Manually merge changes from trunk@1922138.

Modified:
    subversion/branches/apply-processor/   (props changed)
    subversion/branches/apply-processor/subversion/libsvn_client/merge_processor.c

Propchange: subversion/branches/apply-processor/
------------------------------------------------------------------------------
  Merged /subversion/trunk:r1922138

Modified: subversion/branches/apply-processor/subversion/libsvn_client/merge_processor.c
URL: http://svn.apache.org/viewvc/subversion/branches/apply-processor/subversion/libsvn_client/merge_processor.c?rev=1922140&r1=1922139&r2=1922140&view=diff
==============================================================================
--- subversion/branches/apply-processor/subversion/libsvn_client/merge_processor.c (original)
+++ subversion/branches/apply-processor/subversion/libsvn_client/merge_processor.c Tue Nov 26 21:57:57 2024
@@ -509,6 +509,20 @@ struct merge_file_baton_t
   svn_boolean_t add_is_replace; /* Add is second part of replace */
 };
 
+/* Allocate new #merge_file_baton_t structure in @a result_pool */
+static struct merge_file_baton_t *
+create_file_baton(apr_pool_t *result_pool)
+{
+  struct merge_file_baton_t *fb;
+
+  fb = apr_pcalloc(result_pool, sizeof(*fb));
+  fb->tree_conflict_reason = CONFLICT_REASON_NONE;
+  fb->tree_conflict_action = svn_wc_conflict_action_edit;
+  fb->skip_reason = svn_wc_notify_state_unknown;
+
+  return fb;
+}
+
 /* Record the skip for future processing and (later) produce the
    skip notification */
 static svn_error_t *
@@ -1019,15 +1033,10 @@ merge_file_opened(void **new_file_baton,
 {
   merge_apply_processor_baton_t *merge_b = processor->baton;
   struct merge_dir_baton_t *pdb = dir_baton;
-  struct merge_file_baton_t *fb;
+  struct merge_file_baton_t *fb = create_file_baton(result_pool);
   const char *local_abspath = svn_dirent_join(merge_b->target->abspath,
                                               relpath, scratch_pool);
 
-  fb = apr_pcalloc(result_pool, sizeof(*fb));
-  fb->tree_conflict_reason = CONFLICT_REASON_NONE;
-  fb->tree_conflict_action = svn_wc_conflict_action_edit;
-  fb->skip_reason = svn_wc_notify_state_unknown;
-
   if (left_source)
     fb->tree_conflict_merge_left_node_kind = svn_node_file;
   else
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.