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

Re: Potential issue with svn co file:// with drive letters on Windows machines

From: Branko Čibej <brane_at_xbc.nu>
Date: 2002-05-27 20:25:26 CEST

Joshua Jensen wrote:

>I have a local test repository located at e:\svn\repos.
>
>From a different drive, I try the following:
>
>-------------
>
>[S:\svntest2]svn co file:///e:/svn/repos
>
>svn_error: #21097 : <Couldn't find a repository.>
> Unable to open an ra_local session to URL
>
>svn_error: #21097 : <Couldn't find a repository.>
> svn_ra_local__split_URL: Unable to find valid repository
>
>
This is a known issue. We don't parse the drive part of the URL
correctly on Windows.

>-------------
>
>All variations yield similar results. If I do:
>
>[E:\svntest2]svn co file:///svn/repos
>
>The checkout is fine.
>
>My solution was to open libsvn_ra_local/split_url.c and add the #ifdef
>below:
>
> /* Currently, the only hostnames we are allowing are the empty
> string and 'localhost' */
> if ((hostname != path) && (memcmp (hostname, "localhost", 9)))
> return svn_error_create
> (SVN_ERR_RA_ILLEGAL_URL, 0, NULL, pool,
> ("svn_ra_local__split_URL: URL contains unsupported hostname"));
>
>#ifdef WIN32
> path++;
>#endif WIN32
>
No. We should use the URL-parsing code in apr-util, and make sure /that/
works correctly. In the meantime, just put the repo on the same drive as
the working copy.

>I'm sure this isn't a complete solution, but it solves the drive letter
>problem above. I actually think the command should be:
>
>[S:\svntest2]svn co file://e:/svn/repos
>
>with the removal of the third slash, because this more closely mirrors
>web browser file:// support.
>

All the browsers I've seen put three slashes there, which I think is
correct (there can be a host name between the second and third slash).

-- 
Brane Čibej   <brane_at_xbc.nu>   http://www.xbc.nu/brane/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Mon May 27 20:26:50 2002

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.