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

[PATCH] Re: mingw32 test failure: svn_dirent_is_canonical

From: Martin Hauner <martin.hauner_at_gmx.net>
Date: Sun, 25 Oct 2009 11:09:52 +0100

Hi,

On 24.10.09 19:45, Daniel Shahaf wrote:
> Martin Hauner wrote on Sat, 24 Oct 2009 at 18:55 +0200:
>> 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'
>>>>>
>>
>
> This explains why the lowercase 'c' appears (because svntest/main.py does
> the equivalent of "file://`pwd`" to construct the URL for the 'import'
> command). But why is the assertion unique to your environment? Are you
> the only windows builder using ActivePython?

Yes, that is strange.

Maybe the code recently changed on trunk? Before trying the mingw stuff on
trunk, I already tried it on the 1.6.x branch. And there I didn't have this
problem... Most of the python test did run without error.

> /me investigates...
>
> I think the assertion is caused not by the lowercase drive letter, but by
> the colon following it being URI-encoded. In other words,
>
> svn info file:///c:/foo # works
> svn info file:///c%3A/foo # asserts
>
> Can you confirm this?

No.
There is an svn_path_uri_decode call inside svn_ra_local__split_URL that
replaces the '%3A' with ':'. I single stepped through the code and it fails
because of the case mismatch.

Unfortunately with the attached patch the python tests still don't run properly.
They don't hit the assertion anymore but now fail with the same error checking
their output.

Not exactly sure what this means..

Couldn't find node 'C:' in expected output tree
  * Node name: C:
     Path: __SVN_ROOT_NODE\C:
     Contents: N/A (node is a directory)
     Properties: {}
     Attributes: {}
     Children: 1
ACTUAL OUTPUT TREE:
<python stack trace follows>

But there is a little improvement... :)

-- 
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=2411148

Received on 2009-10-25 11:10:27 CET

This is an archived mail posted to the Subversion Dev mailing list.