Hi! [[[ As part of WC-NG, remove a use of svn_wc_entry_t.
* subversion/libsvn_client/status.c (svn_client_status5): Use svn_wc__node_is_status_added() instead of checking entry->schedule. The check is meant to be used for correctly determining when a node has been deleted in the repo when running 'svn status -u'. ]]] make check passes. Since I've heard that all the easy replacements of svn_wc_entry_t has already been done, I submit this patch for review. Am I missing someting? Is there some cases when svn_wc_schedule_add does not equal the output of svn_wc__node_status_is_added()? I can think of the case of a replacement. That would be svn_wc_schedule_replace for entry->schedule. But _is_status_deleted() just returns that the node is added. Not a problem though, since we're interrested in the cases where a path exists in a previous revision, if we're doing a replace, the path must exist (e.g. be in BASE) in our wc. Doing a test with two wc's from the same rev: wc1>svn rm A/D/G/pi wc1>svn ci -m "" wc2>svn rm A/D/G/pi wc2>touch A/D/G/pi wc2>svn add A/D/G/pi wc2>svn st R A/D/G/pi wc2>svn st -u R * 1 A/D/G/pi cheers, Daniel
Index: subversion/libsvn_client/status.c =================================================================== --- subversion/libsvn_client/status.c (revision 935319) +++ subversion/libsvn_client/status.c (working copy) @@ -391,17 +391,16 @@ svn_client_status5(svn_revnum_t *result_rev, &kind, pool)); if (kind == svn_node_none) { - const svn_wc_entry_t *entry; - SVN_ERR(svn_wc__get_entry_versioned(&entry, ctx->wc_ctx, - dir_abspath, svn_node_dir, - FALSE, FALSE, - pool, pool)); + svn_boolean_t is_added; + SVN_ERR(svn_wc__node_is_status_added(&is_added, ctx->wc_ctx, + dir_abspath, pool)); + /* Our status target does not exist in HEAD of the repository. If we're just adding this thing, that's fine. But if it was previously versioned, then it must have been deleted from the repository. */ - if (entry->schedule != svn_wc_schedule_add) + if (! is_added) sb.deleted_in_repos = TRUE; /* And now close the edit. */