[PATCH windows] windows: add an experimental option for long paths support

Pulkit Goyal 7895pulkit at gmail.com
Mon Mar 4 22:32:57 UTC 2019


On Thu, Feb 28, 2019 at 8:28 PM Matt Harbison <mharbison72 at gmail.com> wrote:

>
> On Feb 28, 2019, at 8:00 AM, Pulkit Goyal <7895pulkit at gmail.com> wrote:
>
>
>
> On Tue, Oct 10, 2017 at 5:39 AM Matt Harbison <mharbison72 at gmail.com>
> wrote:
>
>> On Mon, 09 Oct 2017 05:38:04 -0400, Kostia Balytskyi <ikostia at fb.com>
>> wrote:
>>
>> > # HG changeset patch
>> > # User Kostia Balytskyi <ikostia at fb.com>
>> > # Date 1507541423 25200
>> > #      Mon Oct 09 02:30:23 2017 -0700
>> > # Node ID aa5c7de6a86ba8bbc7d46bb414ac7ee6fbde3a4a
>> > # Parent  a57c938e7ac8f391a62de6c7c4d5cf0e81b2dcf4
>> > windows: add an experimental option for long paths support
>> >
>> > +
>> > +    def addlongpathsmanifest(self):
>> > +        """Add manifest pieces so that hg.exe understands long paths
>> > +
>> > +        This is an EXPERIMENTAL feature, use with care.
>> > +        To enable long paths support, one needs to do two things:
>> > +        - build Mercurial with --long-paths-support option
>> > +        - change HKLM\SYSTEM\CurrentControlSet\Control\FileSystem\
>> > +                 LongPathsEnabled to have value 1.
>>
>> The way I read the documentation[1], it seems like either one alone is
>> sufficient.  Did you find different in testing?
>>
>> [1]
>> https://msdn.microsoft.com/en-us/library/aa365247(v=vs.85).aspx#maxpath
>
>
> I stumbled upon the same thing today. Then I read the 9th comment on
> https://social.msdn.microsoft.com/Forums/en-US/fc85630e-5684-4df6-ad2f-5a128de3deef/260-character-explorer-path-length-limit?forum=windowsgeneraldevelopmentissues
> which says you need to have the support enabled and also add the manifest
> to hg.exe.
>
> Matt any chance you checked whether we need the manifest or just enabling
> the long path support on windows will work.
>
>
> I played with it a little bit this morning.  I didn’t enable the policy
> setting, but it looks like the manifest entry alone doesn’t work.  I used
> py3 to test (which does have the manifest entry).
>
> I’m not sure if they did anything to support it in py3, but the entry is
> missing from py2.
>

I tested it today on python 2. First I enabled the setting from
ComputerPolicy/ComputerCofiguration/.... . Only enabling this option did
not work.

Then I manually added the manifest to hg.exe using mt.exe and it worked.

>
> Given that is doesn’t work with the manifest alone, I wonder if we should
> just add it to the manifest unconditionally. (It’s behind an extra build
> argument right now.)
>

I don't have an opinion here. I am too new to windows to say anything about
that.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.mercurial-scm.org/pipermail/mercurial-devel/attachments/20190305/13f6fdfb/attachment.html>


More information about the Mercurial-devel mailing list