[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: svn commit: r31724 - branches/issue-2843-dev/subversion/libsvn_wc

From: Karl Fogel <kfogel_at_red-bean.com>
Date: Sat, 14 Jun 2008 20:58:08 -0400

firemeteor_at_tigris.org writes:
> Log:
> On issue-2843-dev branch.
>
> Make 'svn update' totally work for svn_depth_exclude. The next step will be a
> test suite for this.
>
> [in subversion/libsvn_wc]
>
> * ambient_depth_filter_editor.c, update_editor.c
> (make_dir_baton): Permit explicitly pull in excluded target.
> (complete_directory): Similar, clear the exclude flag in this situation.
>
> * adm_crawler.c
> (report_revision_and_depths): Explicitly report exclude.
> (svn_wc_crawl_revisions3): Document update.

Same comment about using full relative paths.

> --- branches/issue-2843-dev/subversion/libsvn_wc/adm_crawler.c (r31723)
> +++ branches/issue-2843-dev/subversion/libsvn_wc/adm_crawler.c (r31724)
> @@ -278,6 +278,19 @@ report_revisions_and_depths(svn_wc_adm_a
> continue;
> }
>
> + /* Report the excluded path, no matter whether report_everything. */
> + if (current_entry->depth == svn_depth_exclude)
> + {
> + SVN_ERR(reporter->set_path(report_baton,
> + this_path,
> + SVN_INVALID_REVNUM,
> + svn_depth_exclude,
> + FALSE,
> + NULL,
> + iterpool));
> + continue;
> + }
> +

I think it would be good for this comment to explain in more detail why
we're reporting the excluded path always.

> @@ -507,6 +520,9 @@ svn_wc_crawl_revisions3(const char *path
> if ((! entry) || ((entry->schedule == svn_wc_schedule_add)
> && (entry->kind == svn_node_dir)))
> {
> + /* Don't even check the exclude flag for target.
> + Remember that we permit explicitly pull in target. */
> +

Do you mean "explicitly pulled-in target"?

I'm not sure I understand how to connect the first sentence in that
comment with the second sentence.

> --- branches/issue-2843-dev/subversion/libsvn_wc/ambient_depth_filter_editor.c (r31723)
> +++ branches/issue-2843-dev/subversion/libsvn_wc/ambient_depth_filter_editor.c (r31724)
> @@ -133,7 +133,10 @@ make_dir_baton(struct dir_baton **d_p,
> if (path)
> d->path = svn_path_join(d->path, path, pool);
>
> - if (pb)
> + /* The svn_depth_unknown means that: 1) pb is the anchor; 2) there
> + is an non-null target, for which we are preparing the baton.
> + This enables explicitly pull in the target. */
> + if (pb && pb->ambient_depth != svn_depth_unknown)
> {
> const svn_wc_entry_t *entry;
> svn_boolean_t exclude;
> @@ -152,10 +155,7 @@ make_dir_baton(struct dir_baton **d_p,
> else
> {
> /* If the parent expect all children by default, only exclude
> - it whenever it is explicitly marked as exclude. The
> - svn_depth_unknown means that: 1) pb is the anchor; 2) there
> - is an non-null target, for which we are preparing the baton.
> - This enables explicitly pull in the target. */
> + it whenever it is explicitly marked as exclude. */
> exclude = entry && entry->depth == svn_depth_exclude;

Parens would help readability a lot.

> --- branches/issue-2843-dev/subversion/libsvn_wc/update_editor.c (r31723)
> +++ branches/issue-2843-dev/subversion/libsvn_wc/update_editor.c (r31724)
> @@ -474,10 +474,11 @@ complete_directory(struct edit_baton *eb
> mark this directory complete. */
> if (is_root_dir && *eb->target)
> {
> - if (eb->depth_is_sticky)
> + /* Before we can finish, we may need to clear the exclude flag for
> + target. Also give a chance to the target that is explicitly pulled
> + in. */
> + if (eb->depth_is_sticky || *eb->target)
> {
> - /* Before we can finish, we may need to clear the exclude flag for
> - target */
> SVN_ERR(svn_wc_adm_retrieve(&adm_access,
> eb->adm_access, path, pool));
> SVN_ERR(svn_wc_entries_read(&entries, adm_access, TRUE, pool));

*nod* I think to completely understand this commit, I'll need to just
review the code as a whole -- that is, just go over the file, not the
diff. I was planning to do that anyway, though.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: dev-help_at_subversion.tigris.org
Received on 2008-06-15 02:58:42 CEST

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.