##// END OF EJS Templates
setup: unconditionally enable the `long-paths-support` option on Windows...
Matt Harbison -
r50290:747c4fc2 default
parent child Browse files
Show More
@@ -666,15 +666,6 b' class buildhgextindex(Command):'
666 666
667 667 class buildhgexe(build_ext):
668 668 description = 'compile hg.exe from mercurial/exewrapper.c'
669 user_options = build_ext.user_options + [
670 (
671 'long-paths-support',
672 None,
673 'enable support for long paths on '
674 'Windows (off by default and '
675 'experimental)',
676 ),
677 ]
678 669
679 670 LONG_PATHS_MANIFEST = """
680 671 <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
@@ -689,7 +680,6 b' class buildhgexe(build_ext):'
689 680
690 681 def initialize_options(self):
691 682 build_ext.initialize_options(self)
692 self.long_paths_support = False
693 683
694 684 def build_extensions(self):
695 685 if os.name != 'nt':
@@ -774,22 +764,11 b' class buildhgexe(build_ext):'
774 764 self.compiler.link_executable(
775 765 objects, self.hgtarget, libraries=[], output_dir=self.build_temp
776 766 )
777 if self.long_paths_support:
778 self.addlongpathsmanifest()
767
768 self.addlongpathsmanifest()
779 769
780 770 def addlongpathsmanifest(self):
781 r"""Add manifest pieces so that hg.exe understands long paths
782
783 This is an EXPERIMENTAL feature, use with care.
784 To enable long paths support, one needs to do two things:
785 - build Mercurial with --long-paths-support option
786 - change HKLM\SYSTEM\CurrentControlSet\Control\FileSystem\
787 LongPathsEnabled to have value 1.
788
789 Please ignore 'warning 81010002: Unrecognized Element "longPathAware"';
790 it happens because Mercurial uses mt.exe circa 2008, which is not
791 yet aware of long paths support in the manifest (I think so at least).
792 This does not stop mt.exe from embedding/merging the XML properly.
771 """Add manifest pieces so that hg.exe understands long paths
793 772
794 773 Why resource #1 should be used for .exe manifests? I don't know and
795 774 wasn't able to find an explanation for mortals. But it seems to work.
@@ -807,7 +786,7 b' class buildhgexe(build_ext):'
807 786 # it merge the embedded and supplied manifests in the -outputresource
808 787 self.spawn(
809 788 [
810 'mt.exe',
789 self.compiler.mt,
811 790 '-nologo',
812 791 '-manifest',
813 792 manfname,
General Comments 0
You need to be logged in to leave comments. Login now