Author: rinrab
Date: Tue Nov 26 23:29:06 2024
New Revision: 1922141
URL: http://svn.apache.org/viewvc?rev=1922141&view=rev
Log:
On the 'apply-processor' branch: Inline cb_table->updated_path callback, but
use the notification callback instead; It seems like it has everything it
need to make the required records in merge_b.
* subversion/libsvn_client/client.h
(svn_client__apply_processor_callbacks_t::updated_path): Remove method.
* subversion/libsvn_client/merge.c
(notify_merging): Inline the apply_processor_updated_path() function here,
with few minor required adjustments.
(apply_processor_updated_path): Remove function.
(do_merge): Do not initialize cb_table.updated_path.
* subversion/libsvn_client/merge_processor.c
(): No longer invoke cb_table->updated_path() callback, since we are
removing it.
Modified:
subversion/branches/apply-processor/subversion/libsvn_client/client.h
subversion/branches/apply-processor/subversion/libsvn_client/merge.c
subversion/branches/apply-processor/subversion/libsvn_client/merge_processor.c
Modified: subversion/branches/apply-processor/subversion/libsvn_client/client.h
URL: http://svn.apache.org/viewvc/subversion/branches/apply-processor/subversion/libsvn_client/client.h?rev=1922141&r1=1922140&r2=1922141&view=diff
==============================================================================
--- subversion/branches/apply-processor/subversion/libsvn_client/client.h (original)
+++ subversion/branches/apply-processor/subversion/libsvn_client/client.h Tue Nov 26 23:29:06 2024
@@ -1291,11 +1291,6 @@ typedef struct svn_client__apply_process
const char *path,
apr_pool_t *pool);
- svn_error_t *(*updated_path)(void *baton,
- const char *local_abspath,
- svn_wc_notify_action_t action,
- apr_pool_t *pool);
-
svn_error_t *(*mergeinfo_changed)(void *baton,
const char *local_abspath,
const svn_string_t *old_mergeinfo,
Modified: subversion/branches/apply-processor/subversion/libsvn_client/merge.c
URL: http://svn.apache.org/viewvc/subversion/branches/apply-processor/subversion/libsvn_client/merge.c?rev=1922141&r1=1922140&r2=1922141&view=diff
==============================================================================
--- subversion/branches/apply-processor/subversion/libsvn_client/merge.c (original)
+++ subversion/branches/apply-processor/subversion/libsvn_client/merge.c Tue Nov 26 23:29:06 2024
@@ -1283,6 +1283,56 @@ notify_merging(void *baton,
apr_pool_t *pool)
{
struct notify_begin_state_t *b = baton;
+ merge_cmd_baton_t *merge_b = b->merge_b;
+
+ switch (notify->action)
+ {
+ case svn_wc_notify_update_update:
+ if (merge_b->merge_source.ancestral || merge_b->reintegrate_merge)
+ {
+ store_path(merge_b->merged_abspaths, notify->path);
+ }
+ break;
+
+ case svn_wc_notify_update_delete:
+ /* Update the lists of merged, skipped, tree-conflicted and added paths. */
+ if (merge_b->merge_source.ancestral || merge_b->reintegrate_merge)
+ {
+ /* Issue #4166: If a previous merge added NOTIFY_ABSPATH, but we
+ are now deleting it, then remove it from the list of added
+ paths. */
+ svn_hash_sets(merge_b->added_abspaths, notify->path, NULL);
+ store_path(merge_b->merged_abspaths, notify->path);
+ }
+
+ /* Note in children_with_mergeinfo that all paths in this subtree are
+ * being deleted, to avoid trying to set mergeinfo on them later. */
+ if (merge_b->children_with_mergeinfo)
+ {
+ int i;
+
+ for (i = 0; i < merge_b->children_with_mergeinfo->nelts; i++)
+ {
+ svn_client__merge_path_t *child
+ = APR_ARRAY_IDX(merge_b->children_with_mergeinfo, i,
+ svn_client__merge_path_t *);
+
+ if (svn_dirent_is_ancestor(notify->path, child->abspath))
+ {
+ SVN_ERR(svn_sort__array_delete2(merge_b->children_with_mergeinfo, i--, 1));
+ }
+ }
+ }
+
+ break;
+
+ case svn_wc_notify_update_add:
+ if (merge_b->merge_source.ancestral || merge_b->reintegrate_merge)
+ {
+ store_path(merge_b->added_abspaths, notify->path);
+ }
+ break;
+ }
notify_merge_begin(b, notify->path,
notify->action == svn_wc_notify_update_delete,
@@ -7274,65 +7324,6 @@ apply_processor_skipped_path(void *baton
return SVN_NO_ERROR;
}
-/* Implements svn_client__apply_processor_callbacks_t::updated_path */
-static svn_error_t *
-apply_processor_updated_path(void *baton, const char *local_abspath,
- svn_wc_notify_action_t action, apr_pool_t *pool)
-{
- merge_cmd_baton_t *merge_b = baton;
-
- switch (action)
- {
- case svn_wc_notify_update_update:
- if (merge_b->merge_source.ancestral || merge_b->reintegrate_merge)
- {
- store_path(merge_b->merged_abspaths, local_abspath);
- }
- break;
-
- case svn_wc_notify_update_delete:
- /* Update the lists of merged, skipped, tree-conflicted and added paths. */
- if (merge_b->merge_source.ancestral || merge_b->reintegrate_merge)
- {
- /* Issue #4166: If a previous merge added NOTIFY_ABSPATH, but we
- are now deleting it, then remove it from the list of added
- paths. */
- svn_hash_sets(merge_b->added_abspaths, local_abspath, NULL);
- store_path(merge_b->merged_abspaths, local_abspath);
- }
-
- /* Note in children_with_mergeinfo that all paths in this subtree are
- * being deleted, to avoid trying to set mergeinfo on them later. */
- if (merge_b->children_with_mergeinfo)
- {
- int i;
-
- for (i = 0; i < merge_b->children_with_mergeinfo->nelts; i++)
- {
- svn_client__merge_path_t *child
- = APR_ARRAY_IDX(merge_b->children_with_mergeinfo, i,
- svn_client__merge_path_t *);
-
- if (svn_dirent_is_ancestor(local_abspath, child->abspath))
- {
- SVN_ERR(svn_sort__array_delete2(merge_b->children_with_mergeinfo, i--, 1));
- }
- }
- }
-
- break;
-
- case svn_wc_notify_update_add:
- if (merge_b->merge_source.ancestral || merge_b->reintegrate_merge)
- {
- store_path(merge_b->added_abspaths, local_abspath);
- }
- break;
- }
-
- return SVN_NO_ERROR;
-}
-
/* Implements svn_client__apply_processor_callbacks_t::mergeinfo_changed */
static svn_error_t *
apply_processor_mergeinfo_changed(void *baton, const char *local_abspath,
@@ -7604,7 +7595,6 @@ do_merge(apr_hash_t **modified_subtrees,
cb_table.conflicted_path = apply_processor_conflicted_path;
cb_table.skipped_path = apply_processor_skipped_path;
- cb_table.updated_path = apply_processor_updated_path;
cb_table.mergeinfo_changed = apply_processor_mergeinfo_changed;
cb_table.adjust_mergeinfo = apply_processor_adjust_mergeinfo;
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=1922141&r1=1922140&r2=1922141&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 23:29:06 2024
@@ -727,13 +727,6 @@ record_update_add(merge_apply_processor_
svn_boolean_t notify_replaced,
apr_pool_t *scratch_pool)
{
- if (merge_b->cb_table && merge_b->cb_table->updated_path)
- {
- SVN_ERR(merge_b->cb_table->updated_path(merge_b->cb_baton, local_abspath,
- svn_wc_notify_update_add,
- scratch_pool));
- }
-
if (merge_b->notify_func)
{
svn_wc_notify_t *notify;
@@ -762,13 +755,6 @@ record_update_update(merge_apply_process
svn_wc_notify_state_t prop_state,
apr_pool_t *scratch_pool)
{
- if (merge_b->cb_table && merge_b->cb_table->updated_path)
- {
- SVN_ERR(merge_b->cb_table->updated_path(merge_b->cb_baton, local_abspath,
- svn_wc_notify_update_update,
- scratch_pool));
- }
-
if (merge_b->notify_func)
{
svn_wc_notify_t *notify;
@@ -795,13 +781,6 @@ record_update_delete(merge_apply_process
svn_node_kind_t kind,
apr_pool_t *scratch_pool)
{
- if (merge_b->cb_table && merge_b->cb_table->updated_path)
- {
- SVN_ERR(merge_b->cb_table->updated_path(merge_b->cb_baton, local_abspath,
- svn_wc_notify_update_delete,
- scratch_pool));
- }
-
if (parent_db)
{
const char *dup_abspath = apr_pstrdup(parent_db->pool, local_abspath);
@@ -1486,14 +1465,6 @@ merge_file_added(const char *relpath,
return SVN_NO_ERROR;
}
- if (merge_b->cb_table && merge_b->cb_table->updated_path
- && ( !fb->parent_baton || !fb->parent_baton->added))
- {
- SVN_ERR(merge_b->cb_table->updated_path(merge_b->cb_baton, local_abspath,
- svn_wc_notify_update_add,
- scratch_pool));
- }
-
if (!merge_b->dry_run)
{
const char *copyfrom_url;
@@ -2350,14 +2321,6 @@ merge_dir_added(const char *relpath,
&& ! merge_b->record_only /* Skip details from merge_open_dir() */
);
- if (merge_b->cb_table && merge_b->cb_table->updated_path
- && ( !db->parent_baton || !db->parent_baton->added))
- {
- SVN_ERR(merge_b->cb_table->updated_path(
- merge_b->cb_baton, local_abspath, svn_wc_notify_update_add,
- scratch_pool));
- }
-
if (merge_b->same_repos)
{
/* When the directory was added in merge_dir_added() we didn't update its
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.