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 2010/08/03 17:45:58 UTC
svn commit: r981937 -
/subversion/trunk/subversion/libsvn_wc/ambient_depth_filter_editor.c
Author: rhuijben
Date: Tue Aug 3 15:45:57 2010
New Revision: 981937
URL: http://svn.apache.org/viewvc?rev=981937&view=rev
Log:
Update the ambient depth filter to handle excluded files just like
excluded directories. (Before WC-NG you could only exclude directories).
This should fix handling excluded files from pre-depth (read <=1.4)
repositories.
* subversion/libsvn_wc/ambient_depth_filter_editor.c
(make_file_baton): Check status for excluded before assuming that
a file shouldn't be excluded, but allow pulling in excluded items.
Modified:
subversion/trunk/subversion/libsvn_wc/ambient_depth_filter_editor.c
Modified: subversion/trunk/subversion/libsvn_wc/ambient_depth_filter_editor.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/ambient_depth_filter_editor.c?rev=981937&r1=981936&r2=981937&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/ambient_depth_filter_editor.c (original)
+++ subversion/trunk/subversion/libsvn_wc/ambient_depth_filter_editor.c Tue Aug 3 15:45:57 2010
@@ -271,6 +271,10 @@ make_file_baton(struct file_baton **f_p,
{
struct file_baton *f = apr_pcalloc(pool, sizeof(*f));
struct edit_baton *eb = pb->edit_baton;
+ svn_wc__db_status_t status;
+ svn_wc__db_kind_t kind;
+ svn_boolean_t hidden;
+ const char *abspath;
SVN_ERR_ASSERT(path);
@@ -281,28 +285,22 @@ make_file_baton(struct file_baton **f_p,
return SVN_NO_ERROR;
}
+ abspath = svn_dirent_join(eb->anchor_abspath,
+ svn_dirent_skip_ancestor(eb->anchor_abspath,
+ path),
+ pool);
+
+ SVN_ERR(ambient_read_info(&hidden, &status, &kind, NULL,
+ eb->db, abspath, eb->read_base, pool));
+
if (pb->ambient_depth == svn_depth_empty)
{
/* This is not a depth upgrade, and the parent directory is
depth==empty. So if the parent doesn't
already have an entry for the file, then the parent
doesn't want to hear about the file at all. */
- svn_wc__db_kind_t kind;
- svn_boolean_t unavailable;
- const char *abspath;
-
- abspath = svn_dirent_join(eb->anchor_abspath,
- svn_dirent_skip_ancestor(eb->anchor_abspath,
- path),
- pool);
-
- SVN_ERR(ambient_read_info(&unavailable, NULL, &kind, NULL,
- eb->db, abspath, eb->read_base, pool));
-
- if (kind == svn_wc__db_kind_unknown)
- unavailable = TRUE;
-
- if (unavailable)
+
+ if (hidden || kind == svn_wc__db_kind_unknown)
{
f->ambiently_excluded = TRUE;
*f_p = f;
@@ -310,6 +308,16 @@ make_file_baton(struct file_baton **f_p,
}
}
+ /* If pb->ambient_depth == svn_depth_unknown we are pulling
+ in new nodes */
+ if (pb->ambient_depth != svn_depth_unknown
+ && status == svn_wc__db_status_excluded)
+ {
+ f->ambiently_excluded = TRUE;
+ *f_p = f;
+ return SVN_NO_ERROR;
+ }
+
f->edit_baton = pb->edit_baton;
*f_p = f;