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

Re: URL problem

From: Marculescu Paul <paul_at_compaq.p16.pub.ro>
Date: 2002-05-31 20:20:09 CEST

On 31 May 2002, Ben Collins-Sussman wrote:

> I'm not sure what light is throwable here.
>
> The simple explanation here is that ra_local (svn_ra_local__split_URL)
> removes the file:// part of the URL, which leaves an absolute path.

The problem isn't in how the component paths are removed, but in how the URL is splited.
Let's consider my example again, please.

So, the repository is on D:/svntest/repos.
I'm on C:\.
I want to checkout the repository in the folder D:\svntest\wc.
I write:

C:\> svn co file:///svntest/repos -d D:/svntest/wc

This doesn't work, because the ra_local routines try to open my repository
from C:/svntest/repos, as I run the command on C:\
If I modify the URL to file:///D:/svntest/repos in order to specify the drive D:,
in the svn_ra_local__split_URL(), after running through the following code:

hostname = url_data + 7;
path = strchr (hostname, '/');

path becomes /D:/svntest/repos and the DB_WRAP() function called from
svn_fs_open_berkeley() fails( because of the '/' before th 'D', I guess).

I suggest to modify the code in svn_ra_local__split_URL() to handle the
path depending on the platform. Something like:

path = strchr (hostname, '/');
#ifdef WIN32
 if( path[2] == ':' )
   path++;
#endif

I wouldn't insist so much on this, but there must be a workarround for it,
because I'm kind of stucked in writting the wxWindows client.

> Then it starts searching down the absolute path, trying to open a
> repository at each path component. Once it's able to open a
> repository, it assumes the remaining path is one which exists *within*
> the repository.
>
> Should this function somehow be looking for windows drive letters?
> Should APR be helping out here somehow (I hope?)
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Jun 1 14:11:33 2002

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