You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by rh...@apache.org on 2012/11/13 16:59:54 UTC
svn commit: r1408813 - /subversion/trunk/subversion/libsvn_wc/info.c
Author: rhuijben
Date: Tue Nov 13 15:59:53 2012
New Revision: 1408813
URL: http://svn.apache.org/viewvc?rev=1408813&view=rev
Log:
Remove the last non deprecated caller of the entry schedule calculation
function.
* subversion/libsvn_wc/info.c
(build_info_for_node): Following up on r1408809, avoid the old schedule
calculation function for filling the info struct.
Modified:
subversion/trunk/subversion/libsvn_wc/info.c
Modified: subversion/trunk/subversion/libsvn_wc/info.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/info.c?rev=1408813&r1=1408812&r2=1408813&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/info.c (original)
+++ subversion/trunk/subversion/libsvn_wc/info.c Tue Nov 13 15:59:53 2012
@@ -94,6 +94,7 @@ build_info_for_node(svn_wc__info2_t **in
svn_boolean_t conflicted;
svn_boolean_t op_root;
svn_boolean_t have_base;
+ svn_boolean_t have_more_work;
svn_wc_info_t *wc_info;
tmpinfo = apr_pcalloc(result_pool, sizeof(*tmpinfo));
@@ -118,7 +119,7 @@ build_info_for_node(svn_wc__info2_t **in
&wc_info->recorded_time,
&wc_info->changelist,
&conflicted, &op_root, NULL, NULL,
- &have_base, NULL, NULL,
+ &have_base, &have_more_work, NULL,
db, local_abspath,
result_pool, scratch_pool));
@@ -188,9 +189,30 @@ build_info_for_node(svn_wc__info2_t **in
/* ### We should be able to avoid both these calls with the information
from read_info() in most cases */
- SVN_ERR(svn_wc__internal_node_get_schedule(&wc_info->schedule, NULL,
- db, local_abspath,
- scratch_pool));
+ if (! op_root)
+ wc_info->schedule = svn_wc_schedule_normal;
+ else if (! have_more_work && ! have_base)
+ wc_info->schedule = svn_wc_schedule_add;
+ else
+ {
+ svn_wc__db_status_t below_working;
+ svn_boolean_t have_work;
+
+ SVN_ERR(svn_wc__db_info_below_working(&have_base, &have_work,
+ &below_working,
+ db, local_abspath,
+ scratch_pool));
+
+ /* If the node is not present or deleted (read: not present
+ in working), then the node is not a replacement */
+ if (below_working != svn_wc__db_status_not_present
+ && below_working != svn_wc__db_status_deleted)
+ {
+ wc_info->schedule = svn_wc_schedule_replace;
+ }
+ else
+ wc_info->schedule = svn_wc_schedule_add;
+ }
SVN_ERR(svn_wc__db_read_url(&tmpinfo->URL, db, local_abspath,
result_pool, scratch_pool));
}