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

Re: path.c:113: svn_path_join: Assertion `is_canonical (base, blen)' failed.

From: Greg Hudson <ghudson_at_MIT.EDU>
Date: 2004-08-26 17:20:36 CEST

On Thu, 2004-08-26 at 04:52, Ben Reser wrote:
> Honestly, I think it was a mistake to make our internal APIs accept URIs
> and local file paths interchangebly. Our code that looks for URIs
> thinks that foo://localhost is a valid URI (it technically is even
> though SVN has no knowledge of a foo schema) so we treat it as a URI.

There's no real problem here, since such a path is non-canonical (and
thus unusual) and in the same form as a URI. Certainly, if we were to
add support for a foo URI scheme, it would be better that foo://bar
pathnames already didn't work.

> Thus I propose that svn_path_dirname() be fixed to understand that the
> hostname portion of a URI is the root and can not be split.
> svn_path_basename() will also have to be adjusted so it can recognize
> when this occurs and return no basename.

-1. svn_path_dirname accepts a canonical path (not URL;
svn_path_canonicalize is documented as accepting a URL, but
svn_path_dirname is not). Canonical paths do not have double slashes,
contrary to what you said in your response to yourself.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Thu Aug 26 17:21:10 2004

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.