Windows people: please help check idea for a new Mercurial repository layout

Patrick Mézard pmezard at gmail.com
Mon Jun 16 09:24:25 CDT 2008


Risto Kankkunen a écrit :
>> And you will have to use the ...W functions of win32file for *all* disk
>> access inside .hg, feeding every path as an absolute path with '\' path
>> separators only (must include drive letter) in a Unicode string object
>> prepended by "\\?\".
> 
> No you don't for paths that you can reach with <260 chars or which don't contain
> DOS device names.
> 
>> So, PyWin32 will be an obligatory dependency (not really an issue,
>> just to mention it).
> 
> Why do you think so?
> 
>   Python 2.5 (r25:51908, Sep 19 2006, 09:52:17) [MSC v.1310 32 bit (Intel)] on
>     win32
>   Type "help", "copyright", "credits" or "license" for more information.
>   >>> file(r'\\?\c:\aux.i', 'wt').write('Hello, world!\n')
>   >>> file(r'\\?\c:\aux.i').read()
>   'Hello, world!\n'
>   >>>

This one does not seem to work to generate long path names (not with a quick test at least). Maybe it does with pywin32/ctypes. Besides, I think we can rule out this trick for reserved file names since they cannot be handled by common tools afterwards.

--
Patrick Mézard


More information about the Mercurial mailing list