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

Re: svn commit: r34186 - in trunk/subversion: libsvn_client libsvn_wc tests/cmdline

From: Julian Foad <julianfoad_at_btopenworld.com>
Date: Fri, 14 Nov 2008 23:43:54 +0000

On Fri, 2008-11-14 at 11:53 +0000, Stefan Sperling wrote:
> On Thu, Nov 13, 2008 at 10:10:16PM -0800, neels_at_tigris.org wrote:
> > Modified: trunk/subversion/libsvn_client/resolved.c
> > URL: http://svn.collab.net/viewvc/svn/trunk/subversion/libsvn_client/resolved.c?pathrev=34186&r1=34185&r2=34186
> > ==============================================================================
[...]
> > + /* Make sure we do not end up looking for tree conflict info
> > + * above the working copy root. */
> > + SVN_ERR(svn_wc_is_wc_root(&wc_root, path, adm_access, pool));
> > + if (wc_root)
> > + {
> > + /* Switched subtrees are considered working copy roots by
> > + * svn_wc_is_wc_root(). But it's OK to check for tree conflict
> > + * info in the parent of a switched subtree, because the
> > + * subtree itself might be a tree conflict victim. */
> > + SVN_ERR(svn_wc_entry(&entry, path, adm_access, TRUE, pool));
> > +
> > + if (entry->kind == svn_node_dir)
> > + {
> > + svn_error_t *err;
> > + svn_boolean_t switched;
> > +
> > + err = svn_wc__path_switched(path, &switched, entry, pool);
> > +
> > + if (err && (err->apr_err == SVN_ERR_ENTRY_MISSING_URL))
> > + svn_error_clear(err);
>
> Could you add a comment explaining what condition you are catching
> by ignoring this error? In both places -- there's another instance of
> this, see below. I guess it might have to do with unversioned
> directories in the working copy, but I'm not sure if my guess is correct.
>
> > + else
> > + {
> > + SVN_ERR(err);
> > + wc_root = switched ? FALSE : TRUE;
> > + }
> > + }

> > Modified: trunk/subversion/libsvn_wc/adm_ops.c
> > URL: http://svn.collab.net/viewvc/svn/trunk/subversion/libsvn_wc/adm_ops.c?pathrev=34186&r1=34185&r2=34186
> > ==============================================================================
[...]
> > + /* Make sure we do not end up looking for tree conflict
> > + * info above the working copy root. */
> > +
> > + if (entry && (entry->kind == svn_node_dir))
> > + {
> > + SVN_ERR(svn_wc_is_wc_root(&wc_root, path, baton->adm_access, pool));
> > +
> > + if (wc_root)
> > + {
> > + /* Switched subtrees are considered working copy roots by
> > + * svn_wc_is_wc_root(). But it's OK to check for tree conflict
> > + * info in the parent of a switched subtree, because the
> > + * subtree itself might be a tree conflict victim. */
> > + svn_boolean_t switched;
> > + svn_error_t *err;
> > + err = svn_wc__path_switched(path, &switched, entry, pool);
> > + if (err && (err->apr_err == SVN_ERR_ENTRY_MISSING_URL))
> > + svn_error_clear(err);
>
> .... here.

We need to document that "svn_wc_is_wc_root()" doesn't do what we were
thinking it would do. Done in r34211.

We need to abstract out this chunk of code, give it a name and a
description. svn_wc_is_really_really_wc_root().

- Julian

---------------------------------------------------------------------
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-15 00:44:13 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.