Path fun on Windows

Adrian Buehlmann adrian at cadifra.com
Wed Jun 6 15:18:33 CDT 2012


On 2012-06-06 21:21, Matt Mackall wrote:
> On Wed, 2012-06-06 at 11:54 +0200, Adrian Buehlmann wrote:
>> So I'm seeing some other nastyness with paths while trying to enable more tests
>> for Windows.
>>
>> (I'm pretty sure mpm won't read this. Combination of Windows and text length,
>> all written by a stupid Windows hacker - me - who still insists on using
>> Windows, C++ and all.
> 
> You're right, I won't read it.. but only because I already read the
> corresponding bug report before I got to this email.
> 
> Actually, I've always thought canonpath was a mess. And I did more or
> less the same analysis just a few months ago:
> 
> http://bz.selenic.com/show_bug.cgi?id=2167#c4
> 
> ..which, incidentally, you were on the cc: list for.
> 
> The way forward is probably to:
> 
> a) have a VFS object as described here:
> 
> http://mercurial.selenic.com/wiki/WindowsUTF8Plan
> 
> b) move all the canonpath/pathto/fspath/etc. methods into it
> 
> ..which has the virtue that the VFS object can internally track the
> case-folding flag and do the right thing, as well as having a proper
> place to put util.fspath's cache.

My level of understanding is definitely way too low to be wanted to be
dragged into this encoding terror (the terror is not in what you've
written, it's the mess that it tries to cope with).

But I guess I would waste my time if I'd try cooking patches that
deviate from your plan.

So someone else probably has to step up on this. Perhaps I can at least
increase the test coverage a little bit until I have to vanish again.

In any case, I would have probably killed util.samestat.



More information about the Mercurial-devel mailing list