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

Adrian Buehlmann adrian at cadifra.com
Mon Jun 16 07:06:32 CDT 2008


On 16.06.2008 13:45, Paul Moore wrote:
> On 16/06/2008, Tom Widmer <tom.widmer at googlemail.com> wrote:
>> How about using \\?\ to get around the long filename problem, but
>> additionally encoding reserved names with a .? That way, only repos with
>> extra long pathnames will have problems in explorer, but such repos will
>> at least work if you stick to hg commands.
> 
> My experiments suggest that it could be very hard to modify Mercurial
> to use the \\?\ APIs and workarounds. Pretty much every file command
> would need changing - it would likely require implementation of a
> complete file API layer.

Yep. It's quite a pile of work. But it should be doable.

Like I already said today in http://selenic.com/pipermail/mercurial/2008-June/019599.html,
we will have to use all the ...W functions of win32file for *all* disk access
inside .hg.

> Note - I haven't done more than minimal testing so far, but I've tried
> what seem to me to be the obvious and simple options, and they don't
> seem to work...

I think it should work. I will to do some tests myself and will report back
(with some Python code snippets).

The plain windows file api should work (unicode functions + "\\?\" with full path).
I just haven't tested win32file yet (but that is hardly a problem, since it is just
a Python adapter).









More information about the Mercurial mailing list