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

Re: Assertion Failure dialogs appear when attempting to open repository with bad URL

From: Branko Čibej <brane_at_wandisco.com>
Date: Thu, 11 Jun 2015 09:01:01 +0200

On 10.06.2015 19:34, Stefan Kueng wrote:
>
>
> On 10.06.2015 19:06, Bert Huijben wrote:
>> Hi Dean,
>>
>> There is not much we can do about this. The Subversion apis require that
>> you pass canonical urls, while the client (TortoiseSVN) that you use
>> doesn’t canonicalize the url before passing it to this api.
>
> And that's what the svn_dirent_canonicalize() and
> svn_uri_canonicalize() APIs are for.
> Problem is: in that case they don't work:
>
> $ svn list file:///c:Software/SourceCodeRepository
>
> try that with an svn build from the 1.9.x branch and you'll get an
> exception.

I think we can all agree that crashing in a function like that is a bad
idea, but there's not much we can do here. API users should check their
input for validity.

But there's a deeper philosophical problem here:

    c:Software/SourceCodeRepository

is actually a valid path on Windows; however it's neither an absolute
nor a relative path but that hybrid mutant called a "device-relative
path". In other words, it might or might not work, depending on context.
Technically we /can/ construct an absolute path but the result will
change depending on OS context that we have no control over.

-- Brane
Received on 2015-06-11 09:01:10 CEST

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.