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

Re: Handling of ra_local URL for UNC path

From: Kazutoshi Satoda <k_satoda_at_f2.dion.ne.jp>
Date: Sun, 23 Mar 2008 18:15:29 +0900

Stefan Küng wrote:
> The new form doesn't properly work with UNC paths. Depending on which
> command you use, it sometimes simply doesn't work (in some commands, the
> url is parsed wrong, then an URL like file:////server/folder gets split
> up into file://, server/folder - and 'server/folder' is *not* a valid path).

"file:////server/folder" doesn't work because svn_path_canonicalize()
suppresses double slashes in a URI after the schema.

The old form "file:///\server/folder" is a way to avoid such double
slashes.

> I don't remember which functions have that problem, but I remember the
> discussion on the mailing list where the final word was that for UNC
> paths if the 'new' format doesn't work that users simply could use the
> old format.

I tried some searching, including the following one which I thought
most reliable.
http://www.google.com/custom?sitesearch=svn.haxx.se&q=unc+%22file%3A%2F%2F%22
But I couldn't find the discussion.

While some other searches, I found a FAQ entry which states the new form
of URL for a local repository on a network directory.
http://tortoisesvn.net/node/16
("5 leading slashes" doesn't work with CLI. It works only with TSVN.)

I think the problem no longer exists.

> There isn't a reliable way for those commands to find the
> local path from the url in all situations (without guessing).

I think the best way to find the local path from url is borrowing the
logic from svn_ra_local__split_URL(). (It has special treat for
"localhost", it supports "file:///X|/", it supports an absolute path
for current drive, ...)

I'll make a minimal patch to do this if you like. (See the last part
of this mail.)

> Check your patch: you sometimes just assume the new format when handling
> the urls - the old format would not work anymore.

You are right. I found the wrong part in SVN::UrlToPath(). Sorry.

> Just accept that your patch doesn't work. You said yourself that you
> haven't tested it. And honestly, I don't accept patches which have not
> been tested at least a little bit - the biggest part of every change is
> the testing, not the implementing. And I'm busy enough as it is.
> Let me just say that I checked only the changes to the first two files
> of your patch - that was enough for me to see that it simply can't work.

All right.

If you think such untested patch is generally worse to send, I'll stop
that and will only report the problems. I want to do the way you (or
other devs) favor.

-- 
k_satoda
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe_at_tortoisesvn.tigris.org
For additional commands, e-mail: dev-help_at_tortoisesvn.tigris.org
Received on 2008-03-23 10:15:40 CET

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

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.