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

Re: svn commit: r22349 - trunk/subversion/libsvn_subr

From: <svnlgo_at_mobsol.be>
Date: 2006-11-20 18:13:20 CET

Quoting David James <james@cs.toronto.edu>:

> On 11/19/06, lgo@tigris.org <lgo@tigris.org> wrote:
> > Reimplement svn_path_is_absolute. To improve its performance, don't use
> > the slow apr_filepath_root function.
> >
> > * subversion/libsvn_subr/path.c
> > (svn_path_is_absolute): replace call to apr_filepath_root with a custom
> > and faster implementation
>
> Excellent work, Lieven! This implementation should have great
> performance characteristics. It's exactly the implentation I was
> thinking of.
>
> A few questions:
> 1. Should the #if block apply to CYGWIN as well as WIN32? I think
> that cygwin allows for H:/ paths as well.
Well it seems so. I was under the impression that the use of the '/cygdrive/h'
syntax is mandatory, but it supports the 'H:' syntax too. That means that all
the unit tests have to be adapted too.

> 2. Is the "pool" argument still needed? If not, we should remove it
> (and update all callers), so as to save the caller the overhead of
> creating a pool.
Nope, I'll remove it.

> 3. Do you plan to update svn_path_is_root with a similar performance fix?
Yes! That one is in fact more important.

The only thing that's left to determine is whether or not '//drive/share' is a
root path on Cygwin or not. For apr it's a root path on Windows, but not on
Cygwin. I don't think that's correct. It's also why the unit tests are
currently failing in the Cygwin build.

If one has a working copy on the root of a shared drive //drive/share,
subversion requires that //drive/share is considered a root path. If not, it
will try to open '//drive' and check if there's an .svn folder so it can lock
the whole shared drive. Suppose one happens to have a shared drive
//drive/.svn, that's bound to fail.

So basically our is_root needs to check whether or not we can have *write*
access on the parent of the path. In apr, it seems to test whether it can have
*read* access. Indeed, in Cygwin we can do 'cd //drive' and then 'ls', which we
cannot in Windows.

Lieven

----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Mon Nov 20 18:13:46 2006

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