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

Re: mingw32 test failure: svn_dirent_is_canonical

From: Daniel Shahaf <d.s_at_daniel.shahaf.name>
Date: Sat, 24 Oct 2009 14:07:54 +0200 (Jerusalem Standard Time)

Martin Hauner wrote on Sat, 24 Oct 2009 at 11:57 +0200:
> Hi I'm trying to make subversion run on mingw32.
>
> Running any python test fails because of a drive letter case mismatch. I found

I'd be interested to know what mingw does differently that breaks
our expectations (causing this assertion).

> Assertion failed: svn_dirent_is_canonical(base, pool), file
> subversion/libsvn_subr/dirent_uri.c,
> line 879
>
>
> The problem is the lower drive 'c' in "file:///c%3A/Development/ming/svn-trunk...".
>
> svn_dirent_is_canonical does not except lower case drive letters.
>

s//accept/

> When it asserts the callstack is:
>
> 0 svn_dirent_join dirent_uri.c 879
> 1 check_repos_path repos.c 1266
> 2 svn_repos_find_root_path repos.c 1371
> 3 svn_ra_local__split_URL split_url.c 136
> 4 svn_ra_local__open ra_plugin.c 455
> 5 svn_ra_open3 ra_loader.c 487
> 6 svn_client__open_ra_session_internal ra.c 331
> 7 get_ra_editor commit.c 616
> 8 svn_client_import3 commit.c 736
> 9 svn_cl__import import-cmd.c 119
> 10 main main.c 2195
>
>
> In svn_ra_local__split_URL there is Windows specific code that excepts lower
> case drive letters. This doesn't fit with svn_dirent_is_canonical not excepting
> lower case rive letters.
>
> A fix would be to canonicalized the file:///c%3A url. Where would I add it?
> Directly in svn_ra_local__split_URL or some levels up?

I think you'll find the URL is already canonical (since as early as
parsing argv), but URL canonicalization doesn't force the drive letter
to uppercase. In other words, svn_ra_local__split_URL() got a canonical
URL but passed down a non-canonical dirent (local path).

So, IMO, change svn_ra_local__split_URL() to canonicalize (or assert
canonicity of) the dirent it creates before passing it down.

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2411023
Received on 2009-10-24 14:08:14 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.