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

Re: svn commit: r34480 - trunk/subversion/libsvn_wc

From: Greg Stein <gstein_at_gmail.com>
Date: Sun, 30 Nov 2008 12:43:19 -0800

On Sun, Nov 30, 2008 at 09:00, <sbutler_at_tigris.org> wrote:
> Author: sbutler
> Date: Sun Nov 30 09:00:55 2008
> New Revision: 34480
>
> Log:
> The tree-conflict detection code is now safe for serf (in update and
> switch, which weren't safe before). Instead of setting and unsetting
> a "global" current-conflict path, the update editor simply checks if
> the current path being deleted, added or opened is within an
> already-encountered conflict (tree or property).

This is so much better! It isn't as fragile around the ordering (say,
"coupling!"), and is simply much clearer what is happening. And that
the recording of trees happens up front rather than having to call
remember_skipped_path() from *everywhere*.

>...
> +++ trunk/subversion/libsvn_wc/update_editor.c Sun Nov 30 09:00:55 2008 (r34480)
>...
> +/* Return TRUE if PATH or any of its ancestor is in the set of skipped
> + * trees, otherwise return FALSE. Use SCRATCH_POOL for allocations. */
> +static svn_boolean_t
> +in_skipped_tree(struct edit_baton *eb,
> + const char *path,
> + apr_pool_t *scratch_pool)
> +{
> + char *ancestor = apr_pstrdup(scratch_pool, path);

No need for the dup or the non-const. You're not modifying the parameter.

> +
> + while (! svn_path_is_empty(ancestor))
> + {
> + if (apr_hash_get(eb->skipped_trees, ancestor, APR_HASH_KEY_STRING))
> + return TRUE;
> +
> + ancestor = svn_path_dirname(ancestor, scratch_pool);
> + }
> +
> + return FALSE;
> +}

>...

Cheers,
-g

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: dev-help_at_subversion.tigris.org
Received on 2008-11-30 21:43:44 CET

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.