You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by st...@apache.org on 2012/03/05 18:40:17 UTC
svn commit: r1297140 - /subversion/trunk/subversion/libsvn_wc/status.c
Author: stsp
Date: Mon Mar 5 17:40:17 2012
New Revision: 1297140
URL: http://svn.apache.org/viewvc?rev=1297140&view=rev
Log:
* subversion/libsvn_wc/status.c
(assemble_status): Directly call svn_wc__db_scan_deletion() instead of
running svn_wc__internal_node_get_schedule() to figure out if a deleted
node lies within a copied subtree. The purpose of the get_schedule()
function is to map from wc-ng node status to the legacy svn_wc_schedule_t.
So it is not the right interface to use in this context.
Calling scan_deletion() directly also avoids the overhead of an additional
read_info() call.
This commit essentially inlines relevant lines of code from the
get_schedule() function within assemble_status().
This change will also make it easier to eventually fix 'svn status'
output on the multi-layer-moves branch, where moved-away nodes are
currently displayed like normal deletions.
Modified:
subversion/trunk/subversion/libsvn_wc/status.c
Modified: subversion/trunk/subversion/libsvn_wc/status.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/status.c?rev=1297140&r1=1297139&r2=1297140&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/status.c (original)
+++ subversion/trunk/subversion/libsvn_wc/status.c Mon Mar 5 17:40:17 2012
@@ -526,9 +526,17 @@ assemble_status(svn_wc_status3_t **statu
if (!info->have_base)
copied = TRUE;
else
- SVN_ERR(svn_wc__internal_node_get_schedule(NULL, &copied,
- db, local_abspath,
- scratch_pool));
+ {
+ const char *work_del_abspath;
+
+ /* Find out details of our deletion. */
+ SVN_ERR(svn_wc__db_scan_deletion(NULL, NULL,
+ &work_del_abspath, NULL,
+ db, local_abspath,
+ scratch_pool, scratch_pool));
+ if (work_del_abspath)
+ copied = TRUE; /* Working deletion */
+ }
}
else if (!dirent || dirent->kind != svn_node_dir)
{
@@ -544,11 +552,17 @@ assemble_status(svn_wc_status3_t **statu
{
if (info->status == svn_wc__db_status_deleted)
{
+ const char *work_del_abspath;
+
node_status = svn_wc_status_deleted;
- SVN_ERR(svn_wc__internal_node_get_schedule(NULL, &copied,
- db, local_abspath,
- scratch_pool));
+ /* Find out details of our deletion. */
+ SVN_ERR(svn_wc__db_scan_deletion(NULL, NULL,
+ &work_del_abspath, NULL,
+ db, local_abspath,
+ scratch_pool, scratch_pool));
+ if (work_del_abspath)
+ copied = TRUE; /* Working deletion */
}
else if (!dirent || dirent->kind != svn_node_file)
{