[PATCH] Fix util._statfiles_clustered() failing at root of a windows drive

Patrick Mézard pmezard at gmail.com
Sat Nov 1 09:07:26 CDT 2008


Andrei Vermel a écrit :
>  
>> What problem does it solve ?
>>
>> ""
>> X:\>echo a > a
>>
>> X:\>python
>> Python 2.5.1 (r251:54863, Apr 18 2007, 08:51:08) [MSC v.1310 
>> 32 bit (Intel)] on win32
>> Type "help", "copyright", "credits" or "license" for more information.
>>>>> from mercurial.util import _statfiles_clustered
>>>>> [s.st_size for s in _statfiles_clustered(['x:\\a'])]
>> [4L]
>> """
> 
> Sorry, missed the last bit.
> 
> M:\>ls
> qqq.txt
> 
> M:\>python
> ActivePython 2.4.3 Build 12 (ActiveState Software Inc.) based on
> Python 2.4.3 (#69, Apr 11 2006, 15:32:42) [MSC v.1310 32 bit (Intel)] on
> win32
> Type "help", "copyright", "credits" or "license" for more information.
>>>> from mercurial.util import _statfiles_clustered
>>>> [s for s in _statfiles_clustered(['x:\\qqq.txt'])]
> [None]

"""
Python 2.4.4 (#71, Oct 18 2006, 08:34:43) [MSC v.1310 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> from mercurial.util import _statfiles_clustered
>>> [s.st_size for s in _statfiles_clustered(['x:\\a'])]
[4L]
"""

I cannot reproduce with or without osutil.pyd. Is it 2.4.3 vs 2.4.4 ? ActiveState vs non-ActiveState ? Looks unlikely. I'd really like to understand what's going wrong instead of patching blindly. I suppose the failure comes from osutil.listdir() when called with drive paths ? Does it fail with the C extension or without or in both cases ?

--
Patrick Mézard



More information about the Mercurial-devel mailing list