Blair Zajac wrote:
> I'm surprised this one hasn't been found yet.
> $ svn log file://
> svn_path_basename: Assertion `is_canonical (path, len)' failed.
> Aborted (core dumped)
As Peter indicated, it has been found. A partial fix was applied and, in the
trunk, "file://" fails gracefully, but a quick test just now shows that it
fails in the wrong way (regarding that as a local path rather than a URL), and
anyway "file:///" still crashes. It seems to be a fault in making/checking a
$ svn log file://
svn: 'file:' is not under version control
$ svn log file:///
[...]svn_path_basename: Assertion `is_canonical(path, len)' failed.
$ svnversion .
18553M (my modifications are not related to this issue)
To provide a starting point for continuing the discussion, this is what I last
wrote about it in issue #2116
------- Additional comments from Julian Foad Mon Aug 1 08:59:47 -0800 2005
The patch to fix the assertion failure by correcting svn_path_is_url() has
already been applied.
I am now attaching a patch to fix the remaining issue which is correcting
svn_path_canonicalize(), with a regression test and some other related tests.
This patch is extracted from Uwe Zeisberger's latest patch, updated to apply to
the current head of trunk, with the log message and whitespace tweaked by me.
I have one concern: the patch accepts an empty hostname, which is fine for
"file:///", but asks in a comment, "Can URIs of other types have an empty host?"
It allows "http://" which causes an empty host name to be looked up on the
network (as far as I can tell from a quick manual test). This results in the
following error message:
$ svn ls http://
svn: PROPFIND request failed on '/'
svn: PROPFIND of '/': Could not resolve hostname `': Host not found (http://)
Previously, this resulted in a perhaps incorrect error, but with no network access:
$ svn ls http://
svn: 'http:' has no URL
I'm not sure that allowing "http://" through to a network look-up is acceptable.
------- Additional comments from Julian Foad Mon Aug 1 09:01:40 -0800 2005
Created an attachment (id=497)
Patch for svn_path_canonicalize() to allow an empty hostname, e.g. "file://".
To unsubscribe, e-mail: firstname.lastname@example.org
For additional commands, e-mail: email@example.com
Received on Wed Feb 22 13:45:57 2006