You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by gs...@apache.org on 2010/05/12 02:14:09 UTC
svn commit: r943346 - /subversion/trunk/subversion/libsvn_wc/adm_crawler.c
Author: gstein
Date: Wed May 12 00:14:09 2010
New Revision: 943346
URL: http://svn.apache.org/viewvc?rev=943346&view=rev
Log:
Fix the revision reporter/crawler to properly handle subdirectories
obstructed by a file. Prior to this fix, it would attempt to recurse into
that file.
History: this section classically included an svn_wc__adm_missing check.
That was replace by an entry fetch in r877435 (aka r37361), which would
return an error if the true contents were not available and a stub was
returned. That entry-based logic was replaced in r879065 (aka r38991) with
wc-ng code, and lost the test.
An upcoming unit test will set up this obstruction condition, and this
revision fixes/is-necessary for that test to complete properly.
* subversion/libsvn_wc/adm_crawler.c:
(report_revisions_and_depths): if the node is obstructed, the skip
reporting or recursing on it.
Modified:
subversion/trunk/subversion/libsvn_wc/adm_crawler.c
Modified: subversion/trunk/subversion/libsvn_wc/adm_crawler.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/adm_crawler.c?rev=943346&r1=943345&r2=943346&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/adm_crawler.c (original)
+++ subversion/trunk/subversion/libsvn_wc/adm_crawler.c Wed May 12 00:14:09 2010
@@ -535,8 +535,26 @@ report_revisions_and_depths(svn_wc__db_t
&& (depth > svn_depth_files
|| depth == svn_depth_unknown))
{
- svn_boolean_t is_incomplete = (this_status == svn_wc__db_status_incomplete);
- svn_boolean_t start_empty = is_incomplete;
+ svn_boolean_t is_incomplete;
+ svn_boolean_t start_empty;
+
+ /* If the subdir and its administrative area are not present,
+ then do NOT bother to report this node, much less recurse
+ into the thing.
+
+ Note: if the there is nothing on the disk, then we may have
+ reported it missing further above.
+
+ ### hmm. but what if we have a *file* obstructing the dir?
+ ### the code above will not report it, and we'll simply
+ ### skip it right here. I guess with an obstruction, we
+ ### can't really do anything with info the server might
+ ### send, so maybe this is just fine. */
+ if (this_status == svn_wc__db_status_obstructed)
+ continue;
+
+ is_incomplete = (this_status == svn_wc__db_status_incomplete);
+ start_empty = is_incomplete;
if (depth_compatibility_trick
&& this_depth <= svn_depth_files