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

Re: [PATCH] In status -u, use target as anchor if target is a versioned directory.

From: Malcolm Rowe <malcolm-svn-dev_at_farside.org.uk>
Date: 2007-04-04 11:22:49 CEST

On Tue, Apr 03, 2007 at 05:08:48PM +0200, Lieven Govaerts wrote:
> Malcolm Rowe wrote:
> > If you're right (that this is okay from a correctness standpoint, and
> > that it's more efficient), this logic should be inlined directly into
> > svn_wc_adm_open_anchor(), I'd have thought.
> >
> That thought crossed my mind, but svn_wc_adm_open_anchor is used in
> other places too, where write locks are needed for instance. Are there
> no situations where opening the parent directory is needed even when the
> target is a directory?
>

I can't think of any offhand, though I'd suggest the easiest way to tell
is just to try it and see if any tests break. We have reasonable test
coverage for this area of libsvn_wc, so that's not as silly as it first
sounds.

As Daniel says, we sometimes need _access_ to the parent directory
(typically, to the wc root), but I'm not aware of anywhere we need the
parent to be the anchor. (That is, given directory wc/A/, I believe
that either choice of {anchor wc/, target A/} or {anchor wc/A/, target
null} _should_ always be valid.)

Anyway, svn_wc_adm_open_anchor() is trying to solve exactly that
problem, so if you have a generic fix, I'd put it there. (And it it's
not generic, it may not be appropriate for 'status -u' either, if we've
missed something).

Ah, one possibility where {anchor wc/, target A/} might be necessary is
when A/ is schedule-deleted. What does 'status -u' do in that case?

Regards,
Malcolm

  • application/pgp-signature attachment: stored
Received on Wed Apr 4 11:23:07 2007

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.