svn commit: r1922066 - /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: Sun Nov 24 23:39:08 2024
New Revision: 1922066

URL: http://svn.apache.org/viewvc?rev=1922066&view=rev
Log:
On the 'apply-processor' branch, following-up to r1922065:

In r1922065 revision, during some complicated moves, I accidently deleted
the omit_mergeinfo_changes() function. As this followup, I am reverting this
part of the file.

* subversion/libsvn_client/merge_processor.c
  (omit_mergeinfo_changes): Yield this function back to the source-code.

Modified:
    subversion/branches/apply-processor/subversion/libsvn_client/merge_processor.c

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=1922066&r1=1922065&r2=1922066&view=diff
==============================================================================
--- subversion/branches/apply-processor/subversion/libsvn_client/merge_processor.c (original)
+++ subversion/branches/apply-processor/subversion/libsvn_client/merge_processor.c Sun Nov 24 23:39:08 2024
@@ -233,6 +233,33 @@ make_conflict_versions(const svn_wc_conf
   return SVN_NO_ERROR;
 }
 
+
+/* Make a copy of PROPCHANGES (array of svn_prop_t) into *TRIMMED_PROPCHANGES,
+   omitting any svn:mergeinfo changes.  */
+static svn_error_t *
+omit_mergeinfo_changes(apr_array_header_t **trimmed_propchanges,
+                       const apr_array_header_t *propchanges,
+                       apr_pool_t *result_pool)
+{
+  int i;
+
+  *trimmed_propchanges = apr_array_make(result_pool,
+                                        propchanges->nelts,
+                                        sizeof(svn_prop_t));
+
+  for (i = 0; i < propchanges->nelts; ++i)
+    {
+      const svn_prop_t *change = &APR_ARRAY_IDX(propchanges, i, svn_prop_t);
+
+      /* If this property is not svn:mergeinfo, then copy it.  */
+      if (strcmp(change->name, SVN_PROP_MERGEINFO) != 0)
+        APR_ARRAY_PUSH(*trimmed_propchanges, svn_prop_t) = *change;
+    }
+
+  return SVN_NO_ERROR;
+}
+
+
 /* Prepare a set of property changes PROPCHANGES to be used for a merge
    operation on LOCAL_ABSPATH.
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.