Path fun on Windows

Matt Mackall mpm at selenic.com
Wed Jun 6 15:24:43 CDT 2012


On Wed, 2012-06-06 at 22:18 +0200, Adrian Buehlmann wrote:
> 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).

The bulk of the work there has nothing at all to do with encoding. It's
just the primary motive for doing it. A secondary motive is that it lets
us deal with other filesystem quirks more centrally.

-- 
Mathematics is the supreme nostalgia of our time.




More information about the Mercurial-devel mailing list