On 11.06.2015 12:56, Daniel Shahaf wrote: > Branko Čibej wrote on Thu, Jun 11, 2015 at 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. > So every call to svn_uri_canonicalize() should be followed by an "if > svn_uri_is_canonical()" test? > > At the very least, that should be documented. > > I'd consider having the function promise that the return value either > passes _is_canonical() or is equal to NULL.
I was thinking about that but I believe we can't begin returning NULL from that function. We'd have to revise the API. -- Brane