Author: rinrab
Date: Thu Nov 28 21:53:31 2024
New Revision: 1922200
URL: http://svn.apache.org/viewvc?rev=1922200&view=rev
Log:
On the 'apply-processor' branch: Store the path in the added_abspaths on its
addition only if its we are also adding its parent.
* subversion/libsvn_client/client.h
(svn_client__apply_processor_callbacks_t::updated_path): Add parent_added
argument to the method.
* subversion/libsvn_client/merge.c
(apply_processor_updated_path): Update implementation to match with the
argument addition.
(apply_processor_updated_path:svn_wc_notify_update_add): Store the path
in the added_abspaths on its addition only if its we are also adding its
parent.
* subversion/libsvn_client/merge_processor.c
(record_update_add, record_update_update): Add parent_added, to pass it
to the cb_table->updated_path() callback then.
(record_update_delete): Always call cb_table->updated_path with
parent_added=FALSE, since parent of the deleted node cannot be added.
(merge_file_changed, merge_file_added,
merge_dir_opened, merge_dir_changed, merge_dir_added):
Calculate what to pass to the parent_added argument based
on the parent baton.
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=1922200&r1=1922199&r2=1922200&view=diff
==============================================================================
--- subversion/branches/apply-processor/subversion/libsvn_client/client.h (original)
+++ subversion/branches/apply-processor/subversion/libsvn_client/client.h Thu Nov 28 21:53:31 2024
@@ -1294,6 +1294,7 @@ typedef struct svn_client__apply_process
svn_error_t *(*updated_path)(void *baton,
const char *local_abspath,
svn_wc_notify_action_t action,
+ svn_boolean_t parent_added,
apr_pool_t *pool);
svn_error_t *(*mergeinfo_changed)(void *baton,
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=1922200&r1=1922199&r2=1922200&view=diff
==============================================================================
--- subversion/branches/apply-processor/subversion/libsvn_client/merge.c (original)
+++ subversion/branches/apply-processor/subversion/libsvn_client/merge.c Thu Nov 28 21:53:31 2024
@@ -7277,7 +7277,9 @@ apply_processor_skipped_path(void *baton
/* 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)
+ svn_wc_notify_action_t action,
+ svn_boolean_t parent_added,
+ apr_pool_t *pool)
{
merge_cmd_baton_t *merge_b = baton;
@@ -7325,7 +7327,8 @@ apply_processor_updated_path(void *baton
case svn_wc_notify_update_add:
if (merge_b->merge_source.ancestral || merge_b->reintegrate_merge)
{
- store_path(merge_b->added_abspaths, local_abspath);
+ if (! parent_added)
+ store_path(merge_b->added_abspaths, local_abspath);
}
break;
}
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=1922200&r1=1922199&r2=1922200&view=diff
==============================================================================
--- subversion/branches/apply-processor/subversion/libsvn_client/merge_processor.c (original)
+++ subversion/branches/apply-processor/subversion/libsvn_client/merge_processor.c Thu Nov 28 21:53:31 2024
@@ -700,12 +700,14 @@ record_update_add(merge_apply_processor_
const char *local_abspath,
svn_node_kind_t kind,
svn_boolean_t notify_replaced,
+ svn_boolean_t parent_added,
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,
+ parent_added,
scratch_pool));
}
@@ -735,12 +737,14 @@ record_update_update(merge_apply_process
svn_node_kind_t kind,
svn_wc_notify_state_t content_state,
svn_wc_notify_state_t prop_state,
+ svn_boolean_t parent_added,
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,
+ parent_added,
scratch_pool));
}
@@ -774,6 +778,7 @@ record_update_delete(merge_apply_process
{
SVN_ERR(merge_b->cb_table->updated_path(merge_b->cb_baton, local_abspath,
svn_wc_notify_update_delete,
+ FALSE,
scratch_pool));
}
@@ -1404,6 +1409,7 @@ merge_file_changed(const char *relpath,
{
SVN_ERR(record_update_update(merge_b, local_abspath, svn_node_file,
text_state, property_state,
+ fb->parent_baton && fb->parent_baton->added,
scratch_pool));
}
@@ -1542,7 +1548,9 @@ merge_file_added(const char *relpath,
}
SVN_ERR(record_update_add(merge_b, local_abspath, svn_node_file,
- fb->add_is_replace, scratch_pool));
+ fb->add_is_replace,
+ fb->parent_baton && fb->parent_baton->added,
+ scratch_pool));
return SVN_NO_ERROR;
}
@@ -2177,7 +2185,9 @@ merge_dir_opened(void **new_dir_baton,
if (! db->shadowed && !merge_b->record_only)
SVN_ERR(record_update_add(merge_b, local_abspath, svn_node_dir,
- db->add_is_replace, scratch_pool));
+ db->add_is_replace,
+ pdb && pdb->added,
+ scratch_pool));
}
return SVN_NO_ERROR;
}
@@ -2262,7 +2272,9 @@ merge_dir_changed(const char *relpath,
{
SVN_ERR(record_update_update(merge_b, local_abspath, svn_node_file,
svn_wc_notify_state_inapplicable,
- prop_state, scratch_pool));
+ prop_state,
+ db->parent_baton && db->added,
+ scratch_pool));
}
}
@@ -2317,11 +2329,11 @@ 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))
+ 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,
+ db->parent_baton && db->parent_baton->added,
scratch_pool));
}
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.