Exceeding the windows API MAX_PATH limit

Matt Mackall mpm at selenic.com
Fri Apr 20 13:32:48 CDT 2012


On Fri, 2012-04-20 at 14:14 +0200, Noel Grandin wrote:
> 
> On 2012-04-20 14:04, Adrian Buehlmann wrote:
> > So I'd recommend to make sure that *all* your other tools can handle 
> > long paths _first_ before proposing to change mercurial's working copy 
> > handling on Windows to use the long path api's.
> 
> The point is that these kinds of problems ARE popping up, and we (being 
> the users) don't need ALL of our tools to support long paths.

This is not even remotely worth the trouble on our end, where we'll have
to handle bug reports like "I can't delete this file Mercurial created
without reinstalling Windows, you guys suck!"

Ask again when at least Explorer can handle these paths.

Until then, your best bet is to create a private extension that tweaks
scmutil.opener() or possibly even __builtins__.open(). This isn't as
hard as it sounds, see this example code that emulates a
case-insensitive filesystem:

http://www.selenic.com/hg/file/ee553e6cd8c4/contrib/casesmash.py

-- 
Mathematics is the supreme nostalgia of our time.




More information about the Mercurial-devel mailing list