Windows long path experimenting report

Adrian Buehlmann adrian at cadifra.com
Sun Jun 22 10:57:50 CDT 2008


On 22.06.2008 11:31, Adrian Buehlmann wrote:
> On 22.06.2008 10:30, Adrian Buehlmann wrote:
>> Interestingly, I can navigate into auxtest2\aux with explorer
>> and modify auxtest2\aux\a.txt with Notepad++
>>
>> But status is not prepared to this:
>>
>>> hgt sta
>> --- running hg from W:\hg-longpath
>> creating file: \\?\W:\tmp\auxtest2\.hg\requires
>> creating file: \\?\W:\tmp\auxtest2\.hg\dirstate
>> creating file: \\?\W:\tmp\auxtest2\.hg\dirstate
>> abort: The parameter is incorrect: W:\tmp\auxtest2\.\aux
> 
>> hgt sta --traceback
> --- running hg from W:\hg-longpath
> creating file: \\?\W:\tmp\auxtest2\.hg\requires
> creating file: \\?\W:\tmp\auxtest2\.hg\dirstate
> creating file: \\?\W:\tmp\auxtest2\.hg\dirstate
> Traceback (most recent call last):
>   File "W:\hg-crew-scratch\mercurial\dispatch.py", line 45, in _runcatch
>   File "W:\hg-crew-scratch\mercurial\dispatch.py", line 364, in _dispatch
>   File "W:\hg-crew-scratch\mercurial\dispatch.py", line 417, in _runcommand
>   File "W:\hg-crew-scratch\mercurial\dispatch.py", line 373, in checkargs
>   File "W:\hg-crew-scratch\mercurial\dispatch.py", line 356, in <lambda>
>   File "W:\hg-crew-scratch\mercurial\commands.py", line 2661, in status
>   File "W:\hg-crew-scratch\mercurial\localrepo.py", line 1008, in status
>   File "W:\hg-crew-scratch\mercurial\dirstate.py", line 622, in status
>   File "W:\hg-crew-scratch\mercurial\dirstate.py", line 581, in statwalk
>   File "W:\hg-crew-scratch\mercurial\dirstate.py", line 524, in findfiles
>   File "W:\hg-crew-scratch\mercurial\osutil.py", line 32, in listdir
> WindowsError: [Error 87] The parameter is incorrect: 'W:\\tmp\\auxtest2\\.\\aux'
> abort: The parameter is incorrect: W:\tmp\auxtest2\.\aux

Hmm. Looks like we would have to insert a variant of osutil.listdir using
win32file here.

So this touches bos' dirstate walk speedup cmason recently mentioned on IRC.
There is a c module, with a fallback to Python for non-posix systems.
So I could ignore the c code and touch the Python code only.

This is a bit more complicated than what I had to tweak so far... (working
dir / dirstate side seems harder to tweak indeed).

See also:
http://hg.intevation.org/mercurial/crew/rev/5105b119edd2
http://www.selenic.com/pipermail/mercurial-devel/2007-September/003063.html


More information about the Mercurial-devel mailing list