[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: Martin Hauner <martin.hauner_at_gmx.net>
Date: Sat, 24 Oct 2009 18:55:42 +0200

Hi Daniel,

On 24.10.09 14:07, Daniel Shahaf wrote:
> 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).

I did some investigation where the lower case path comes from and it turns out
it has nothing to do with mingw:

$ python
ActivePython 2.5.1.1 (ActiveState Software Inc.) based on
Python 2.5.1 (r251:54863, May 1 2007, 17:47:05) [MSC v.1310 32 bit (Intel)] on
win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import os
>>> os.path.abspath(".")
'c:\\Development\\mingw\\svn-trunk'
>>>

>
>> 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/

Yes, of course, thank you :)

>> 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.

Thanks for explanation, I'll try it the way you suggest. :)

-- 
Martin
Subcommander 2.0.0 Beta 5 - http://subcommander.tigris.org
a Win32/Unix/MacOSX subversion GUI client & diff/merge tool.
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2411063
Received on 2009-10-24 18:55:56 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.