[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: Bert Huijben <bert_at_qqmail.nl>
Date: Thu, 11 Jun 2015 04:44:50 +0000

What do you expect the api to canonicalize things like “h” or "” to?


We can’t make everything a valid url… That is simply impossible. You need to pass something that at least looks like a url. The canonicalize api just forcesany urls that point to the same location to use the same canonical format. It can’t fix all user errors.


If a user passes junk to an api, it can expect junk.


In all these cases the api user can see that we will error on it by calling the is canonical api itself. Catching these problems belongs in a different layer than the canonicalize function that can’t even return an error message.


Note that in general changes to the url and dirent canonicalize rules require a working copy format bump, so there is not that much that can change there, unless we are certain all existing values remain valid… And this specific value is valid on platforms where ‘:’ is valid in local paths.


Bert






Sent from Surface





From: 'Stefan Kueng'
Sent: ‎Wednesday‎, ‎June‎ ‎10‎, ‎2015 ‎10‎:‎22‎ ‎PM
To: Bert Huijben, dev_at_subversion.apache.org







On 10.06.2015 21:04, Bert Huijben wrote:
> I don’t think we can really fix that url in the api by canonicalizing it
> to something completely different/unrelated, but the assertion makes it
> obvious that the caller can just see/check that the url is not going to
> work… just like values such as the empty string or strings with no
> scheme, that can't be canonicalized to a url either.

Such a behavior might be ok for a command line client.
But as you can see from the original report, other clients either need
proper error messages or a canonicalize API that does what its name says
it does.

As it is now, the svn_uri_is_canonical() and the
svn_dirent_canonicalize()/svn_uri_canonicalize() don't really match.


Stefan


--
        ___
   oo // \\ "De Chelonian Mobile"
  (_,\/ \_/ \ TortoiseSVN
    \ \_/_\_/> The coolest interface to (Sub)version control
    /_/ \_\ http://tortoisesvn.net
Received on 2015-06-11 06:57:03 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.